Hi,
I need to create a surface, with the same format of another, but, with
different size. I’m having unexpected problems on my code and I think
that is something related to this.
Is this correct ?? It will create another surface with the same format
from surface “image” ??
surface = SDL_CreateRGBSurface(
image->flags, frameSize.w, frameSize.h,
image->format->BitsPerPixel,
image->format->Rmask, image->format->Gmask,
image->format->Bmask, image->format->Amask
);
Thanks!
Herbert
Now I’m shure… It’s really wrong, but I still don’t know the correct
way to do the same as SDL_DisplayFormat, but with a different size.
H. G. Fischer wrote:> Hi,
I need to create a surface, with the same format of another, but, with
different size. I’m having unexpected problems on my code and I think
that is something related to this.
Is this correct ?? It will create another surface with the same format
from surface “image” ??
surface = SDL_CreateRGBSurface(
image->flags, frameSize.w, frameSize.h,
image->format->BitsPerPixel,
image->format->Rmask, image->format->Gmask,
image->format->Bmask, image->format->Amask
);
Thanks!
Herbert
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Hi,
I need to create a surface, with the same format of another, but, with
different size. I’m having unexpected problems on my code and I think
that is something related to this.
Is this correct ?? It will create another surface with the same format
from surface “image” ??
surface = SDL_CreateRGBSurface(
image->flags, frameSize.w, frameSize.h,
image->format->BitsPerPixel,
image->format->Rmask, image->format->Gmask,
image->format->Bmask, image->format->Amask
);
That looks correct. Make sure that you’re setting the palette, if any.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment