Search
lxdream.org :: lxdream/src/pvr2/glutil.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.h
changeset 1134:f502f3d32f90
prev1130:5f56fc931112
next1140:7dc1c71ece76
author nkeynes
date Fri Oct 22 20:55:32 2010 +1000 (12 years ago)
permissions -rw-r--r--
last change Dump more information with --gl-info, and print it a little more nicely
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"
    24 #include "pvr2/shaders.h"
    26 #ifdef __cplusplus
    27 extern "C" {
    28 #endif
    30 /**
    31  * Test if a specific extension is supported. From opengl.org
    32  * @param extension extension name to check for
    33  * @return TRUE if supported, otherwise FALSE.
    34  */
    35 gboolean isGLExtensionSupported( const char *extension );
    37 /**
    38  * Dump GL information to the output stream, usually for debugging purposes
    39  */
    40 void glPrintInfo( FILE *out );
    42 /**
    43  * Test if secondary color (GL_COLOR_SUM) is supported.
    44  */
    45 gboolean isGLSecondaryColorSupported();
    47 gboolean isGLVertexBufferSupported();
    48 gboolean isGLVertexRangeSupported();
    49 gboolean isGLPixelBufferSupported();
    50 gboolean isGLMirroredTextureSupported();
    52 /****** Shader handling (gl_sl.c) *****/
    53 gboolean glsl_is_supported(void);
    54 const char *glsl_get_version(void);
    55 gboolean glsl_load_shaders( );
    56 void glsl_unload_shaders(void);
    57 gboolean glsl_set_shader( unsigned program_id );
    58 void glsl_clear_shader();
    60 /* Convenience formatting function for driver use */
    61 void fprint_extensions( FILE *out, const char *extensions );
    63 #ifdef __cplusplus
    64 }
    65 #endif
    67 #endif /* !lxdream_glutil_H */
.