mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 16:41:57 +00:00
added support for GL_ARB_vertex_shader, GL_ARB_fragment_shader, and GL_ARB_shader_objects
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@132 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
c3bf8d8370
commit
32a42fe06a
@ -45,7 +45,7 @@ my %typemap = (
|
||||
ushort => "GLushort",
|
||||
DMbuffer => "void *",
|
||||
|
||||
# ARB VBO introduces this, no idea how to handle it properly. The spec
|
||||
# ARB VBO introduces these, no idea how to handle them properly. The spec
|
||||
# file babbles about how great this will be on 64 bit systems, but doesn't
|
||||
# actually say how to define this nor how to detect that this has been
|
||||
# defined (i.e., is this tied to the VBO spec or not?). For now I'll just
|
||||
@ -54,6 +54,11 @@ my %typemap = (
|
||||
sizeiptrARB => "GLsizeiptrARB",
|
||||
intptrARB => "GLintptrARB",
|
||||
|
||||
# ARB shader objects introduces these, charARB is at least 8 bits,
|
||||
# handleARB is at least 32 bits
|
||||
charARB => "GLcharARB",
|
||||
handleARB => "GLhandleARB",
|
||||
|
||||
# GLX 1.3 defines new types which might not be available at compile time
|
||||
|
||||
#GLXFBConfig => "void*",
|
||||
|
@ -17,10 +17,10 @@ if [ ! -d $1 ] ; then
|
||||
grep -v EXT $1/GL_NV_texture_compression_vtc > tmp; \
|
||||
mv tmp $1/GL_NV_texture_compression_vtc
|
||||
# remove duplicates from GL_ARB_vertex_program and GL_ARB_fragment_program
|
||||
grep -v -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp; \
|
||||
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp; \
|
||||
mv tmp $1/GL_ARB_fragment_program
|
||||
# remove duplicates from GLX_EXT_visual_rating and GLX_EXT_visual_info
|
||||
grep -v -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp; \
|
||||
grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp; \
|
||||
mv tmp $1/GLX_EXT_visual_rating
|
||||
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
|
||||
grep -v '_HP' $1/GL_NV_occlusion_query > tmp; \
|
||||
@ -55,4 +55,37 @@ if [ ! -d $1 ] ; then
|
||||
echo -e "\tDECLARE_HANDLE(HPBUFFEREXT);" >> $1/WGL_EXT_pbuffer
|
||||
# get rid of GL_SUN_multi_draw_arrays
|
||||
rm -f $1/GL_SUN_multi_draw_arrays
|
||||
# change variable names in GL_ARB_vertex_shader
|
||||
sed -i -e 's/v0/x/g' $1/GL_ARB_vertex_shader
|
||||
sed -i -e 's/v1/y/g' $1/GL_ARB_vertex_shader
|
||||
sed -i -e 's/v2/z/g' $1/GL_ARB_vertex_shader
|
||||
sed -i -e 's/v3/w/g' $1/GL_ARB_vertex_shader
|
||||
# remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader,
|
||||
# and GL_ARB_vertex_shader
|
||||
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_fragment_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_fragment_shader
|
||||
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_vertex_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_vertex_shader
|
||||
# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader
|
||||
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_vertex_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_vertex_shader
|
||||
# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader,
|
||||
# and GL_ARB_vertex_shader
|
||||
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_fragment_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_fragment_shader
|
||||
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_vertex_shader
|
||||
# fix bugs in GL_ARB_vertex_shader
|
||||
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp; \
|
||||
mv tmp $1/GL_ARB_vertex_shader
|
||||
sed -i -e 's/handle /GLhandleARB /g' $1/GL_ARB_vertex_shader
|
||||
# fix bugs in GL_ARB_shader_objects
|
||||
grep -v "GL_FLOAT" $1/GL_ARB_shader_objects > tmp; \
|
||||
mv tmp $1/GL_ARB_shader_objects
|
||||
grep -v "GL_INT" $1/GL_ARB_shader_objects > tmp; \
|
||||
mv tmp $1/GL_ARB_shader_objects
|
||||
# add typedefs to GL_ARB_shader_objects
|
||||
echo -e "\ttypedef char GLcharARB" >> $1/GL_ARB_shader_objects
|
||||
echo -e "\ttypedef int GLhandleARB" >> $1/GL_ARB_shader_objects
|
||||
fi
|
||||
|
||||
|
@ -39,13 +39,15 @@
|
||||
#ifdef _WIN32
|
||||
# define glewGetProcAddress(name) wglGetProcAddress(name)
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
#else
|
||||
#ifdef __sgi
|
||||
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
#else /* __linux */
|
||||
# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
# ifdef __APPLE__
|
||||
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
# else
|
||||
# ifdef __sgi
|
||||
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
# else /* __linux */
|
||||
# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
Loading…
Reference in New Issue
Block a user