Jean-Christophe Duberga wrote:

No, I think it this should be avoided only for hardware surfaces but I suspect the function TTF_RenderUTF8_Blended (from SDL_ttf library), which render text for us, to create hardware surface when hardware surfaces are available.

I am wrong, from the file (in the SDL_ttf library) SDL_ttf .c at line 1561

       textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 32,
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
       if ( textbuf == NULL ) {
               return(NULL);
       }

So that our text surfaces are well located in the main memory.

Is that to say that blitting a software surface to the video surface with the glSDL backend is so slow ?

I should have forgotten something, or should be wrong somewhere.


--
Jean-Christophe Duberga - http://jeanchristophe.duber.free.fr
webmaster du site MNEA  - http://www.mnea.fr


Répondre à