SDL automatically clips blits to the screen surface.
Does this make checking in your own code whether or not a given sprite is
on the screen pointless and inefficient?
If you have 500 sprites, and only a small proportion of them are likely
to be on the screen, should you just blit all 500 of them in any case and
let SDL_BlitSurface sort it out?
SDL automatically clips blits to the screen surface.
Does this make checking in your own code whether or not a given sprite is
on the screen pointless and inefficient?
If you have 500 sprites, and only a small proportion of them are likely
to be on the screen, should you just blit all 500 of them in any case and
let SDL_BlitSurface sort it out?
If you can efficiently tell whether or not the sprite is on-screen, maybe
with a bit-flag, then you should do it. Otherwise, you can let SDL sort
it out, but passing lots of empty rectangles to SDL_UpdateRects() isn’t
a great idea for performance.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
SDL automatically clips blits to the screen surface.
Does this make checking in your own code whether or not a given sprite is
on the screen pointless and inefficient?
If you have 500 sprites, and only a small proportion of them are likely
to be on the screen, should you just blit all 500 of them in any case and
let SDL_BlitSurface sort it out?
If you can efficiently tell whether or not the sprite is on-screen, maybe
with a bit-flag, then you should do it. Otherwise, you can let SDL sort
it out, but passing lots of empty rectangles to SDL_UpdateRects() isn’t
a great idea for performance.
Thanks…
JamesOn Mon, 09 Feb 2004 04:38:48 -0800, Sam Lantinga wrote:
Hi, I’m new in this list.
I’m trying to make a SDL_Surface semi-transparent over a openGL scene.
There is any tutorial about how to do this ?
Thank, Marce.
Saludos, Marce. http://personales.ciudad.com.ar/MarcelaNoemiNievas--------
E-mail y acceso a Internet UltraVeloz totalmente GRATIS en Buenos Aires,
Rosario, Cordoba, Mendoza, La Plata y Pilar http://www.Argentina.com
Nro. de acceso 5078-5000 Usuario: Argentina Password: Argentina
You can just apply alpha blending to your quad that has the surface textured
to it, if you’re working at a whole surface level.
Doesn’t need to be a property of the image at all.> ----- Original Message -----
From: nievas_marcela@argentina.com (Marce)
To:
Sent: Wednesday, February 11, 2004 12:38 AM
Subject: [SDL] Transaprency over OpenGL
Hi, I’m new in this list.
I’m trying to make a SDL_Surface semi-transparent over a openGL scene.
There is any tutorial about how to do this ?
Thank, Marce.
Saludos, Marce. http://personales.ciudad.com.ar/MarcelaNoemiNievas
E-mail y acceso a Internet UltraVeloz totalmente GRATIS en Buenos Aires,
Rosario, Cordoba, Mendoza, La Plata y Pilar http://www.Argentina.com
Nro. de acceso 5078-5000 Usuario: Argentina Password: Argentina