-
DCs and DirectX8?
Hello
In directdraw 7 it was possible to get the DC from a surface using the GetDC method. This way you could blit to it using standard API functions. In directx8 however, this function seems to have disappeared. Is there any way to get the DC from a texture or surface in DX8? (or blit to them from another DC in some way?)
-
I'd say it would be inefficient to do GDI operations on the surface and i think there isn't a way, but i think there's specific blit to DC or from DC operations you can use. What kind of blitting are you doing?
-
I'm trying to blit the entire desktop image to a texture to use in a D3D screensaver...
-
there should be a method for that, at least there's in Dx7::Ddraw
In case there's not you could blit over using DMA.
-
Do you have some sample code for doing that?
-
You cannot get a DC from a surface in DX8. Take a look at the Surface's "LockRect()" function, however. It should suit your purpose.
Z.
-
why dont you just save the desktop image to a file and then load that file into the surface?
-
How do you people FIND this stuff?!
Z.
-
Was just thinking that myself :rolleyes:
-
Quote:
Registered: Jan 70
:D
You could create a memory DC, then copy the data from the bitmap you selected over to the locked area...
But I guess it's far to late now to help.
-
Quote:
Registered: Dec 69
The DB is screwed =).
Z.