Add GL 2.0 stuff.

This commit is contained in:
Bill Currie 2011-12-25 19:40:04 +09:00
parent 91afdcf064
commit 70abd33a25
3 changed files with 178 additions and 0 deletions

View file

@ -231,6 +231,89 @@
#define GL_SAMPLES_PASSED 0x8914
#endif
#ifndef GL_VERSION_2_0
#define GL_BLEND_EQUATION_RGB 0x8009
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
#define GL_STENCIL_BACK_FUNC 0x8800
#define GL_STENCIL_BACK_FAIL 0x8801
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
#define GL_MAX_DRAW_BUFFERS 0x8824
#define GL_DRAW_BUFFER0 0x8825
#define GL_DRAW_BUFFER1 0x8826
#define GL_DRAW_BUFFER2 0x8827
#define GL_DRAW_BUFFER3 0x8828
#define GL_DRAW_BUFFER4 0x8829
#define GL_DRAW_BUFFER5 0x882A
#define GL_DRAW_BUFFER6 0x882B
#define GL_DRAW_BUFFER7 0x882C
#define GL_DRAW_BUFFER8 0x882D
#define GL_DRAW_BUFFER9 0x882E
#define GL_DRAW_BUFFER10 0x882F
#define GL_DRAW_BUFFER11 0x8830
#define GL_DRAW_BUFFER12 0x8831
#define GL_DRAW_BUFFER13 0x8832
#define GL_DRAW_BUFFER14 0x8833
#define GL_DRAW_BUFFER15 0x8834
#define GL_BLEND_EQUATION_ALPHA 0x883D
#define GL_MAX_VERTEX_ATTRIBS 0x8869
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_VERTEX_SHADER 0x8B31
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
#define GL_MAX_VARYING_FLOATS 0x8B4B
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
#define GL_SHADER_TYPE 0x8B4F
#define GL_FLOAT_VEC2 0x8B50
#define GL_FLOAT_VEC3 0x8B51
#define GL_FLOAT_VEC4 0x8B52
#define GL_INT_VEC2 0x8B53
#define GL_INT_VEC3 0x8B54
#define GL_INT_VEC4 0x8B55
#define GL_BOOL 0x8B56
#define GL_BOOL_VEC2 0x8B57
#define GL_BOOL_VEC3 0x8B58
#define GL_BOOL_VEC4 0x8B59
#define GL_FLOAT_MAT2 0x8B5A
#define GL_FLOAT_MAT3 0x8B5B
#define GL_FLOAT_MAT4 0x8B5C
#define GL_SAMPLER_1D 0x8B5D
#define GL_SAMPLER_2D 0x8B5E
#define GL_SAMPLER_3D 0x8B5F
#define GL_SAMPLER_CUBE 0x8B60
#define GL_SAMPLER_1D_SHADOW 0x8B61
#define GL_SAMPLER_2D_SHADOW 0x8B62
#define GL_DELETE_STATUS 0x8B80
#define GL_COMPILE_STATUS 0x8B81
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#define GL_INFO_LOG_LENGTH 0x8B84
#define GL_ATTACHED_SHADERS 0x8B85
#define GL_ACTIVE_UNIFORMS 0x8B86
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
#define GL_SHADER_SOURCE_LENGTH 0x8B88
#define GL_ACTIVE_ATTRIBUTES 0x8B89
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
#define GL_CURRENT_PROGRAM 0x8B8D
#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
#define GL_LOWER_LEFT 0x8CA1
#define GL_UPPER_LEFT 0x8CA2
#define GL_STENCIL_BACK_REF 0x8CA3
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#endif
/* Standard OpenGL external function defs */
typedef void (GLAPIENTRY *QF_glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
typedef void (GLAPIENTRY *QF_glBlendEquation) (GLenum mode);

View file

@ -421,6 +421,100 @@ QFGL_NEED (void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height))
// ATI Extensions
QFGL_WANT (void, glPNTrianglesiATI, (GLenum pname, GLint param))
QFGL_WANT (void, glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha))
QFGL_WANT (void, glDrawBuffers, (GLsizei n, const GLenum *bufs))
QFGL_WANT (void, glStencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass))
QFGL_WANT (void, glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask))
QFGL_WANT (void, glStencilMaskSeparate, (GLenum face, GLuint mask))
QFGL_WANT (void, glAttachShader, (GLuint program, GLuint shader))
QFGL_WANT (void, glBindAttribLocation, (GLuint program, GLuint index, const GLchar *name))
QFGL_WANT (void, glCompileShader, (GLuint shader))
QFGL_WANT (GLuint, glCreateProgram, (void))
QFGL_WANT (GLuint, glCreateShader, (GLenum type))
QFGL_WANT (void, glDeleteProgram, (GLuint program))
QFGL_WANT (void, glDeleteShader, (GLuint shader))
QFGL_WANT (void, glDetachShader, (GLuint program, GLuint shader))
QFGL_WANT (void, glDisableVertexAttribArray, (GLuint index))
QFGL_WANT (void, glEnableVertexAttribArray, (GLuint index))
QFGL_WANT (void, glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name))
QFGL_WANT (void, glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name))
QFGL_WANT (void, glGetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj))
QFGL_WANT (GLint, glGetAttribLocation, (GLuint program, const GLchar *name))
QFGL_WANT (void, glGetProgramiv, (GLuint program, GLenum pname, GLint *params))
QFGL_WANT (void, glGetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog))
QFGL_WANT (void, glGetShaderiv, (GLuint shader, GLenum pname, GLint *params))
QFGL_WANT (void, glGetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog))
QFGL_WANT (void, glGetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source))
QFGL_WANT (GLint, glGetUniformLocation, (GLuint program, const GLchar *name))
QFGL_WANT (void, glGetUniformfv, (GLuint program, GLint location, GLfloat *params))
QFGL_WANT (void, glGetUniformiv, (GLuint program, GLint location, GLint *params))
QFGL_WANT (void, glGetVertexAttribdv, (GLuint index, GLenum pname, GLdouble *params))
QFGL_WANT (void, glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat *params))
QFGL_WANT (void, glGetVertexAttribiv, (GLuint index, GLenum pname, GLint *params))
QFGL_WANT (void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid* *pointer))
QFGL_WANT (GLboolean, glIsProgram, (GLuint program))
QFGL_WANT (GLboolean, glIsShader, (GLuint shader))
QFGL_WANT (void, glLinkProgram, (GLuint program))
QFGL_WANT (void, glShaderSource, (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length))
QFGL_WANT (void, glUseProgram, (GLuint program))
QFGL_WANT (void, glUniform1f, (GLint location, GLfloat v0))
QFGL_WANT (void, glUniform2f, (GLint location, GLfloat v0, GLfloat v1))
QFGL_WANT (void, glUniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2))
QFGL_WANT (void, glUniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
QFGL_WANT (void, glUniform1i, (GLint location, GLint v0))
QFGL_WANT (void, glUniform2i, (GLint location, GLint v0, GLint v1))
QFGL_WANT (void, glUniform3i, (GLint location, GLint v0, GLint v1, GLint v2))
QFGL_WANT (void, glUniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3))
QFGL_WANT (void, glUniform1fv, (GLint location, GLsizei count, const GLfloat *value))
QFGL_WANT (void, glUniform2fv, (GLint location, GLsizei count, const GLfloat *value))
QFGL_WANT (void, glUniform3fv, (GLint location, GLsizei count, const GLfloat *value))
QFGL_WANT (void, glUniform4fv, (GLint location, GLsizei count, const GLfloat *value))
QFGL_WANT (void, glUniform1iv, (GLint location, GLsizei count, const GLint *value))
QFGL_WANT (void, glUniform2iv, (GLint location, GLsizei count, const GLint *value))
QFGL_WANT (void, glUniform3iv, (GLint location, GLsizei count, const GLint *value))
QFGL_WANT (void, glUniform4iv, (GLint location, GLsizei count, const GLint *value))
QFGL_WANT (void, glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
QFGL_WANT (void, glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
QFGL_WANT (void, glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
QFGL_WANT (void, glValidateProgram, (GLuint program))
QFGL_WANT (void, glVertexAttrib1d, (GLuint index, GLdouble x))
QFGL_WANT (void, glVertexAttrib1dv, (GLuint index, const GLdouble *v))
QFGL_WANT (void, glVertexAttrib1f, (GLuint index, GLfloat x))
QFGL_WANT (void, glVertexAttrib1fv, (GLuint index, const GLfloat *v))
QFGL_WANT (void, glVertexAttrib1s, (GLuint index, GLshort x))
QFGL_WANT (void, glVertexAttrib1sv, (GLuint index, const GLshort *v))
QFGL_WANT (void, glVertexAttrib2d, (GLuint index, GLdouble x, GLdouble y))
QFGL_WANT (void, glVertexAttrib2dv, (GLuint index, const GLdouble *v))
QFGL_WANT (void, glVertexAttrib2f, (GLuint index, GLfloat x, GLfloat y))
QFGL_WANT (void, glVertexAttrib2fv, (GLuint index, const GLfloat *v))
QFGL_WANT (void, glVertexAttrib2s, (GLuint index, GLshort x, GLshort y))
QFGL_WANT (void, glVertexAttrib2sv, (GLuint index, const GLshort *v))
QFGL_WANT (void, glVertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z))
QFGL_WANT (void, glVertexAttrib3dv, (GLuint index, const GLdouble *v))
QFGL_WANT (void, glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z))
QFGL_WANT (void, glVertexAttrib3fv, (GLuint index, const GLfloat *v))
QFGL_WANT (void, glVertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z))
QFGL_WANT (void, glVertexAttrib3sv, (GLuint index, const GLshort *v))
QFGL_WANT (void, glVertexAttrib4Nbv, (GLuint index, const GLbyte *v))
QFGL_WANT (void, glVertexAttrib4Niv, (GLuint index, const GLint *v))
QFGL_WANT (void, glVertexAttrib4Nsv, (GLuint index, const GLshort *v))
QFGL_WANT (void, glVertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w))
QFGL_WANT (void, glVertexAttrib4Nubv, (GLuint index, const GLubyte *v))
QFGL_WANT (void, glVertexAttrib4Nuiv, (GLuint index, const GLuint *v))
QFGL_WANT (void, glVertexAttrib4Nusv, (GLuint index, const GLushort *v))
QFGL_WANT (void, glVertexAttrib4bv, (GLuint index, const GLbyte *v))
QFGL_WANT (void, glVertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
QFGL_WANT (void, glVertexAttrib4dv, (GLuint index, const GLdouble *v))
QFGL_WANT (void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
QFGL_WANT (void, glVertexAttrib4fv, (GLuint index, const GLfloat *v))
QFGL_WANT (void, glVertexAttrib4iv, (GLuint index, const GLint *v))
QFGL_WANT (void, glVertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w))
QFGL_WANT (void, glVertexAttrib4sv, (GLuint index, const GLshort *v))
QFGL_WANT (void, glVertexAttrib4ubv, (GLuint index, const GLubyte *v))
QFGL_WANT (void, glVertexAttrib4uiv, (GLuint index, const GLuint *v))
QFGL_WANT (void, glVertexAttrib4usv, (GLuint index, const GLushort *v))
QFGL_WANT (void, glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer))
#ifdef UNDEF_QFGL_DONT_NEED
#undef QFGL_DONT_NEED
#endif

View file

@ -35,6 +35,7 @@ typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef void GLvoid;
typedef char GLchar; /* 1-byte */
typedef signed char GLbyte; /* 1-byte signed */
typedef short GLshort; /* 2-byte signed */
typedef int GLint; /* 4-byte signed */