Search
lxdream.org :: lxdream/src/pvr2/glutil.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.h
changeset 1207:f7ca985659c6
prev1206:a9b41bcb8410
next1210:79bbd30363f4
author nkeynes
date Tue Feb 07 11:44:19 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Add enable/disable vertex attribute calls when making a shader active
view annotate diff log raw
     1 /**
     2  * $Id$
     3  *
     4  * GL-based support functions 
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #ifndef lxdream_glutil_H
    20 #define lxdream_glutil_H
    22 #include <stdio.h>
    23 #include "display.h"
    25 #ifdef __cplusplus
    26 extern "C" {
    27 #endif
    29 /**
    30  * Test if a specific extension is supported. From opengl.org
    31  * @param extension extension name to check for
    32  * @return TRUE if supported, otherwise FALSE.
    33  */
    34 gboolean isGLExtensionSupported( const char *extension );
    36 /**
    37  * Dump GL information to the output stream, usually for debugging purposes
    38  */
    39 void glPrintInfo( FILE *out );
    41 /**
    42  * Check for a GL error and print a message if there is one
    43  * @param context If not null, a string to be printed along side an error message
    44  * @return FALSE if there was an error, otherwise TRUE
    45  */
    46 gboolean gl_check_error( const char *context );
    47 /**
    48  * Test if secondary color (GL_COLOR_SUM) is supported.
    49  */
    50 gboolean isGLSecondaryColorSupported();
    52 gboolean isGLVertexBufferSupported();
    53 gboolean isGLVertexRangeSupported();
    54 gboolean isGLPixelBufferSupported();
    55 gboolean isGLMultitextureSupported();
    56 gboolean isGLMirroredTextureSupported();
    58 /****** Extension variant wrangling *****/
    63 /****** Shader handling (gl_sl.c) *****/
    64 gboolean glsl_is_supported(void);
    65 const char *glsl_get_version(void);
    66 gboolean glsl_load_shaders( );
    67 void glsl_unload_shaders(void);
    68 void glsl_clear_shader();
    70 /* Convenience formatting function for driver use */
    71 void fprint_extensions( FILE *out, const char *extensions );
    73 #ifdef __cplusplus
    74 }
    75 #endif
    77 #endif /* !lxdream_glutil_H */
.