Results 1 to 4 of 4

Thread: DirectX surface change?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164

    Question DirectX surface change?

    I am using DDraw and I use CreateSurfaceFromResource method to load a bitmap from a resource file. Later in the application, I load another bitmap over the same surface. When I do this, the second image gets warped to fit the width and height of the first image.

    Is there a way that I can reset surface so that my second bitmap isn't streched to the same dimensions as the first image?

    thanks,
    shurijo
    -Shurijo

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    421
    You have to change the width and height of the surface when you blit the new bitmap onto it.
    [vbcode]
    ' comment
    Rem remark
    [/vbcode]

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Alternatively you could destroy it and then create it, it may avoid a memory leak but then again it may create one. Be on your guard.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    New Member
    Join Date
    Feb 2002
    Location
    EGYPT , PortSaid
    Posts
    10
    before you using the secound bitmap type

    type

    set surface = nothing

    then set the Ddsd valus

    then set the rect

    then blt fast the surface
    EGY_Tiger
    will stay
    EGY_Tiger 4 ever

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