Plugins: how to best retrieve D3D9 device?

Started by DoorKnobHandle, Tue 09/08/2011 21:25:09

Previous topic - Next topic

DoorKnobHandle

Quick question to other AGS plugin authors: when using D3D9 drivers, how do you guys retrieve the D3D9 device on startup? I have always done this in the AGSE_PRESCREENDRAW by counting frames and setting things up on the very first frame and before rendering anything. This is not a very elegant solution however, I wish there was some kind of startup event that would pass the D3D9 device but I couldn't find such a thing. How are other people doing this?

Calin Leafshade

The way you do it currently is the only way i can see of doing it.

i just declare a global and if the global == null set up the device.

DoorKnobHandle

Ah ok, thanks, Calin!

No priority, but a proper event for doing this more elegantly would be kinda cool in the future! :D

SMF spam blocked by CleanTalk