D
Daisy
Having a weird problem... Just moving some code into new classes & methods.
Originally, I created a new instance of "Game" (my form), and it created a
new DX Device using:
_device = new Device(0, DeviceType.Hardware, _form,
CreateFlags.SoftwareVertexProcessing, _presParams);
This works correctly.
I've changed that line to now be:
_engine = new GameEngine(this);
and the constructo for GameEngine looks like this:
IntPtr _form;
public GameEngine(IntPtr form)
{
_form = form;
_device = new Device(0, DeviceType.Hardware, _form,
CreateFlags.SoftwareVertexProcessing, _presParams);
}
And now I get an error about converting Game to System.IntPtr (Game, being
my form).
Have I got to do something special to pass "this" from my forms into my own
classes? :-\
Originally, I created a new instance of "Game" (my form), and it created a
new DX Device using:
_device = new Device(0, DeviceType.Hardware, _form,
CreateFlags.SoftwareVertexProcessing, _presParams);
This works correctly.
I've changed that line to now be:
_engine = new GameEngine(this);
and the constructo for GameEngine looks like this:
IntPtr _form;
public GameEngine(IntPtr form)
{
_form = form;
_device = new Device(0, DeviceType.Hardware, _form,
CreateFlags.SoftwareVertexProcessing, _presParams);
}
And now I get an error about converting Game to System.IntPtr (Game, being
my form).
Have I got to do something special to pass "this" from my forms into my own
classes? :-\