GDI

Started by
2 comments, last by Ersvik 21 years, 7 months ago
How do I use GDI together with DirectX8? Thanks in advance, Johan Ersvik
Johan
Advertisement

In earlier versions you would do something like this:

m_pDDSurface->GetDC(&hdc);
TextOut(hdc, x,y, szText, lstrlen(szText));
m_pDDSurface->ReleaseDC(hdc);

But I do not think that this is possible anymore under DX8...But I''m not 100% sure.....
-------------Ban KalvinB !
you still can.

make a surface first, or just get a buffer from the chain buffer ..

then you can getdc from it .. very very slow though..

i normally use GDI for fonts. since it saves me the time of making the fonts myself.



Its my duty, to please that booty ! - John Shaft
You can, but it is highly recommended against. Long story short, mixing the two forces the device to stop, allow GDI stuff, and regroup. It can cause big performance issue.

What are you actually trying to do?
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials

This topic is closed to new replies.

Advertisement