Added Nigel's patch #3

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@535 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2008-10-27 01:23:19 +00:00
parent 2cb3a94ea7
commit 7cda760b4b
5 changed files with 58 additions and 10 deletions

View File

@ -44,6 +44,9 @@ my %typemap = (
uint => "GLuint",
ushort => "GLushort",
DMbuffer => "void *",
# Nvidia video output fsck up
int64EXT => "GLint64EXT",
uint64EXT=> "GLuint64EXT",
# ARB VBO introduces these.
@ -128,6 +131,7 @@ sub normalize_prototype
{
local $_ = join(" ", @_);
s/\s+/ /g; # multiple whitespace -> single space
s/\<.*\>//g; # remove <comments> from direct state access extension
s/\s*\(\s*/ \(/; # exactly one space before ( and none after
s/\s*\)\s*/\)/; # no after before or after )
s/\s*\*([a-zA-Z])/\* $1/; # "* identifier"

View File

@ -34,6 +34,28 @@ if [ ! -d $1 ] ; then
grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp
mv tmp $1/GLX_EXT_visual_rating
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetBooleanIndexedvEXT but with different parameter names
grep -v glGetBooleanIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetIntegerIndexedvEXT but with different parameter names
grep -v glGetIntegerIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# remove duplicates from GL_NV_present_video and GLX_NV_present_video
grep -v -F -f $1/GLX_NV_present_video $1/GL_NV_present_video > tmp
mv tmp $1/GL_NV_present_video
# fix WGL_NV_present_video
cat >> $1/WGL_NV_present_video <<EOT
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
EOT
# fix WGL_NV_video_output
cat >> $1/WGL_NV_video_output <<EOT
DECLARE_HANDLE(HPVIDEODEV);
EOT
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
grep -v '_HP' $1/GL_NV_occlusion_query > tmp
mv tmp $1/GL_NV_occlusion_query
@ -60,6 +82,13 @@ if [ ! -d $1 ] ; then
GL_SWIZZLE_STRQ_DQ_ATI 0x897B
EOT
# add deprecated constants to GL_NV_texture_shader
cat >> $1/GL_NV_texture_shader <<EOT
GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
EOT
# fix WGL_ATI_pixel_format_float
cat >> $1/WGL_ATI_pixel_format_float <<EOT
GL_RGBA_FLOAT_MODE_ATI 0x8820
@ -156,6 +185,18 @@ EOT
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_EXT_direct_state_access
grep -v "glGetBooleanIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glGetIntegerIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glDisableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glEnableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glIsEnabledIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# fix bugs in GL_ARB_vertex_shader
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader

View File

@ -12,7 +12,3 @@ SGIX/video_source.txt
SGIX/hyperpipe_group.txt
OES/fixed_point.txt
OES/query_matrix.txt
NV/present_video.txt
NV/wgl_video_out.txt
EXT/draw_buffers2.txt
EXT/transform_feedback.txt

View File

@ -118,6 +118,7 @@ typedef _W64 int ptrdiff_t;
*/
#include <stddef.h>
#include <stdint.h>
#define GLEW_APIENTRY_DEFINED
#define APIENTRY
@ -166,17 +167,21 @@ typedef float GLclampf;
typedef double GLdouble;
typedef double GLclampd;
typedef void GLvoid;
#if defined(_MSC_VER) && _MSC_VER < 1400
#if defined(_MSC_VER)
# if _MSC_VER < 1400
typedef __int64 GLint64EXT;
typedef unsigned __int64 GLuint64EXT;
#elif defined(__MINGW32__)
#include <inttypes.h>
typedef int64_t GLint64EXT;
typedef uint64_t GLuint64EXT;
# else
typedef signed long long GLint64EXT;
typedef unsigned long long GLuint64EXT;
# endif
#else
# if defined(__MINGW32__)
#include <inttypes.h>
# endif
typedef int64_t GLint64EXT;
typedef uint64_t GLuint64EXT;
#endif
#define GL_ACCUM 0x0100
#define GL_LOAD 0x0101

View File

@ -60,6 +60,8 @@ typedef struct __glXContextRec *GLXContext;
typedef struct __GLXcontextRec *GLXContext;
#endif
typedef unsigned int GLXVideoDeviceNV;
extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);