ferrobrew / egui-directx10

Direct3D10 renderer for egui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

egui-directx10: a Direct3D10 renderer for egui

This crate aims to provide a minimal set of features and APIs to render outputs from egui using Direct3D10.

Quick Start

There is an egui-demo example, which demonstrates all you need to do to set up a minimal application with Direct3D10 and egui. This example uses winit for window management and event handling, while native Win32 APIs should also work well.

Considerations

This crate is a fork of egui-directx11 designed to target DirectX 10 instead. This is very niche and not recommended for general use.

The shaders were built using gwihlidal/docker-fxc:

docker run --rm -v "$(pwd)/shaders:/fxc/shaders" gwihlidal/fxc /T vs_4_0 /E vs_main shaders/egui.hlsl /Fo shaders/egui_vs.bin
docker run --rm -v "$(pwd)/shaders:/fxc/shaders" gwihlidal/fxc /T ps_4_0 /E ps_main shaders/egui.hlsl /Fo shaders/egui_ps.bin

The original considerations section follows:


This crate is a successor to egui-d3d11, which is no longer maintained and has certain issues or inconvenience in some cases.

We assume you to be familiar with developing graphics applications using Direct3D11, and if not, this crate is not likely useful for you. Besides, this crate cares only about rendering outputs from egui, so it is all your responsibility to handle things like setting up the window and event loop, creating the device and swap chain, etc.

This crate is built upon the official Rust bindings of Direct3D11 and DXGI APIs from the windows crate maintained by Microsoft. Using this crate with other Direct3D11 bindings is not recommended and may result in unexpected behavior.

Project Status and Versioning Compatibility on windows and egui

This crate has been considered as general available without known issues since version 0.3.1. Though, it keeps bumping major version to follow major version bumps on its direct dependencies, namely windows and egui.

To select a version for this crate according to the windows and egui version your project uses, please check the table below:

egui-directx11 windows egui
0.5.0 0.58.0 0.28.x
0.4.0 0.56.0 0.27.x
0.3.1 0.54.0 0.27.x

Releases of this crate before 0.3.1 are considered premature and are not recommended to use.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See LICENSE-APACHE and LICENSE-MIT.

About

Direct3D10 renderer for egui

License:Apache License 2.0


Languages

Language:Rust 92.8%Language:HLSL 5.5%Language:Shell 1.6%