PDA

Click to See Complete Forum and Search --> : DirectX surface change?


Shurijo
Feb 5th, 2002, 09:25 AM
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

Oafo
Feb 5th, 2002, 01:41 PM
You have to change the width and height of the surface when you blit the new bitmap onto it.

Sastraxi
Feb 5th, 2002, 02:52 PM
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.

EGY_Tiger
Feb 5th, 2002, 06:08 PM
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