Rewrite the 2d code to use a scrap.

This severely reduces the calles to BindTexture, and more importantly,
glUseProgram, EnableVertexAttribArray etc. The biggest changes are:

 o  icons and text are all in the one giant texture
 o  icons and text are mixed in the one queue

This gave ~9% speedup for bigass1 (159->174fps).
This commit is contained in:
Bill Currie 2012-07-03 13:38:35 +09:00
parent df35b22af4
commit b25de4d995
3 changed files with 146 additions and 178 deletions

View file

@ -30,6 +30,7 @@
void GLSL_Set2D (void);
void GLSL_Set2DScaled (void);
void GLSL_End2D (void);
void GLSL_DrawReset (void);
void GLSL_FlushText (void);