--- a/src/drivers/video_gl.c Fri Feb 24 21:17:47 2012 +1000 +++ b/src/drivers/video_gl.c Sat Feb 25 21:30:49 2012 +1000 @@ -23,6 +23,11 @@ #include "pvr2/glutil.h" #include "drivers/video_gl.h" +/* FIXME: Need to actually handle this case */ +#ifndef GL_PACK_ROW_LENGTH +#define glPixelStorei(key,val) +#endif + uint32_t video_width, video_height; struct video_vertex { float x,y; @@ -89,15 +94,16 @@ defineOrthoMatrix(video_box.viewMatrix, video_width, video_height, 0, 65535); } +#ifdef HAVE_OPENGL_FIXEDFUNC /** * Setup the gl context for writes to the display output. */ void gl_framebuffer_setup() { + glViewport( 0, 0, video_width, video_height ); glLoadMatrixf(video_box.viewMatrix); glBlendFunc( GL_ONE, GL_ZERO ); glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE ); - glViewport( 0, 0, video_width, video_height ); glVertexPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].x); glColorPointer(3, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].r); glTexCoordPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].u); @@ -106,6 +112,13 @@ glEnableClientState( GL_TEXTURE_COORD_ARRAY ); } +#else +void gl_framebuffer_setup() +{ + /* TODO */ +} +#endif + void gl_display_render_buffer( render_buffer_t buffer ) { gl_texture_window( buffer->width, buffer->height, buffer->buf_id, buffer->inverted );