Hi all,
I'm playing video using SDL, and using overlay, and for
button i’m having button.bmp and using loadbmp for getting that image on
sdl surface. then I’m doing SDL_BlitSurface, with button size, so its
consuming more cpu, is there any alternative solution for blit
function…???
please guide me…!!!
Thanks in advance… :-)–
Lohitha R
IT consumes a lot of CPU because you have your BMP in one pixel formay and
your display is in another format.
After loadbmp call the SDL_DisplayFormat() function to convert image to
display pixel format, and SDL_BlitSurface will be hardware accelerated.On Mon, May 31, 2010 at 10:27 AM, Lohitha R <lohitha.r at globaledgesoft.com>wrote:
Hi all,
I'm playing video using SDL, and using overlay, and for button
i’m having button.bmp and using loadbmp for getting that image on sdl
surface. then I’m doing SDL_BlitSurface, with button size, so its consuming
more cpu, is there any alternative solution for blit function…???
please guide me…!!!
Thanks in advance…
–
Lohitha R
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Remember to free the original surface after converting it.
SDL_DisplayFormat() produces a second surface.
http://sdl.beuc.net/sdl.wiki/SDL_DisplayFormatOn Mon, May 31, 2010 at 4:09 AM, Sergiy Pylypenko <x.pelya.x at gmail.com> wrote:
IT consumes a lot of CPU because you have your BMP in one pixel formay and
your display is in another format.
After loadbmp call the SDL_DisplayFormat() function to convert image to
display pixel format, and SDL_BlitSurface will be hardware accelerated.
On Mon, May 31, 2010 at 10:27 AM, Lohitha R <lohitha.r at globaledgesoft.com> wrote:
Hi all,
? ? ? ? ? ?I’m playing video using SDL, and using overlay, and for button
i’m having button.bmp and using loadbmp for getting that image on sdl
surface. then I’m doing SDL_BlitSurface, with button size, so its consuming
more cpu, is there any alternative solution for blit function…???
please guide me…!!!
Thanks in advance…
–
Lohitha R
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
http://codebad.com/