Archived

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

eeeko

sharing an d3d9 device

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
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