Skip to main content
GameDev.net gamedev.net
🔒 Locked

Sample Framework problem

Started by Horn Nov 3, 2004 at 4:06 PM 0 replies 1k views
Original Post
Horn
Horn
I'm trying to work the sample framework into a game that I've already started in order to get access to their UI stuff. I create the window and device myself and I try to use the SetWindow and SetDevice to tell the framework what to use. When I call SetDevice the framework throws an exception.

EnumAdapterInformation adapterInfo = Enumeration.GetAdapterInformation(newDeviceSettings.AdapterOrdinal);
UpdateDeviceStats(newDeviceSettings.DeviceType, newDeviceSettings.BehaviorFlags, adapterInfo.AdapterInformation);

I've debugged it and found out that the GetAdapterInformation() returns null. Also AdapterOrdinal is set to 0 (I assume this is correct since I only have one video card). Here is my code for creating the framework:

FrameWork = new Microsoft.Samples.DirectX.UtilityToolkit.Framework();
FrameWork.Initialize(false, false, false);
FrameWork.SetWindow(this.Handle,this.Handle,this.Handle,false);
FrameWork.SetDevice(D3Device);
this.Show();

D3Device has already been created and this is a Form class. I've looked for documentation but it seems to be a little thin right now.
Horn
Horn
Hate to bump my own thread but does anyone know what could be wrong?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.