Sign in to follow this  
samv

[SlimDX] CreateFlags.AdapterGroupDevice

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this