|
-
Dec 8th, 2002, 09:10 PM
#1
Thread Starter
Junior Member
(Resolved) DirectDraw Surfaces
Hi, I'm sorta new to DirectX and I'm trying to figure out how to create an empty DirectDraw Surface. I've found examples that show you how to make a main screen surface and a backbuffer to blt images on, but how do you make other blank surfaces of a defined height/width using the CreateSurface function? All the examples i've seen only show how to set up a surface with the CreateSurfaceFromFile function, but I just want an empty one. Could someone give me a quick example?
Last edited by Jdo300; Dec 9th, 2002 at 03:18 PM.
Jason O
-
Dec 9th, 2002, 04:17 AM
#2
KING BODWAD XXI
Private Sub CreateSurface()
Dim ddsd as DirectDrawSurfaceDesc
ddsd.lcaps = ddsd_Height + ddsd_Width + ddsd_lcaps
ddsd.ddCaps.lcaps = ddsd_offscreenplain
ddsd.lheight = 100
ddsd.lWidth = 100
Set background = dDraw.createsurface(ddsd)
Some Adjustments are probably needed for the correct fromats but they pop up anyway
In simple terms to create an empty surface use the DirectDrawSurfaceDesc object define a height a width and a surface type which if opscreenplain for a normal surface.
Hope it helps i cant test the code here but i think there are a few simple mistakes you can fix
-
Dec 9th, 2002, 03:18 PM
#3
Thread Starter
Junior Member
Thanks! It works great! Just what I'm looking for
-
Dec 10th, 2002, 03:24 AM
#4
KING BODWAD XXI
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
|