Jump to content
  • Advertisement
Sign in to follow this  
Programmer16

Calling Direct3DCreate9() returns the same value everytime, right?

This topic is 5147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a class that will construct a list of all available Direct3D settings, and I need to have a pointer to the IDirect3D9 interface. My settings class and my engine class are separate, and the engine class needs my settings class before it can setup DirectX. My question is, can I use the following code to do this:
void Eg3DEngineCreationSettings::Eg3DEngineCreationSettings()
{
IDirect3D9* pInterface = Direct3DCreate9(D3D_SDK_VERSION);
/*
...
*/
Eg3DRelease(pInterface);
}

void Eg3DEngine::Create(Eg3DEngineCreationSettings* pSettings)
{
IDirect3D9* pInterface = Direct3DCreate9(D3D_SDK_VERSION);
/*
...
*/
}

Sorry if this a little incoherent and if my code is messed up, I've been up a long time. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!