How do I pass multiple device CreateFlags when creating a DX9 device?
-
04-07-2021 - |
سؤال
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.
المحلول
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.
لا تنتمي إلى StackOverflow