|
-
Jun 8th, 2001, 04:25 AM
#1
Thread Starter
Member
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?)
-
Jun 8th, 2001, 04:36 AM
#2
transcendental analytic
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?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 8th, 2001, 04:41 AM
#3
Thread Starter
Member
I'm trying to blit the entire desktop image to a texture to use in a D3D screensaver...
-
Jun 11th, 2001, 05:16 PM
#4
transcendental analytic
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jul 29th, 2001, 01:21 PM
#5
Thread Starter
Member
Do you have some sample code for doing that?
-
Jul 30th, 2001, 12:00 PM
#6
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.
-
Jan 28th, 2003, 02:37 PM
#7
Addicted Member
why dont you just save the desktop image to a file and then load that file into the surface?
-
Jan 28th, 2003, 07:36 PM
#8
Frenzied Member
How do you people FIND this stuff?!
Z.
-
Jan 28th, 2003, 07:39 PM
#9
Good Ol' Platypus
Was just thinking that myself
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 28th, 2003, 09:16 PM
#10

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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 28th, 2003, 10:05 PM
#11
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|