Search
lxdream.org :: lxdream/src/pvr2/glutil.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.h
changeset 687:6bdc2b7032ea
prev669:ab344e42bca9
next736:a02d1475ccfd
author nkeynes
date Sat Jun 14 11:54:15 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Change colour params to float
Convert background processing over to scene structure (fixes some depth issues as well)
Add color unclamp when supported
file annotate diff log raw
nkeynes@653
     1
/**
nkeynes@653
     2
 * $Id$
nkeynes@653
     3
 *
nkeynes@653
     4
 * GL-based support functions 
nkeynes@653
     5
 *
nkeynes@653
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@653
     7
 *
nkeynes@653
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@653
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@653
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@653
    11
 * (at your option) any later version.
nkeynes@653
    12
 *
nkeynes@653
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@653
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@653
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@653
    16
 * GNU General Public License for more details.
nkeynes@653
    17
 */
nkeynes@653
    18
nkeynes@653
    19
#ifndef lxdream_glutil_H
nkeynes@653
    20
#define lxdream_glutil_H
nkeynes@653
    21
nkeynes@687
    22
#include <stdio.h>
nkeynes@653
    23
#include "display.h"
nkeynes@653
    24
nkeynes@653
    25
/**
nkeynes@653
    26
 * Test if a specific extension is supported. From opengl.org
nkeynes@653
    27
 * @param extension extension name to check for
nkeynes@653
    28
 * @return TRUE if supported, otherwise FALSE.
nkeynes@653
    29
 */
nkeynes@653
    30
gboolean isGLExtensionSupported( const char *extension );
nkeynes@653
    31
nkeynes@667
    32
/**
nkeynes@687
    33
 * Dump GL information to the output stream, usually for debugging purposes
nkeynes@687
    34
 */
nkeynes@687
    35
void glPrintInfo( FILE *out );
nkeynes@687
    36
nkeynes@687
    37
/**
nkeynes@667
    38
 * Test if secondary color (GL_COLOR_SUM) is supported.
nkeynes@667
    39
 */
nkeynes@667
    40
gboolean isGLSecondaryColorSupported();
nkeynes@667
    41
nkeynes@667
    42
gboolean isGLVertexBufferSupported();
nkeynes@667
    43
gboolean isGLPixelBufferSupported();
nkeynes@667
    44
gboolean isGLMirroredTextureSupported();
nkeynes@653
    45
nkeynes@653
    46
/****** Shader handling (gl_sl.c) *****/
nkeynes@653
    47
gboolean glsl_is_supported(void);
nkeynes@653
    48
gboolean glsl_load_shaders( const char *vert_shader, const char *frag_shader );
nkeynes@653
    49
void glsl_unload_shaders(void);
nkeynes@669
    50
void glsl_enable_shaders( gboolean enable );
nkeynes@653
    51
nkeynes@653
    52
extern const char *glsl_vertex_shader_src;
nkeynes@653
    53
extern const char *glsl_fragment_shader_src;
nkeynes@653
    54
nkeynes@653
    55
#endif /* !lxdream_glutil_H */
.