[SlimDX] CreateFlags.AdapterGroupDevice

Started by
5 comments, last by samv 15 years, 2 months ago
How do I correctly use the SlimDX.Direct3D9.CreateFlags.AdapterGroupDevice flag?
Quote:MSDN If this flag is set, the presentation parameters passed to IDirect3D9::CreateDevice should point to an array of D3DPRESENT_PARAMETERS.
I assume in SlimDX this would mean I should pass an array of PresentParameters to the Device constructor, but there is no such constructor that accepts an array. Am I missing something? Thanks.
___________________________Buggrit, millennium hand and shrimp!
Advertisement
No, we're missing the relevant constructor. We've been vaguely aware of it, but nobody asked and it slipped off the radar. I can put it in though.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Ok, I've just committed this change to Subversion. That version should be good to go. By the way, do you know what this flag is for? Because I have no idea what it actually accomplishes.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
It's my understanding that this flag is intended to be used for multihead graphics cards, so you can use a single device to drive all its monitors.
I haven't used it yet though, so I'm not sure what kind of a difference it really makes in practice.


... After looking at your change, I wonder:
1. Did you just replace the Device constructor that takes a single PresentParameters? Don't you still want to have that option, too?
2. The DeviceEx class needs a similar change, right?

---
By the way did you get around to fix the D3D9Ex Direct3DEx.Adapters issue, too? I didn't see any changes related to that, but maybe I missed it.

FYI, I recompiled SlimDX with this change to get it working for me:
Index: Direct3DEx.cpp===================================================================--- Direct3DEx.cpp	(revision 851)+++ Direct3DEx.cpp	(working copy)@@ -86,6 +86,8 @@         }  		Construct( direct3D );++		InitAdapters(); 	}  	Direct3DEx^ Direct3DEx::FromPointer( IDirect3D9Ex* pointer )Index: Direct3D.h===================================================================--- Direct3D.h	(revision 851)+++ Direct3D.h	(working copy)@@ -47,6 +47,7 @@  		protected: 			Direct3D( bool doNotConstruct );+			void InitAdapters();  		public: 			Direct3D();Index: Direct3D.cpp===================================================================--- Direct3D.cpp	(revision 851)+++ Direct3D.cpp	(working copy)@@ -58,6 +58,11 @@ 	{ 		//called by Direct3D9Ex 	}+	+	void Direct3D::InitAdapters()+	{+		adapters = gcnew AdapterCollection( InternalPointer, false );+  }  	Direct3D::Direct3D() 	{


Thanks
___________________________Buggrit, millennium hand and shrimp!
Quote:Original post by samv
1. Did you just replace the Device constructor that takes a single PresentParameters? Don't you still want to have that option, too?
I changed it to paramarray, actually. You can pass a single, an array, or multiple via args.
Quote:2. The DeviceEx class needs a similar change, right?
Good point.
Quote:By the way did you get around to fix the D3D9Ex Direct3DEx.Adapters issue, too? I didn't see any changes related to that, but maybe I missed it.
Heh, oops.

I've committed all of those changes now, let me know if I missed anything.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Oh, I see. Neat.

Thanks again.
___________________________Buggrit, millennium hand and shrimp!
The same applies to the Reset and ResetEx methods. (Just FYI; I guess I don't need this flag after all...)
___________________________Buggrit, millennium hand and shrimp!

This topic is closed to new replies.

Advertisement