Results 1 to 4 of 4

Thread: (Resolved) DirectDraw Surfaces

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Location
    Ohio
    Posts
    23

    Unhappy (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

  2. #2
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    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
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Location
    Ohio
    Posts
    23

    Talking

    Thanks! It works great! Just what I'm looking for
    Jason O

  4. #4
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Oh my god it Worked


    Yipeee i have finally helped someone yippee

    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width