Search
lxdream.org :: lxdream/src/pvr2/glutil.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.c
changeset 736:a02d1475ccfd
prev700:4650d0c7f6f9
next1066:ddffe9d2b332
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/pvr2/glutil.c Sun Jun 22 06:49:00 2008 +0000
1.2 +++ b/src/pvr2/glutil.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -15,28 +15,29 @@
1.4 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.5 * GNU General Public License for more details.
1.6 */
1.7 +
1.8 #include <string.h>
1.9 #include <glib/gstrfuncs.h>
1.10 #include "pvr2/glutil.h"
1.11
1.12 gboolean isGLSecondaryColorSupported()
1.13 {
1.14 - return isGLExtensionSupported("GL_EXT_secondary_color");
1.15 + return isGLExtensionSupported("GL_EXT_secondary_color");
1.16 }
1.17
1.18 gboolean isGLVertexBufferSupported()
1.19 {
1.20 - return isGLExtensionSupported("GL_ARB_vertex_buffer_object");
1.21 + return isGLExtensionSupported("GL_ARB_vertex_buffer_object");
1.22 }
1.23
1.24 gboolean isGLPixelBufferSupported()
1.25 {
1.26 - return isGLExtensionSupported("GL_ARB_pixel_buffer_object");
1.27 + return isGLExtensionSupported("GL_ARB_pixel_buffer_object");
1.28 }
1.29
1.30 gboolean isGLMirroredTextureSupported()
1.31 {
1.32 - return isGLExtensionSupported("GL_ARB_texture_mirrored_repeat");
1.33 + return isGLExtensionSupported("GL_ARB_texture_mirrored_repeat");
1.34 }
1.35
1.36 /**
1.37 @@ -53,26 +54,26 @@
1.38 /* Extension names should not have spaces. */
1.39 where = (GLubyte *) strchr(extension, ' ');
1.40 if (where || *extension == '\0')
1.41 - return 0;
1.42 + return 0;
1.43 extensions = glGetString(GL_EXTENSIONS);
1.44 if( extensions == NULL ) {
1.45 - /* No GL available, so we're pretty sure the extension isn't
1.46 - * available either. */
1.47 - return FALSE;
1.48 + /* No GL available, so we're pretty sure the extension isn't
1.49 + * available either. */
1.50 + return FALSE;
1.51 }
1.52 /* It takes a bit of care to be fool-proof about parsing the
1.53 OpenGL extensions string. Don't be fooled by sub-strings,
1.54 etc. */
1.55 start = extensions;
1.56 for (;;) {
1.57 - where = (GLubyte *) strstr((const char *) start, extension);
1.58 - if (!where)
1.59 - break;
1.60 - terminator = where + strlen(extension);
1.61 - if (where == start || *(where - 1) == ' ')
1.62 - if (*terminator == ' ' || *terminator == '\0')
1.63 - return TRUE;
1.64 - start = terminator;
1.65 + where = (GLubyte *) strstr((const char *) start, extension);
1.66 + if (!where)
1.67 + break;
1.68 + terminator = where + strlen(extension);
1.69 + if (where == start || *(where - 1) == ' ')
1.70 + if (*terminator == ' ' || *terminator == '\0')
1.71 + return TRUE;
1.72 + start = terminator;
1.73 }
1.74 return FALSE;
1.75 }
1.76 @@ -82,11 +83,11 @@
1.77 const gchar *extensions = (const gchar *)glGetString(GL_EXTENSIONS);
1.78 gchar **ext_split = g_strsplit(extensions, " ", 0);
1.79 unsigned int i;
1.80 -
1.81 +
1.82 fprintf( out, "GL Vendor: %s\n", glGetString(GL_VENDOR) );
1.83 fprintf( out, "GL Renderer: %s\n", glGetString(GL_RENDERER) );
1.84 fprintf( out, "GL Version: %s\n", glGetString(GL_VERSION) );
1.85 -
1.86 +
1.87 fprintf( out, "Supported GL Extensions:\n" );
1.88 for( i=0; ext_split[i] != NULL; i++ ) {
1.89 fprintf( out, " %s\n", ext_split[i] );
.