-
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
-
You have to change the width and height of the surface when you blit the new bitmap onto it.
-
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.
-
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