From 0c26245424867e7ae1078860b7a7843932cf575e Mon Sep 17 00:00:00 2001 From: nigels Date: Thu, 11 Mar 2010 23:28:29 +0000 Subject: [PATCH] Initial OpenGL 3.3 and 4.0 support git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@590 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/bin/update_ext.sh | 4 ++++ auto/core/GL_VERSION_3_3 | 11 +++++++++++ auto/core/GL_VERSION_4_0 | 25 +++++++++++++++++++++++++ auto/src/glew_init_gl.c | 4 +++- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 auto/core/GL_VERSION_3_3 create mode 100644 auto/core/GL_VERSION_4_0 diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index 9848b16..dfb0228 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -234,6 +234,10 @@ EOT GL_MAX_SAMPLES_EXT 0x8D57 EOT +# Filter out GL_ARB_gpu_shader_fp64 enums and functions + head -n3 $1/GL_ARB_gpu_shader_fp64 > tmp + mv tmp $1/GL_ARB_gpu_shader_fp64 + # fix const correctness in GL_ARB_shader_objects # perl -e 's/(.+glUniform.*(fv|iv).+)(GLfloat\*.+|GLint\*.+)/\1const \3/;' -pi $1/GL_ARB_shader_objects diff --git a/auto/core/GL_VERSION_3_3 b/auto/core/GL_VERSION_3_3 new file mode 100644 index 0000000..799f530 --- /dev/null +++ b/auto/core/GL_VERSION_3_3 @@ -0,0 +1,11 @@ +GL_VERSION_3_3 +http://www.opengl.org/registry/doc/glspec32.core.20090803.pdf + + GL_TEXTURE_SWIZZLE_R 0x8E42 + GL_TEXTURE_SWIZZLE_G 0x8E43 + GL_TEXTURE_SWIZZLE_B 0x8E44 + GL_TEXTURE_SWIZZLE_A 0x8E45 + GL_TEXTURE_SWIZZLE_RGBA 0x8E46 + GL_RGB10_A2UI 0x906F + GL_ANY_SAMPLES_PASSED 0x8C2F + GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE diff --git a/auto/core/GL_VERSION_4_0 b/auto/core/GL_VERSION_4_0 new file mode 100644 index 0000000..9a118c9 --- /dev/null +++ b/auto/core/GL_VERSION_4_0 @@ -0,0 +1,25 @@ +GL_VERSION_4_0 +http://www.opengl.org/registry/doc/glspec32.core.20090803.pdf + + GL_SAMPLE_SHADING 0x8C36 + GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 + GL_GEOMETRY_SHADER_INVOCATIONS 0x887F + GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A + GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B + GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C + GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D + GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E + GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F + GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS 0x8F9F + GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 + GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A + GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B + GL_SAMPLER_CUBE_MAP_ARRAY 0x900C + GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D + GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E + GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F + void glMinSampleShading (GLclampf value) + void glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha) + void glBlendEquationi (GLuint buf, GLenum mode) + void glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) + void glBlendFunci (GLuint buf, GLenum src, GLenum dst) diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index fa83408..ff7d5a8 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -54,7 +54,9 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) } else { - CONST_CAST(GLEW_VERSION_3_2) = ( major > 3 ) || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE; + CONST_CAST(GLEW_VERSION_4_0) = ( major > 4 ) || ( major == 4 ) ? GL_TRUE : GL_FALSE; + CONST_CAST(GLEW_VERSION_3_3) = GLEW_VERSION_4_0 == GL_TRUE || ( major == 3 && minor >= 3 ) ? GL_TRUE : GL_FALSE; + CONST_CAST(GLEW_VERSION_3_2) = GLEW_VERSION_3_3 == GL_TRUE || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_3_1) = GLEW_VERSION_3_2 == GL_TRUE || ( major == 3 && minor >= 1 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_3_0) = GLEW_VERSION_3_1 == GL_TRUE || ( major == 3 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_2_1) = GLEW_VERSION_3_0 == GL_TRUE || ( major == 2 && minor >= 1 ) ? GL_TRUE : GL_FALSE;