Archived

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

SikCiv

Dx8 GetDC ?

Recommended Posts

In DDraw7 you could grab a DC using lpDDSurface->GetDC(), is this supported in Dx8 using Dx8 textures and surfaces? I tried GetDC on a texture and a surface but on compilation it told me getDC wasn''t a member of the Surface/texture class. Also, I have uploaded an updated version of my game but i''m not sure if it will work on TNT2 and voodoo cards so if some of you could download it, test it, and go to the feedback page on my site and post your results, it would help alot...thanks. Demo Download: www.angelfire.com/realm/zeroone

Share this post


Link to post
Share on other sites
G''day!

GetDC is gone. It''s always possible that it (or something similar) will be included in DX9 but I haven''t heard anything definite.

You can get the DC for the window you''re using, which requires that you flip and then render using the DC. It''s an ugly hack and I wouldn''t use it for anything other than prototyping/developing. There''s no telling how well/badly it will work on various cards. I''m also not sure if it will work in Fullscreen mode. As you can probably guess, I really don''t recommend it.

What do you want the DX for? Text? Or something else?


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
I need it for text, I dont think CD3DFont can render to textures in video memory can it? I was hoping I can do it the old fashion DDraw way since I have already written the code for it.
Is there a way to do it in DX8?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Look at SetRenderTarget. You should be able to render anything into a texture...

Alternately, look at the source code for C3DFont - it renders the character set into a texture, which is then used for rendering arbitrary strings.

Share this post


Link to post
Share on other sites