diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..44b8952 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* eol=lf +*.png binary +build/* eol=crlf diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b17b42a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,82 @@ +project(GLEW) +cmake_minimum_required(VERSION 2.4) + +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +endif(COMMAND cmake_policy) + +set(GLEW_VERSION "1.11.0") + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(GLEW_LIB_NAME glew32) +else(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(GLEW_LIB_NAME GLEW) + set(DLL_PREFIX lib) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +# +# All platforms need OpenGL +# + +include(FindPkgConfig) +pkg_check_modules( OpenGL REQUIRED gl ) + +# +# Linux needs X11 +# + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + find_package(X11 REQUIRED) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +set(CMAKE_C_FLAGS "${CFLAGS} ${CMAKE_C_FLAGS} -DGLEW_BUILD -DGLEW_NO_GLU -O2 -Wall -W" ) + +include_directories( ${PROJECT_SOURCE_DIR}/include ) + +add_library(GLEW_static STATIC src/glew.c ) +add_library(GLEW_shared SHARED src/glew.c ) +set_target_properties(GLEW_static PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME} PREFIX lib) +set_target_properties(GLEW_shared PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME} PREFIX "${DLL_PREFIX}") +target_link_libraries(GLEW_shared ${OpenGL_LDFLAGS}) + +add_library(GLEW_MX_static STATIC src/glew.c ) +add_library(GLEW_MX_shared SHARED src/glew.c ) +set_target_properties(GLEW_MX_static PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME}mx COMPILE_FLAGS "-DGLEW_MX" PREFIX lib) +set_target_properties(GLEW_MX_shared PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME}mx COMPILE_FLAGS "-DGLEW_MX" PREFIX "${DLL_PREFIX}") +target_link_libraries(GLEW_MX_shared ${OpenGL_LDFLAGS}) + +add_executable(glewinfo src/glewinfo.c) +target_link_libraries(glewinfo GLEW_shared ${OpenGL_LDFLAGS}) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(glewinfo ${X11_LIBRARIES}) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +add_executable(visualinfo src/visualinfo.c) +target_link_libraries(visualinfo GLEW_shared ${OpenGL_LDFLAGS}) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(visualinfo ${X11_LIBRARIES}) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +install( + TARGETS + GLEW_static + GLEW_shared + GLEW_MX_static + GLEW_MX_shared + glewinfo + visualinfo + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(CODE "execute_process( COMMAND bash -x -c \"sed -e 's%@prefix@%${CMAKE_INSTALL_PREFIX}%g' -e 's%@exec_prefix@%\\\${prefix}%g' -e 's%@libdir@%\\\${prefix}/lib%g' -e 's%@includedir@%\\\${prefix}/include%g' -e 's/\@version\@/${GLEW_VERSION}/g' -e 's/\@cflags\@//g' -e 's/\@libname\@/${GLEW_LIB_NAME}/g' -e 's|@requireslib@|glu|g' < ${CMAKE_SOURCE_DIR}/glew.pc.in > ${CMAKE_BINARY_DIR}/glew.pc\" )" ) +install(CODE "execute_process( COMMAND bash -x -c \"sed -e 's%@prefix@%${CMAKE_INSTALL_PREFIX}%g' -e 's%@exec_prefix@%\\\${prefix}%g' -e 's%@libdir@%\\\${prefix}/lib%g' -e 's%@includedir@%\\\${prefix}/include%g' -e 's/\@version\@/${GLEW_VERSION}/g' -e 's/\@cflags\@/-DGLEW_MX/g' -e 's/\@libname\@/${GLEW_LIB_NAME}mx/g' -e 's|@requireslib@|glu|g' < ${CMAKE_SOURCE_DIR}/glew.pc.in > ${CMAKE_BINARY_DIR}/glewmx.pc\" )" ) + +install(FILES ${CMAKE_BINARY_DIR}/glew.pc ${CMAKE_BINARY_DIR}/glewmx.pc DESTINATION lib/pkgconfig) diff --git a/Makefile b/Makefile index 140f03a..6a9803c 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wgl tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h @mkdir -p $(dir $@) - $(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< + $(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< # Force re-write of glew.pc, GLEW_DEST can vary @@ -166,7 +166,7 @@ tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h @mkdir -p $(dir $@) - $(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< + $(CC) -DGLEW_NO_GLU -DGLEW_MX -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< # Force re-write of glewmx.pc, GLEW_DEST can vary diff --git a/README.txt b/README.txt index a609a15..ae0be24 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,8 @@ +GLEW - The OpenGL Extension Wrangler Library + + http://glew.sourceforge.net/ + https://github.com/nigels-com/glew + See doc/index.html for more information. If you downloaded the tarball from the GLEW website, you just need to: @@ -5,16 +10,16 @@ If you downloaded the tarball from the GLEW website, you just need to: Unix: make - + sudo -s - + make install - + make clean Windows: - use the project file in build/vc6/ + use the project file in build/vc12/ If you wish to build GLEW from scratch (update the extension data from the net or add your own extension information), you need a Unix @@ -22,3 +27,8 @@ environment (including wget, perl, and GNU make). The extension data is regenerated from the top level source directory with: make extensions + +An alternative to generating the GLEW sources from scratch is to +download a pre-generated (unsupported) snapshot: + + https://sourceforge.net/projects/glew/files/glew/snapshots/ diff --git a/auto/bin/filter_gl_ext.sh b/auto/bin/filter_gl_ext.sh index 4d2c2ed..72fde80 100755 --- a/auto/bin/filter_gl_ext.sh +++ b/auto/bin/filter_gl_ext.sh @@ -490,5 +490,21 @@ EOT grep -v 'glBlendBarrierKHR' $1/GL_KHR_blend_equation_advanced_coherent > tmp mv tmp $1/GL_KHR_blend_equation_advanced_coherent +# Filter out GL_NONE enum from GL_KHR_robustness + grep -v 'GL_NONE' $1/GL_KHR_context_flush_control > tmp + mv tmp $1/GL_KHR_context_flush_control + +# Filter out CoverageModulation from NV_framebuffer_mixed_samples +# Superset of EXT_raster_multisample + + grep -v "CoverageModulation" $1/GL_NV_framebuffer_mixed_samples > tmp + mv tmp $1/GL_NV_framebuffer_mixed_samples + +# Filter out glRasterSamplesEXT from NV_framebuffer_mixed_samples +# Superset of EXT_raster_multisample + + grep -v "RasterSamplesEXT" $1/GL_NV_framebuffer_mixed_samples > tmp + mv tmp $1/GL_NV_framebuffer_mixed_samples + # clean up rm -f $1/*.bak diff --git a/auto/bin/make.pl b/auto/bin/make.pl index 83bb774..1bd5d40 100755 --- a/auto/bin/make.pl +++ b/auto/bin/make.pl @@ -156,7 +156,11 @@ sub output_tokens($$) if (${$tbl}{$b} =~ /_/) { 1 } else { - hex ${$tbl}{$a} <=> hex ${$tbl}{$b} + if (hex ${$tbl}{$a} eq hex ${$tbl}{$b}) { + $a cmp $b + } else { + hex ${$tbl}{$a} <=> hex ${$tbl}{$b} + } } } } diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index 8824af6..00fdde9 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -20,7 +20,7 @@ my @sections = ( "Name", "Name Strings?", "New Procedures and Functions", - "New Tokens", + "New Tokens.*", # Optional (GL/WGL/GLX/...) suffix "Additions to Chapter.*", ); @@ -350,7 +350,12 @@ foreach my $spec (sort @speclist) if (${$tokens}{$b} =~ /_/) { 1 } else { - hex ${$tokens}{$a} <=> hex ${$tokens}{$b} + if (hex ${$tokens}{$a} eq hex ${$tokens}{$b}) + { + $a cmp $b + } else { + hex ${$tokens}{$a} <=> hex ${$tokens}{$b} + } } } } diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index 9ba9c74..e990a21 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -19,7 +19,7 @@ if [ ! -d $1 ] ; then mkdir -p $1 # Parse each of the extensions in the registry - find $2 -name doc -type d -prune -o -name \*.txt -print | \ + find $2 -name doc -type d -prune -o -name "*.txt" -print | \ grep -v -f $3 | sort | bin/parse_spec.pl $1 fi diff --git a/auto/core/gl/GL_NV_path_rendering b/auto/core/gl/GL_NV_path_rendering deleted file mode 100644 index e884288..0000000 --- a/auto/core/gl/GL_NV_path_rendering +++ /dev/null @@ -1,180 +0,0 @@ -GL_NV_path_rendering -http://www.opengl.org/registry/specs/NV/path_rendering.txt -GL_NV_path_rendering - GL_CLOSE_PATH_NV 0x00 - GL_BOLD_BIT_NV 0x01 - GL_GLYPH_WIDTH_BIT_NV 0x01 - GL_GLYPH_HEIGHT_BIT_NV 0x02 - GL_ITALIC_BIT_NV 0x02 - GL_MOVE_TO_NV 0x02 - GL_RELATIVE_MOVE_TO_NV 0x03 - GL_LINE_TO_NV 0x04 - GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 - GL_RELATIVE_LINE_TO_NV 0x05 - GL_HORIZONTAL_LINE_TO_NV 0x06 - GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 - GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 - GL_VERTICAL_LINE_TO_NV 0x08 - GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 - GL_QUADRATIC_CURVE_TO_NV 0x0A - GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B - GL_CUBIC_CURVE_TO_NV 0x0C - GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D - GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E - GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F - GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 - GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 - GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 - GL_SMALL_CCW_ARC_TO_NV 0x12 - GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 - GL_SMALL_CW_ARC_TO_NV 0x14 - GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 - GL_LARGE_CCW_ARC_TO_NV 0x16 - GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 - GL_LARGE_CW_ARC_TO_NV 0x18 - GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 - GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 - GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 - GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 - GL_RESTART_PATH_NV 0xF0 - GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 - GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 - GL_RECT_NV 0xF6 - GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 - GL_CIRCULAR_CW_ARC_TO_NV 0xFA - GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC - GL_ARC_TO_NV 0xFE - GL_RELATIVE_ARC_TO_NV 0xFF - GL_GLYPH_HAS_KERNING_BIT_NV 0x100 - GL_PRIMARY_COLOR 0x8577 - GL_PATH_FORMAT_SVG_NV 0x9070 - GL_PATH_FORMAT_PS_NV 0x9071 - GL_STANDARD_FONT_NAME_NV 0x9072 - GL_SYSTEM_FONT_NAME_NV 0x9073 - GL_FILE_NAME_NV 0x9074 - GL_PATH_STROKE_WIDTH_NV 0x9075 - GL_PATH_END_CAPS_NV 0x9076 - GL_PATH_INITIAL_END_CAP_NV 0x9077 - GL_PATH_TERMINAL_END_CAP_NV 0x9078 - GL_PATH_JOIN_STYLE_NV 0x9079 - GL_PATH_MITER_LIMIT_NV 0x907A - GL_PATH_DASH_CAPS_NV 0x907B - GL_PATH_INITIAL_DASH_CAP_NV 0x907C - GL_PATH_TERMINAL_DASH_CAP_NV 0x907D - GL_PATH_DASH_OFFSET_NV 0x907E - GL_PATH_CLIENT_LENGTH_NV 0x907F - GL_PATH_FILL_MODE_NV 0x9080 - GL_PATH_FILL_MASK_NV 0x9081 - GL_PATH_FILL_COVER_MODE_NV 0x9082 - GL_PATH_STROKE_COVER_MODE_NV 0x9083 - GL_PATH_STROKE_MASK_NV 0x9084 - GL_COUNT_UP_NV 0x9088 - GL_COUNT_DOWN_NV 0x9089 - GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A - GL_CONVEX_HULL_NV 0x908B - GL_BOUNDING_BOX_NV 0x908D - GL_TRANSLATE_X_NV 0x908E - GL_TRANSLATE_Y_NV 0x908F - GL_TRANSLATE_2D_NV 0x9090 - GL_TRANSLATE_3D_NV 0x9091 - GL_AFFINE_2D_NV 0x9092 - GL_AFFINE_3D_NV 0x9094 - GL_TRANSPOSE_AFFINE_2D_NV 0x9096 - GL_TRANSPOSE_AFFINE_3D_NV 0x9098 - GL_UTF8_NV 0x909A - GL_UTF16_NV 0x909B - GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C - GL_PATH_COMMAND_COUNT_NV 0x909D - GL_PATH_COORD_COUNT_NV 0x909E - GL_PATH_DASH_ARRAY_COUNT_NV 0x909F - GL_PATH_COMPUTED_LENGTH_NV 0x90A0 - GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 - GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 - GL_SQUARE_NV 0x90A3 - GL_ROUND_NV 0x90A4 - GL_TRIANGULAR_NV 0x90A5 - GL_BEVEL_NV 0x90A6 - GL_MITER_REVERT_NV 0x90A7 - GL_MITER_TRUNCATE_NV 0x90A8 - GL_SKIP_MISSING_GLYPH_NV 0x90A9 - GL_USE_MISSING_GLYPH_NV 0x90AA - GL_PATH_ERROR_POSITION_NV 0x90AB - GL_PATH_FOG_GEN_MODE_NV 0x90AC - GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD - GL_ADJACENT_PAIRS_NV 0x90AE - GL_FIRST_TO_REST_NV 0x90AF - GL_PATH_GEN_MODE_NV 0x90B0 - GL_PATH_GEN_COEFF_NV 0x90B1 - GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 - GL_PATH_GEN_COMPONENTS_NV 0x90B3 - GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 - GL_MOVE_TO_RESETS_NV 0x90B5 - GL_MOVE_TO_CONTINUES_NV 0x90B6 - GL_PATH_STENCIL_FUNC_NV 0x90B7 - GL_PATH_STENCIL_REF_NV 0x90B8 - GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 - GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD - GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE - GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF - GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 - GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 - GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 - GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 - GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 - GL_FONT_ASCENDER_BIT_NV 0x00200000 - GL_FONT_DESCENDER_BIT_NV 0x00400000 - GL_FONT_HEIGHT_BIT_NV 0x00800000 - GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 - GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 - GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 - GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 - GL_FONT_HAS_KERNING_BIT_NV 0x10000000 - void glCopyPathNV (GLuint resultPath, GLuint srcPath) - void glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues) - void glCoverFillPathNV (GLuint path, GLenum coverMode) - void glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues) - void glCoverStrokePathNV (GLuint name, GLenum coverMode) - void glDeletePathsNV (GLuint path, GLsizei range) - GLuint glGenPathsNV (GLsizei range) - void glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat* value) - void glGetPathColorGenivNV (GLenum color, GLenum pname, GLint* value) - void glGetPathCommandsNV (GLuint name, GLubyte* commands) - void glGetPathCoordsNV (GLuint name, GLfloat* coords) - void glGetPathDashArrayNV (GLuint name, GLfloat* dashArray) - GLfloat glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments) - void glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint fistPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics) - void glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLsizei stride, GLfloat *metrics) - void glGetPathParameterfvNV (GLuint name, GLenum param, GLfloat* value) - void glGetPathParameterivNV (GLuint name, GLenum param, GLint* value) - void glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing) - void glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat* value) - void glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint* value) - void glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight) - GLboolean glIsPathNV (GLuint path) - GLboolean glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y) - GLboolean glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y) - void glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs) - void glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void*coords) - void glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void* coords) - void glPathCoverDepthFuncNV (GLenum zfunc) - void glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat* dashArray) - void glPathFogGenNV (GLenum genMode) - void glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) - void glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void*charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) - void glPathParameterfNV (GLuint path, GLenum pname, GLfloat value) - void glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat* value) - void glPathParameteriNV (GLuint path, GLenum pname, GLint value) - void glPathParameterivNV (GLuint path, GLenum pname, const GLint* value) - void glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units) - void glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask) - void glPathStringNV (GLuint path, GLenum format, GLsizei length, const void* pathString) - void glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void*coords) - void glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void* coords) - void glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs) - GLboolean glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat* x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY) - void glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues) - void glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask) - void glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues) - void glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask) - void glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat* transformValues) - void glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint paths[], const GLfloat weights[]) diff --git a/auto/core/gl/GL_VERSION_4_2 b/auto/core/gl/GL_VERSION_4_2 index fa75117..c94737a 100644 --- a/auto/core/gl/GL_VERSION_4_2 +++ b/auto/core/gl/GL_VERSION_4_2 @@ -1,6 +1,8 @@ GL_VERSION_4_2 https://www.opengl.org/registry/doc/glspec42.compatibility.20120427.pdf + GL_COPY_READ_BUFFER_BINDING 0x8F36 + GL_COPY_WRITE_BUFFER_BINDING 0x8F37 GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E diff --git a/auto/doc/index.html b/auto/doc/index.html index 7181882..a6a3d2d 100644 --- a/auto/doc/index.html +++ b/auto/doc/index.html @@ -60,9 +60,9 @@ An up-to-date copy is also available using git Unsupported snapshots are also available:

Supported Extensions

diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index 9f0a009..e945bcd 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -211,7 +211,7 @@ static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n) return i == n ? GL_TRUE : GL_FALSE; } -static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame1 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t')) { @@ -232,7 +232,7 @@ static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuin return GL_FALSE; } -static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame2 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { if(*na >= nb) { @@ -248,7 +248,7 @@ static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuin return GL_FALSE; } -static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame3 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { if(*na >= nb) { diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index 28dec07..7969a9c 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -2,7 +2,7 @@ #define __glew_h__ #define __GLEW_H__ -#if defined(__gl_h_) || defined(__GL_H__) || defined(__X_GL_H) +#if defined(__gl_h_) || defined(__GL_H__) || defined(_GL_H) || defined(__X_GL_H) #error gl.h included before glew.h #endif #if defined(__gl2_h_) @@ -24,6 +24,7 @@ #define __gl_h_ #define __gl2_h_ #define __GL_H__ +#define _GL_H #define __gltypes_h_ #define __REGAL_H__ #define __X_GL_H diff --git a/auto/src/glew_str_glx.c b/auto/src/glew_str_glx.c index 1db8d3a..e841475 100644 --- a/auto/src/glew_str_glx.c +++ b/auto/src/glew_str_glx.c @@ -12,7 +12,7 @@ GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name) GLboolean glxewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/auto/src/glew_str_head.c b/auto/src/glew_str_head.c index ebeb48d..1e8d963 100644 --- a/auto/src/glew_str_head.c +++ b/auto/src/glew_str_head.c @@ -4,7 +4,7 @@ GLboolean GLEWAPIENTRY glewContextIsSupported (const GLEWContext* ctx, const cha GLboolean GLEWAPIENTRY glewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/auto/src/glew_str_wgl.c b/auto/src/glew_str_wgl.c index 20552bd..5463ef7 100644 --- a/auto/src/glew_str_wgl.c +++ b/auto/src/glew_str_wgl.c @@ -12,7 +12,7 @@ GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext* ctx, const c GLboolean GLEWAPIENTRY wglewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/config/Makefile.cygming b/config/Makefile.cygming index afdd851..a356c5c 100644 --- a/config/Makefile.cygming +++ b/config/Makefile.cygming @@ -7,7 +7,6 @@ INCDIR = /usr/include/mingw/GL CC := gcc -mno-cygwin LD := gcc -mno-cygwin LN := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L$(LIBDIR) WARN = -Wall -W @@ -16,10 +15,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux b/config/Makefile.linux index b460b4b..55e4a23 100644 --- a/config/Makefile.linux +++ b/config/Makefile.linux @@ -23,6 +23,7 @@ NAME = GLEW WARN = -Wall -W POPT = -O2 CFLAGS.EXTRA += -fPIC +CFLAGS.EXTRA += -Wcast-qual BIN.SUFFIX = LIB.SONAME = lib$(NAME).so.$(SO_MAJOR) LIB.DEVLNK = lib$(NAME).so diff --git a/config/Makefile.linux-mingw-w64 b/config/Makefile.linux-mingw-w64 new file mode 100644 index 0000000..bedf166 --- /dev/null +++ b/config/Makefile.linux-mingw-w64 @@ -0,0 +1,25 @@ +# For cross-compiling from Linux to Windows x86 using mingw-w64 +# http://mingw-w64.sourceforge.net/ +# +# $ make SYSTEM=linux-mingw-w64 +# + +NAME := glew32 +CC := i686-w64-mingw32-gcc +LD := i686-w64-mingw32-ld +LN := +STRIP := +LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 +WARN = -Wall -W +POPT = -O2 +BIN.SUFFIX = .exe +LIB.SONAME = lib$(NAME).dll +LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib +LIB.SHARED = $(NAME).dll +LIB.STATIC = lib$(NAME).a # the static lib will be broken +LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) +LIB.SONAME.MX = lib$(NAME)mx.dll +LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib +LIB.SHARED.MX = $(NAME)mx.dll +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken +LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw32 b/config/Makefile.linux-mingw32 index d9573a7..fdb2239 100644 --- a/config/Makefile.linux-mingw32 +++ b/config/Makefile.linux-mingw32 @@ -5,11 +5,11 @@ # NAME := glew32 -CC := i586-mingw32msvc-gcc -LD := i586-mingw32msvc-ld +HOST := i586-mingw32msvc +CC := $(HOST)-gcc +LD := $(HOST)-ld LN := STRIP := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 @@ -17,10 +17,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.linux-mingw64 b/config/Makefile.linux-mingw64 index 6093351..0e19f6c 100644 --- a/config/Makefile.linux-mingw64 +++ b/config/Makefile.linux-mingw64 @@ -5,11 +5,11 @@ # NAME := glew32 -CC := amd64-mingw32msvc-gcc -LD := amd64-mingw32msvc-ld +HOST := i686-w64-mingw32 +CC := $(HOST)-gcc +LD := $(HOST)-ld LN := STRIP := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 WARN = -Wall -W POPT = -O2 @@ -17,10 +17,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX) diff --git a/config/Makefile.mingw b/config/Makefile.mingw index e74fd3c..f1fb194 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -3,7 +3,6 @@ NAME = glew32 CC := gcc LD := gcc LN := -CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L/mingw/lib WARN = -Wall -W @@ -12,10 +11,10 @@ BIN.SUFFIX = .exe LIB.SONAME = lib$(NAME).dll LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll -LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC = lib$(NAME).a # the static lib will be broken LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll -LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) +LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)