nkeynes@653: /** nkeynes@653: * $Id$ nkeynes@653: * nkeynes@653: * GL-based support functions nkeynes@653: * nkeynes@653: * Copyright (c) 2005 Nathan Keynes. nkeynes@653: * nkeynes@653: * This program is free software; you can redistribute it and/or modify nkeynes@653: * it under the terms of the GNU General Public License as published by nkeynes@653: * the Free Software Foundation; either version 2 of the License, or nkeynes@653: * (at your option) any later version. nkeynes@653: * nkeynes@653: * This program is distributed in the hope that it will be useful, nkeynes@653: * but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@653: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@653: * GNU General Public License for more details. nkeynes@653: */ nkeynes@653: nkeynes@653: #ifndef lxdream_glutil_H nkeynes@653: #define lxdream_glutil_H nkeynes@653: nkeynes@687: #include nkeynes@653: #include "display.h" nkeynes@653: nkeynes@736: #ifdef __cplusplus nkeynes@736: extern "C" { nkeynes@736: #endif nkeynes@736: nkeynes@653: /** nkeynes@653: * Test if a specific extension is supported. From opengl.org nkeynes@653: * @param extension extension name to check for nkeynes@653: * @return TRUE if supported, otherwise FALSE. nkeynes@653: */ nkeynes@653: gboolean isGLExtensionSupported( const char *extension ); nkeynes@653: nkeynes@667: /** nkeynes@687: * Dump GL information to the output stream, usually for debugging purposes nkeynes@687: */ nkeynes@687: void glPrintInfo( FILE *out ); nkeynes@687: nkeynes@687: /** nkeynes@667: * Test if secondary color (GL_COLOR_SUM) is supported. nkeynes@667: */ nkeynes@667: gboolean isGLSecondaryColorSupported(); nkeynes@667: nkeynes@667: gboolean isGLVertexBufferSupported(); nkeynes@667: gboolean isGLPixelBufferSupported(); nkeynes@667: gboolean isGLMirroredTextureSupported(); nkeynes@653: nkeynes@653: /****** Shader handling (gl_sl.c) *****/ nkeynes@653: gboolean glsl_is_supported(void); nkeynes@653: gboolean glsl_load_shaders( const char *vert_shader, const char *frag_shader ); nkeynes@653: void glsl_unload_shaders(void); nkeynes@669: void glsl_enable_shaders( gboolean enable ); nkeynes@653: nkeynes@653: extern const char *glsl_vertex_shader_src; nkeynes@653: extern const char *glsl_fragment_shader_src; nkeynes@653: nkeynes@736: #ifdef __cplusplus nkeynes@736: } nkeynes@736: #endif nkeynes@736: nkeynes@653: #endif /* !lxdream_glutil_H */