Search
lxdream.org :: lxdream/src/drivers/video_gl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gl.c
changeset 1239:be3121267597
prev1236:d93175c36387
next1240:190df8a791ca
author nkeynes
date Sat Feb 25 21:30:49 2012 +1000 (7 years ago)
permissions -rw-r--r--
last change Android support WIP
file annotate diff log raw
1.1 --- a/src/drivers/video_gl.c Fri Feb 24 21:17:47 2012 +1000
1.2 +++ b/src/drivers/video_gl.c Sat Feb 25 21:30:49 2012 +1000
1.3 @@ -23,6 +23,11 @@
1.4 #include "pvr2/glutil.h"
1.5 #include "drivers/video_gl.h"
1.6
1.7 +/* FIXME: Need to actually handle this case */
1.8 +#ifndef GL_PACK_ROW_LENGTH
1.9 +#define glPixelStorei(key,val)
1.10 +#endif
1.11 +
1.12 uint32_t video_width, video_height;
1.13 struct video_vertex {
1.14 float x,y;
1.15 @@ -89,15 +94,16 @@
1.16 defineOrthoMatrix(video_box.viewMatrix, video_width, video_height, 0, 65535);
1.17 }
1.18
1.19 +#ifdef HAVE_OPENGL_FIXEDFUNC
1.20 /**
1.21 * Setup the gl context for writes to the display output.
1.22 */
1.23 void gl_framebuffer_setup()
1.24 {
1.25 + glViewport( 0, 0, video_width, video_height );
1.26 glLoadMatrixf(video_box.viewMatrix);
1.27 glBlendFunc( GL_ONE, GL_ZERO );
1.28 glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
1.29 - glViewport( 0, 0, video_width, video_height );
1.30 glVertexPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].x);
1.31 glColorPointer(3, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].r);
1.32 glTexCoordPointer(2, GL_FLOAT, sizeof(struct video_vertex), &video_box.gap1[0].u);
1.33 @@ -106,6 +112,13 @@
1.34 glEnableClientState( GL_TEXTURE_COORD_ARRAY );
1.35 }
1.36
1.37 +#else
1.38 +void gl_framebuffer_setup()
1.39 +{
1.40 + /* TODO */
1.41 +}
1.42 +#endif
1.43 +
1.44 void gl_display_render_buffer( render_buffer_t buffer )
1.45 {
1.46 gl_texture_window( buffer->width, buffer->height, buffer->buf_id, buffer->inverted );
.