[SDL] Equivalent of SDL_BlitSurface in OpenGL?

Stephen Anthony stephena at roadrunner.nf.net
Mon Nov 3 07:10:01 PST 2003

I was planning to have 2 textures in my application; one for the main 
display and one for the font data.  But I found that since the texture 
itself is big enough to hold both (because of power or 2 requirements), 
then I can use the one main texture.

My question is, what is the equivalent OpenGL command (when working with 
textures) for the following SDL code?

SDL_Rect srcrect, dstrect;
// rects are filled with correct coordinates
SDL_BlitSurface(texture_surface, &srcrect, texture_surface, &dstrect);

I assume that it will use glCopyTexSubImage2D().  Also, when I overlay the 
font subtexture, I'd like to to take into account the alpha-levels 
defined in the font subtexture.


More information about the SDL mailing list