Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

eeeko

sharing an d3d9 device

This topic is 5358 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''ve trying to share a d3d device and have one pointer to it in each class. The problem is that it''s not working properly, each time I try to send the pointer to a new d3d device it returns NULL. How can I fix this? Or do you know a better way to achive this? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Well, now I have made all the d3d init stuff in an own class and there is no problems retriving a d3d device. The problem is that my cD3d->GetDevice() function crashes when I run it.
While debugging (vc6++) I see that the device is created and stored in the d3d init class but when my rendering class try''s to use it it''s got the value 0x00000000?
Perhaps it''s just something simple but I thought that when the rendering class "finds" the function GetDevice() in the init class then the stored device would still be initialized or am I missing something?

Thanks! /Anders

Share this post


Link to post
Share on other sites
I''m just stupid Ignore this post!

Turned out that the problem was in my head (composing bad code) but things work smoothly now!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!