Sign in to follow this  

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

This topic is 4865 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

This topic is 4865 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this