I am using SlimDX(DX9) but I imagine its the same for all versions of DX. I am trying to pass both the CreateFlags.HardwareVertexProssesing and CreateFlags.Multithreaded but I can't figure out how.
Asked
Active
Viewed 99 times
1 Answers
2
Since they are flags, you should be able to combine them using the bit OR operator.
CreateFlags.HardwareVertexProcessing | CreateFlags.Multithreaded
Edit based on comment
Lets say HardwareVertexProcessing = 0001 and Multithreaded = 0010
If we OR these together we get:
0001
0010 OR
----
0011
But if we AND these, we get:
0001
0010 AND
----
0000
This link gives more detailed information. Its from the Mozilla Developer Network.

Justin Self
- 6,137
- 3
- 33
- 48
-
Oh ok using Bitwise operators makes sense. But should it be And instead of Or because I want to use both? – Alexander Van Atta Sep 28 '12 at 18:11
-
Doesn't quite work like you would expect based on the names of the operators. Check out this link for some clarification https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators#.7C_(Bitwise_OR) – Justin Self Sep 28 '12 at 18:13