r_gl.h

Go to the documentation of this file.
00001 
00006 /*
00007 Copyright (C) 1997-2001 Id Software, Inc.
00008 
00009 This program is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018 See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 
00024 */
00025 
00026 #ifndef __R_GL_H__
00027 #define __R_GL_H__
00028 
00029 #include <SDL_opengl.h>
00030 
00031 /* internally defined convenience constant */
00032 #define GL_TANGENT_ARRAY -1
00033 #define GL_NEXT_VERTEX_ARRAY -2
00034 #define GL_NEXT_NORMAL_ARRAY -3
00035 #define GL_NEXT_TANGENT_ARRAY -4
00036 
00037 /* multitexture */
00038 void (APIENTRY *qglActiveTexture)(GLenum texture);
00039 void (APIENTRY *qglClientActiveTexture)(GLenum texture);
00040 
00041 /* vertex buffer objects */
00042 void (APIENTRY *qglGenBuffers)  (GLuint count, GLuint *id);
00043 void (APIENTRY *qglDeleteBuffers)  (GLuint count, GLuint *id);
00044 void (APIENTRY *qglBindBuffer)  (GLenum target, GLuint id);
00045 void (APIENTRY *qglBufferData)  (GLenum target, GLsizei size, const GLvoid *data, GLenum usage);
00046 
00047 /* vertex attribute arrays */
00048 void (APIENTRY *qglEnableVertexAttribArray)(GLuint index);
00049 void (APIENTRY *qglDisableVertexAttribArray)(GLuint index);
00050 void (APIENTRY *qglVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
00051 
00052 /* glsl vertex and fragment shaders and programs */
00053 GLuint (APIENTRY *qglCreateShader)(GLenum type);
00054 void (APIENTRY *qglDeleteShader)(GLuint id);
00055 void (APIENTRY *qglShaderSource)(GLuint id, GLuint count, GLchar **sources, GLuint *len);
00056 void (APIENTRY *qglCompileShader)(GLuint id);
00057 void (APIENTRY *qglGetShaderiv)(GLuint id, GLenum field, GLuint *dest);
00058 void (APIENTRY *qglGetShaderInfoLog)(GLuint id, GLuint maxlen, GLuint *len, GLchar *dest);
00059 GLuint (APIENTRY *qglCreateProgram)(void);
00060 void (APIENTRY *qglDeleteProgram)(GLuint id);
00061 void (APIENTRY *qglAttachShader)(GLuint prog, GLuint shader);
00062 void (APIENTRY *qglDetachShader)(GLuint prog, GLuint shader);
00063 void (APIENTRY *qglLinkProgram)(GLuint id);
00064 void (APIENTRY *qglUseProgram)(GLuint id);
00065 void (APIENTRY *qglGetProgramiv)(GLuint id, GLenum field, GLuint *dest);
00066 void (APIENTRY *qglGetProgramInfoLog)(GLuint id, GLuint maxlen, GLuint *len, GLchar *dest);
00067 GLint (APIENTRY *qglGetUniformLocation)(GLuint id, const GLchar *name);
00068 void (APIENTRY *qglUniform1i)(GLint location, GLint i);
00069 void (APIENTRY *qglUniform1f)(GLint location, GLfloat f);
00070 void (APIENTRY *qglUniform1fv)(GLint location, int count, GLfloat *f);
00071 void (APIENTRY *qglUniform2fv)(GLint location, int count, GLfloat *f);
00072 void (APIENTRY *qglUniform3fv)(GLint location, int count, GLfloat *f);
00073 void (APIENTRY *qglUniform4fv)(GLint location, int count, GLfloat *f);
00074 GLint(APIENTRY *qglGetAttribLocation)(GLuint id, const GLchar *name);
00075 
00076 /* frame buffer objects (fbo) */
00077 GLboolean (APIENTRY *qglIsRenderbufferEXT) (GLuint);
00078 void (APIENTRY *qglBindRenderbufferEXT) (GLenum, GLuint);
00079 void (APIENTRY *qglDeleteRenderbuffersEXT) (GLsizei, const GLuint *);
00080 void (APIENTRY *qglGenRenderbuffersEXT) (GLsizei, GLuint *);
00081 void (APIENTRY *qglRenderbufferStorageEXT) (GLenum, GLenum, GLsizei, GLsizei);
00082 void (APIENTRY *qglGetRenderbufferParameterivEXT) (GLenum, GLenum, GLint *);
00083 GLboolean (APIENTRY *qglIsFramebufferEXT) (GLuint);
00084 void (APIENTRY *qglBindFramebufferEXT) (GLenum, GLuint);
00085 void (APIENTRY *qglDeleteFramebuffersEXT) (GLsizei, const GLuint *);
00086 void (APIENTRY *qglGenFramebuffersEXT) (GLsizei, GLuint *);
00087 GLenum (APIENTRY *qglCheckFramebufferStatusEXT) (GLenum);
00088 void (APIENTRY *qglFramebufferTexture1DEXT) (GLenum, GLenum, GLenum, GLuint, GLint);
00089 void (APIENTRY *qglFramebufferTexture2DEXT) (GLenum, GLenum, GLenum, GLuint, GLint);
00090 void (APIENTRY *qglFramebufferTexture3DEXT) (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
00091 void (APIENTRY *qglFramebufferRenderbufferEXT) (GLenum, GLenum, GLenum, GLuint);
00092 void (APIENTRY *qglGetFramebufferAttachmentParameterivEXT) (GLenum, GLenum, GLenum, GLint *);
00093 void (APIENTRY *qglGenerateMipmapEXT) (GLenum);
00094 void (APIENTRY *qglDrawBuffers) (GLsizei, const GLenum *);
00095 
00096 #endif

Generated by  doxygen 1.6.2