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.Hard ware, _form,
CreateFlags.Sof twareVertexProc essing, _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(IntP tr form)
{
_form = form;
_device = new Device(0, DeviceType.Hard ware, _form,
CreateFlags.Sof twareVertexProc essing, _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? :-\
--
Daisy The Cow
Now playing: Darude Vs Robert Miles - Sandstorm Children
Originally, I created a new instance of "Game" (my form), and it created a
new DX Device using:
_device = new Device(0, DeviceType.Hard ware, _form,
CreateFlags.Sof twareVertexProc essing, _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(IntP tr form)
{
_form = form;
_device = new Device(0, DeviceType.Hard ware, _form,
CreateFlags.Sof twareVertexProc essing, _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? :-\
--
Daisy The Cow
Now playing: Darude Vs Robert Miles - Sandstorm Children
Comment