iOS/buildlibs/armv7/allegro-4.4.2/addons/allegrogl/src/videovtb.c
/* FIXME: Doesn't work when FBO is not available.
 * FIXME: Doesn't care for segmented video bitmaps.
 */
Doesn't work when FBO is not available.
FIXME: Doesn't care for segmented video bitmaps.
Doesn ' t work when FBO is not available . FIXME : Doesn ' t care for segmented video bitmaps .
static void allegro_gl_video_draw_color_glyph(struct BITMAP *bmp,
    struct BITMAP *sprite, int x, int y, int color, int bg)
{
	AGL_VIDEO_BITMAP *vid = bmp->extra;
	static GLint v[4];
	static double allegro_gl_projection_matrix[16];
	static double allegro_gl_modelview_matrix[16];
	if (!vid->fbo)
		return;
	glGetIntegerv(GL_VIEWPORT, &v[0]);
	glMatrixMode(GL_MODELVIEW);
	glGetDoublev(GL_MODELVIEW_MATRIX, allegro_gl_modelview_matrix);
	glMatrixMode(GL_PROJECTION);
	glGetDoublev(GL_PROJECTION_MATRIX, allegro_gl_projection_matrix);
	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, vid->fbo);
	glViewport(0, 0, vid->memory_copy->w, vid->memory_copy->h);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(0, vid->memory_copy->w, 0, vid->memory_copy->h);
	glMatrixMode(GL_MODELVIEW);
	allegro_gl_screen_draw_color_glyph_ex(bmp, sprite, x, y, color, bg, 0);
	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
	glViewport(v[0], v[1], v[2], v[3]);
	glMatrixMode(GL_PROJECTION);
	glLoadMatrixd(allegro_gl_projection_matrix);
	glMatrixMode(GL_MODELVIEW);
	glLoadMatrixd(allegro_gl_modelview_matrix);
	vid->memory_copy->vtable->draw_character(vid->memory_copy, sprite, x, y, color, bg);
}
static void allegro_gl_video_draw_color_glyph ( struct BITMAP * bmp , struct BITMAP * sprite , int x , int y , int color , int bg ) { AGL_VIDEO_BITMAP * vid = bmp -> extra ; static GLint v [ 4 ] ; static double allegro_gl_projection_matrix [ 16 ] ; static double allegro_gl_modelview_matrix [ 16 ] ; if ( ! vid -> fbo ) return ; glGetIntegerv ( GL_VIEWPORT , & v [ 0 ] ) ; glMatrixMode ( GL_MODELVIEW ) ; glGetDoublev ( GL_MODELVIEW_MATRIX , allegro_gl_modelview_matrix ) ; glMatrixMode ( GL_PROJECTION ) ; glGetDoublev ( GL_PROJECTION_MATRIX , allegro_gl_projection_matrix ) ; glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , vid -> fbo ) ; glViewport ( 0 , 0 , vid -> memory_copy -> w , vid -> memory_copy -> h ) ; glMatrixMode ( GL_PROJECTION ) ; glLoadIdentity ( ) ; gluOrtho2D ( 0 , vid -> memory_copy -> w , 0 , vid -> memory_copy -> h ) ; glMatrixMode ( GL_MODELVIEW ) ; allegro_gl_screen_draw_color_glyph_ex ( bmp , sprite , x , y , color , bg , 0 ) ; glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , 0 ) ; glViewport ( v [ 0 ] , v [ 1 ] , v [ 2 ] , v [ 3 ] ) ; glMatrixMode ( GL_PROJECTION ) ; glLoadMatrixd ( allegro_gl_projection_matrix ) ; glMatrixMode ( GL_MODELVIEW ) ; glLoadMatrixd ( allegro_gl_modelview_matrix ) ; vid -> memory_copy -> vtable -> draw_character ( vid -> memory_copy , sprite , x , y , color , bg ) ; }
FIXME: Doesn't work when FBO is not available.
FIXME : Doesn ' t work when FBO is not available .