mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-11 09:33:49 +00:00
shader objects const bug fix
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@206 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
ce957e19b2
commit
d4ea803270
@ -58,11 +58,11 @@ endif
|
||||
$(I.DEST)/glew.h: $(EXT)/.dummy
|
||||
test -d $(I.DEST) || mkdir -p $(I.DEST)
|
||||
cp -f $(SRC)/glew_pre.h $@
|
||||
$(BIN)/make_header_def.pl GLAPIENTRY GL $(CORE)/GL_VERSION* >> $@
|
||||
$(BIN)/make_header.pl GLAPIENTRY GL $(CORE)/GL_VERSION* >> $@
|
||||
# mv $@ tmp; grep -v 'PFNGLBLENDCOLORPROC' tmp | \
|
||||
# grep -v 'PFNGLBLENDEQUATIONPROC' | grep -v 'glBlendColor' | \
|
||||
# grep -v 'glBlendEquation' > $@; rm tmp;
|
||||
$(BIN)/make_header_def.pl GLAPIENTRY GL $(EXT)/GL_* >> $@
|
||||
$(BIN)/make_header.pl GLAPIENTRY GL $(EXT)/GL_* >> $@
|
||||
$(BIN)/make_struct.pl GL $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@
|
||||
perl -e 's/ GLboolean __GLEW_VERSION_1_2;/\n GLboolean __GLEW_VERSION_1_1;\n GLboolean __GLEW_VERSION_1_2;/' -pi.bak $@
|
||||
rm -f $@.bak
|
||||
@ -70,7 +70,7 @@ $(I.DEST)/glew.h: $(EXT)/.dummy
|
||||
|
||||
$(I.DEST)/wglew.h: $(EXT)/.dummy
|
||||
cp -f $(SRC)/wglew_pre.h $@
|
||||
$(BIN)/make_header_def.pl WINAPI WGL $(EXT)/WGL_* >> $@
|
||||
$(BIN)/make_header.pl WINAPI WGL $(EXT)/WGL_* >> $@
|
||||
$(BIN)/make_struct.pl WGL $(EXT)/WGL_* >> $@
|
||||
cat $(SRC)/wglew_post.h >> $@
|
||||
|
||||
|
@ -37,17 +37,14 @@ if [ ! -d $1 ] ; then
|
||||
# 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
|
||||
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi.bak \
|
||||
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
|
||||
$1/GL_HP_occlusion_test
|
||||
rm -f $1/GL_HP_occlusion_test.bak
|
||||
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi.bak \
|
||||
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
|
||||
$1/GL_HP_occlusion_test
|
||||
rm -f $1/GL_HP_occlusion_test.bak
|
||||
|
||||
# fix GLvoid in GL_ARB_vertex_buffer_objects
|
||||
perl -e 's/ void\*/ GLvoid\*/g' -pi.bak \
|
||||
perl -e 's/ void\*/ GLvoid\*/g' -pi \
|
||||
$1/GL_ARB_vertex_buffer_object
|
||||
rm -f $1/GL_ARB_vertex_buffer_object.bak
|
||||
|
||||
# fix WGL_ATI_pixel_format_float
|
||||
cat >> $1/WGL_ATI_pixel_format_float <<EOT
|
||||
@ -111,14 +108,10 @@ EOT
|
||||
rm -f $1/GL_SUN_multi_draw_arrays
|
||||
|
||||
# change variable names in GL_ARB_vertex_shader
|
||||
perl -e 's/v0/x/g' -pi.bak $1/GL_ARB_vertex_shader
|
||||
rm -f $1/GL_ARB_vertex_shader.bak
|
||||
perl -e 's/v1/y/g' -pi.bak $1/GL_ARB_vertex_shader
|
||||
rm -f $1/GL_ARB_vertex_shader.bak
|
||||
perl -e 's/v2/z/g' -pi.bak $1/GL_ARB_vertex_shader
|
||||
rm -f $1/GL_ARB_vertex_shader.bak
|
||||
perl -e 's/v3/w/g' -pi.bak $1/GL_ARB_vertex_shader
|
||||
rm -f $1/GL_ARB_vertex_shader.bak
|
||||
perl -e 's/v0/x/g' -pi $1/GL_ARB_vertex_shader
|
||||
perl -e 's/v1/y/g' -pi $1/GL_ARB_vertex_shader
|
||||
perl -e 's/v2/z/g' -pi $1/GL_ARB_vertex_shader
|
||||
perl -e 's/v3/w/g' -pi $1/GL_ARB_vertex_shader
|
||||
|
||||
# remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader,
|
||||
# and GL_ARB_vertex_shader
|
||||
@ -141,8 +134,7 @@ EOT
|
||||
# fix bugs in GL_ARB_vertex_shader
|
||||
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp
|
||||
mv tmp $1/GL_ARB_vertex_shader
|
||||
perl -e 's/handle /GLhandleARB /g' -pi.bak $1/GL_ARB_vertex_shader
|
||||
rm -f $1/GL_ARB_vertex_shader.bak
|
||||
perl -e 's/handle /GLhandleARB /g' -pi $1/GL_ARB_vertex_shader
|
||||
|
||||
# fix bugs in GL_ARB_shader_objects
|
||||
grep -v "GL_FLOAT " $1/GL_ARB_shader_objects > tmp
|
||||
@ -157,5 +149,9 @@ EOT
|
||||
EOT
|
||||
|
||||
# fix const correctness in GL_ARB_shader_objects
|
||||
perl -e 's/(.+glUniform.*(fv|iv).+)(GLfloat\*.+|GLint\*.+)/\1const \3/;' -pi $1/GL_ARB_shader_objects
|
||||
|
||||
# clean up
|
||||
rm -f $1/*.bak
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user