Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a d3d11 wrapper #187

Merged
merged 2 commits into from
Sep 14, 2015
Merged

Add a d3d11 wrapper #187

merged 2 commits into from
Sep 14, 2015

Conversation

msiglreith
Copy link
Contributor

Bindings to d3d11 (including the Video API) and the structs/enums/constants.
I tested it with a small demo application with a msvc rust build. (MinGW needs additional libraries?)

NOTE: Requires changes to the interface macro RIDL! and #164 for building.

@@ -1,15 +1,20 @@
[package]
name = "d3d11-sys"
version = "0.0.1"
version = "0.1.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change the crate version. I do that when I publish things to crates.io

@msiglreith
Copy link
Contributor Author

Thanks! Reverted the version change and rebased onto master. Building should be successful.

// pub fn D3D11CreateDevice();
// pub fn D3D11CreateDeviceAndSwapChain();

pub fn D3D11CreateDevice(pAdapter: *const IDXGIAdapter, DriverType: D3D_DRIVER_TYPE,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the multiline function style as dictated in CONTRIBUTING.md.

@retep998
Copy link
Owner

Please use #[repr(i32)] for the enums. EDIT: Please use the ENUM! and FLAGS! macros for enums.

Also make sure all binary operators have spaces on both sides. I see a few cases where you're missing a space on the left of an =. Also a bunch of , with spaces missing after them.

winapi = "*"
winapi = { version = "*", path = "../.." }
[build-dependencies]
winapi-build = { version = "*", path = "../../build" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing end of file newline.

@msiglreith
Copy link
Contributor Author

Thanks for reviewing.

  • Fixed EOF newline
  • Used the new ENUM! and FLAGS! macros (at some places I had to use .0)
  • Added some enum fields and structs from the latest Win10 SDK (Direct3D 11.3)

@retep998 retep998 merged commit 5a38095 into retep998:master Sep 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants