Search
lxdream.org :: lxdream/src/pvr2/glutil.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.h
changeset 1282:9f445c5e252b
prev1275:83b15705cdde
next1287:dac8f363f1fe
author nkeynes
date Tue Mar 27 08:23:52 2012 +1000 (10 years ago)
permissions -rw-r--r--
last change Android: Preserve render buffers when switching away from app.
- fix gl_read_render_buffer + gl_load_frame_buffer to work in GLES
a) glReadPixels only (guaranteed to) work for GL_RGBA,GL_UNSIGNED_BYTE
b) glTexSubImage2D can only load GL_RGBA into a GL_RGBA render buffer.
file annotate diff log raw
1.1 --- a/src/pvr2/glutil.h Tue Mar 20 08:29:38 2012 +1000
1.2 +++ b/src/pvr2/glutil.h Tue Mar 27 08:23:52 2012 +1000
1.3 @@ -60,6 +60,15 @@
1.4 gboolean isGLShaderSupported();
1.5 GLint glGetMaxColourAttachments();
1.6
1.7 +/**
1.8 + * Wrapper function for glTexImage2D calls that may have BGRA data - on systems
1.9 + * where this isn't directly supported, swizzle the data into an acceptable RGBA
1.10 + * equivalent. If preserveData is true, data will not be modified - otherwise
1.11 + * the method may swizzle data in-place.
1.12 + */
1.13 +void glTexImage2DBGRA( int level, GLint intFormat, int width, int height, GLint format, GLint type, unsigned char *data, int preserveData );
1.14 +void glTexSubImage2DBGRA( int level, int xoff, int yoff, int width, int height, GLint format, GLint type, unsigned char *data, int preserveData );
1.15 +
1.16 /****** Extension variant wrangling *****/
1.17
1.18 #if defined(GL_MIRRORED_REPEAT_ARB) && !defined(GL_MIRRORED_REPEAT)
1.19 @@ -141,8 +150,6 @@
1.20 #define glCheckFramebufferStatus glCheckFramebufferStatusEXT
1.21 #endif
1.22
1.23 -
1.24 -
1.25 /* Define an orthographic transform matrix, given the bounding box (assuming origin at 0) */
1.26 void defineOrthoMatrix( GLfloat *matrix, GLfloat width, GLfloat height, GLfloat znear, GLfloat zfar );
1.27
.