Search
lxdream.org :: lxdream/src/pvr2/glutil.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.h
changeset 1066:ddffe9d2b332
prev736:a02d1475ccfd
prev636:2ccf94f966fc
next1130:5f56fc931112
author nkeynes
date Sun Jul 05 13:53:48 2009 +1000 (11 years ago)
permissions -rw-r--r--
last change No-op merge lxdream-render to remove head (actually long since merged)
file annotate diff log raw
nkeynes@635
     1
/**
nkeynes@636
     2
 * $Id$
nkeynes@635
     3
 *
nkeynes@635
     4
 * GL-based support functions 
nkeynes@635
     5
 *
nkeynes@635
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@635
     7
 *
nkeynes@635
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@635
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@635
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@635
    11
 * (at your option) any later version.
nkeynes@635
    12
 *
nkeynes@635
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@635
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@635
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@635
    16
 * GNU General Public License for more details.
nkeynes@635
    17
 */
nkeynes@635
    18
nkeynes@635
    19
#ifndef lxdream_glutil_H
nkeynes@635
    20
#define lxdream_glutil_H
nkeynes@635
    21
nkeynes@687
    22
#include <stdio.h>
nkeynes@635
    23
#include "display.h"
nkeynes@635
    24
nkeynes@736
    25
#ifdef __cplusplus
nkeynes@736
    26
extern "C" {
nkeynes@736
    27
#endif
nkeynes@736
    28
nkeynes@635
    29
/**
nkeynes@635
    30
 * Test if a specific extension is supported. From opengl.org
nkeynes@635
    31
 * @param extension extension name to check for
nkeynes@635
    32
 * @return TRUE if supported, otherwise FALSE.
nkeynes@635
    33
 */
nkeynes@635
    34
gboolean isGLExtensionSupported( const char *extension );
nkeynes@635
    35
nkeynes@667
    36
/**
nkeynes@687
    37
 * Dump GL information to the output stream, usually for debugging purposes
nkeynes@687
    38
 */
nkeynes@687
    39
void glPrintInfo( FILE *out );
nkeynes@687
    40
nkeynes@687
    41
/**
nkeynes@667
    42
 * Test if secondary color (GL_COLOR_SUM) is supported.
nkeynes@667
    43
 */
nkeynes@667
    44
gboolean isGLSecondaryColorSupported();
nkeynes@667
    45
nkeynes@667
    46
gboolean isGLVertexBufferSupported();
nkeynes@667
    47
gboolean isGLPixelBufferSupported();
nkeynes@667
    48
gboolean isGLMirroredTextureSupported();
nkeynes@635
    49
nkeynes@635
    50
/****** Shader handling (gl_sl.c) *****/
nkeynes@635
    51
gboolean glsl_is_supported(void);
nkeynes@635
    52
gboolean glsl_load_shaders( const char *vert_shader, const char *frag_shader );
nkeynes@635
    53
void glsl_unload_shaders(void);
nkeynes@669
    54
void glsl_enable_shaders( gboolean enable );
nkeynes@635
    55
nkeynes@635
    56
extern const char *glsl_vertex_shader_src;
nkeynes@635
    57
extern const char *glsl_fragment_shader_src;
nkeynes@635
    58
nkeynes@736
    59
#ifdef __cplusplus
nkeynes@736
    60
}
nkeynes@736
    61
#endif
nkeynes@736
    62
nkeynes@635
    63
#endif /* !lxdream_glutil_H */
.