From 0ab71ffb6f7a20840166bb5e5f91d4d2abe682e2 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Wed, 20 Aug 2014 09:29:06 +1000
Subject: [PATCH 01/22] Use GL_NV_path_rendering spec (including version 1.3)
rather than hard-coded override.
---
auto/core/gl/GL_NV_path_rendering | 180 ------------------------------
1 file changed, 180 deletions(-)
delete mode 100644 auto/core/gl/GL_NV_path_rendering
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[])
From 1292204035f78a710906e6e79be537cdff850d4d Mon Sep 17 00:00:00 2001
From: BryceMehring
Date: Sat, 30 Aug 2014 04:06:58 -0500
Subject: [PATCH 02/22] Added support for mingw-w64 cross-compilation.
---
config/Makefile.linux-mingw-w64 | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 config/Makefile.linux-mingw-w64
diff --git a/config/Makefile.linux-mingw-w64 b/config/Makefile.linux-mingw-w64
new file mode 100644
index 0000000..95275cb
--- /dev/null
+++ b/config/Makefile.linux-mingw-w64
@@ -0,0 +1,26 @@
+# 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 :=
+CFLAGS.SO = -DGLEW_BUILD
+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 (see CFLAGS.SO)
+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)
+LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX)
From 26be54cb1abff53bc57423ced52c1f85534eedf1 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Thu, 18 Sep 2014 20:51:56 +1000
Subject: [PATCH 03/22] Fixups for GL_KHR_robustness support.
---
auto/bin/filter_gl_ext.sh | 4 ++++
auto/bin/parse_spec.pl | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/auto/bin/filter_gl_ext.sh b/auto/bin/filter_gl_ext.sh
index 4d2c2ed..9741e15 100755
--- a/auto/bin/filter_gl_ext.sh
+++ b/auto/bin/filter_gl_ext.sh
@@ -490,5 +490,9 @@ 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
+
# clean up
rm -f $1/*.bak
diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl
index 8824af6..df60ace 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.*",
);
From 0ab85a792d6e366a7d2d764a1db24bc73e0fea18 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Thu, 18 Sep 2014 21:12:32 +1000
Subject: [PATCH 04/22] For Pelles C compiler, _GL_H check
https://sourceforge.net/p/glew/bugs/254/
---
auto/src/glew_head.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h
index e3f6eb2..c5592e1 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
From 6b5f533a7a19f748f72c09024cf8a95b3389c6cd Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Thu, 18 Sep 2014 21:31:24 +1000
Subject: [PATCH 05/22] Update snapshots available for download
---
auto/doc/index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
From d04fd20cecd015ec2bfdf44230aef5151dc60248 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Sat, 27 Sep 2014 11:34:59 +1000
Subject: [PATCH 06/22] Touch-up: Sort the enums (tokens) in a stable manner
for consistency in include files.
---
auto/bin/parse_spec.pl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl
index df60ace..00fdde9 100755
--- a/auto/bin/parse_spec.pl
+++ b/auto/bin/parse_spec.pl
@@ -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}
+ }
}
}
}
From b9be4b6c9915420b0d2ecc3c20151402c7c1af18 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Sat, 27 Sep 2014 11:51:15 +1000
Subject: [PATCH 07/22] GLEW Bug #215 Readme - is wrong
https://sourceforge.net/p/glew/bugs/215/
---
README.txt | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.txt b/README.txt
index a609a15..c60fd18 100644
--- a/README.txt
+++ b/README.txt
@@ -4,6 +4,8 @@ If you downloaded the tarball from the GLEW website, you just need to:
Unix:
+ make extensions
+
make
sudo -s
@@ -14,7 +16,7 @@ If you downloaded the tarball from the GLEW website, you just need to:
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 +24,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/
From f796232672608c5ecfb30eab4c5183e6f2ac3dc9 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Sat, 27 Sep 2014 13:05:04 +1000
Subject: [PATCH 08/22] For mingw builds, define GLEW_BUILD unconditionally for
shared libs only.
---
Makefile | 4 ++--
config/Makefile.cygming | 5 ++---
config/Makefile.linux-mingw-w64 | 5 ++---
config/Makefile.linux-mingw32 | 5 ++---
config/Makefile.linux-mingw64 | 9 ++++-----
config/Makefile.mingw | 5 ++---
6 files changed, 14 insertions(+), 19 deletions(-)
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/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-mingw-w64 b/config/Makefile.linux-mingw-w64
index 95275cb..bedf166 100644
--- a/config/Makefile.linux-mingw-w64
+++ b/config/Makefile.linux-mingw-w64
@@ -9,7 +9,6 @@ CC := i686-w64-mingw32-gcc
LD := i686-w64-mingw32-ld
LN :=
STRIP :=
-CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
@@ -17,10 +16,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-mingw32 b/config/Makefile.linux-mingw32
index d9573a7..510e2a9 100644
--- a/config/Makefile.linux-mingw32
+++ b/config/Makefile.linux-mingw32
@@ -9,7 +9,6 @@ CC := i586-mingw32msvc-gcc
LD := i586-mingw32msvc-ld
LN :=
STRIP :=
-CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
@@ -17,10 +16,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..65c1949 100644
--- a/config/Makefile.linux-mingw64
+++ b/config/Makefile.linux-mingw64
@@ -5,11 +5,10 @@
#
NAME := glew32
-CC := amd64-mingw32msvc-gcc
-LD := amd64-mingw32msvc-ld
+CC := i686-w64-mingw32-gcc
+LD := i686-w64-mingw32-ld
LN :=
STRIP :=
-CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
@@ -17,10 +16,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)
From d99211a9d3c868de8ee182c95eab0510aceb18ab Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Mon, 6 Oct 2014 21:53:58 +1000
Subject: [PATCH 09/22] Filtering for GL_NV_framebuffer_mixed_samples extension
added.
---
auto/bin/filter_gl_ext.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/auto/bin/filter_gl_ext.sh b/auto/bin/filter_gl_ext.sh
index 9741e15..72fde80 100755
--- a/auto/bin/filter_gl_ext.sh
+++ b/auto/bin/filter_gl_ext.sh
@@ -494,5 +494,17 @@ EOT
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
From 3f4863982587de4ee2fdb819701752d37684728b Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Tue, 14 Oct 2014 19:24:49 +1000
Subject: [PATCH 10/22] Linux gcc 4.8 now builds clean with -Wcast-qual flag.
---
auto/src/glew_head.c | 6 +++---
auto/src/glew_str_glx.c | 2 +-
auto/src/glew_str_head.c | 2 +-
auto/src/glew_str_wgl.c | 2 +-
config/Makefile.linux | 1 +
5 files changed, 7 insertions(+), 6 deletions(-)
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_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.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
From bffebf81ccad326fade7e6d3bf1dec6779063b98 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Tue, 14 Oct 2014 19:33:04 +1000
Subject: [PATCH 11/22] Add web links to README.txt
---
README.txt | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/README.txt b/README.txt
index c60fd18..ae0be24 100644
--- a/README.txt
+++ b/README.txt
@@ -1,17 +1,20 @@
+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:
Unix:
- make extensions
-
make
-
+
sudo -s
-
+
make install
-
+
make clean
Windows:
From 933e322dd5c3e69063208d68f43c86e18d264a60 Mon Sep 17 00:00:00 2001
From: omniavinco
Date: Thu, 16 Oct 2014 23:46:52 +0900
Subject: [PATCH 12/22] Sort the enums in a stable manner
---
auto/bin/make.pl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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}
+ }
}
}
}
From 1682c7ae3e13d436fe06202322a3428c35926756 Mon Sep 17 00:00:00 2001
From: Frank Park
Date: Sun, 19 Oct 2014 01:54:39 -0400
Subject: [PATCH 13/22] Fixed a bug with shell script and added gitattributes
to prevent non-binary pulls
Cygwin was unable to filter the specs files using the blacklist due to
the argument in find was -name *.txt instead of -name "*.txt" .
Also, it is currently possible to pull under windows to result in CRLF
line endings in scripts and other source files that destroy the build.
.gitattributes were added to prevent non-binary pulls.
Both issues are fixed with this pull request.
---
.gitattributes | 1 +
auto/bin/update_ext.sh | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..2abb6ee
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* binary
\ No newline at end of file
diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh
index 9ba9c74..b27c8cf 100755
--- a/auto/bin/update_ext.sh
+++ b/auto/bin/update_ext.sh
@@ -19,7 +19,8 @@ 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
From a790eb8129c06257e239649e1d989aa8bc3acc55 Mon Sep 17 00:00:00 2001
From: Frank Park
Date: Sun, 19 Oct 2014 01:59:48 -0400
Subject: [PATCH 14/22] Fixed a bug with shell script and added .gitattributes
Update_ext.sh does not utilize the blacklist correctly with cygwin due
to the argument -name in find is not quoted. Argument *.txt has been
changed to "*.txt" to fix the issue.
Also, it is currently possible for windows users to pull the repo in
CRLF format which destroys the scripts and source files. .gitattributes
were added to prevent this issue.
---
.gitattributes | 1 +
auto/bin/update_ext.sh | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..239111c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* eol=lf
\ No newline at end of file
diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh
index 9ba9c74..b27c8cf 100755
--- a/auto/bin/update_ext.sh
+++ b/auto/bin/update_ext.sh
@@ -19,7 +19,8 @@ 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
From 62f3c733f1f71b7b1bb8c37a645c2d246d03d883 Mon Sep 17 00:00:00 2001
From: Frank Park
Date: Sun, 19 Oct 2014 02:03:49 -0400
Subject: [PATCH 15/22] Ignored png and vs projects in gitattributes
---
.gitattributes | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitattributes b/.gitattributes
index 239111c..f6d5475 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,3 @@
-* eol=lf
\ No newline at end of file
+* eol=lf
+*.png binary
+build/ binary
From e400e097eaf7ca031adbc9ef9264a1690ebef1ba Mon Sep 17 00:00:00 2001
From: Frank Park
Date: Sun, 19 Oct 2014 02:04:50 -0400
Subject: [PATCH 16/22] Fixed .gitattributes
---
.gitattributes | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitattributes b/.gitattributes
index f6d5475..1880ba5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
* eol=lf
*.png binary
-build/ binary
+build/* binary
From ff92992cc5c680d2cb495c99c6851ef9b18cbb97 Mon Sep 17 00:00:00 2001
From: Frank Park
Date: Sun, 19 Oct 2014 02:07:45 -0400
Subject: [PATCH 17/22] Fixed .gitattributes
---
.gitattributes | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitattributes b/.gitattributes
index 1880ba5..30af41a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
* eol=lf
*.png binary
-build/* binary
+build/* eol=crlf
From d32f4278e280c80e2104a38bea48cb0e25d3e269 Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Fri, 24 Oct 2014 21:03:11 +1000
Subject: [PATCH 18/22] Tidy-up for .gitattributes and update_ext.sh
---
.gitattributes | 6 +++---
auto/bin/update_ext.sh | 3 +--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index 30af41a..44b8952 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
-* eol=lf
-*.png binary
-build/* eol=crlf
+* eol=lf
+*.png binary
+build/* eol=crlf
diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh
index b27c8cf..e990a21 100755
--- a/auto/bin/update_ext.sh
+++ b/auto/bin/update_ext.sh
@@ -19,8 +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
From 765b219893416dd0535a7a5326ae7d26ed94ee78 Mon Sep 17 00:00:00 2001
From: Togo Nishigaki
Date: Tue, 4 Nov 2014 09:37:00 +0900
Subject: [PATCH 19/22] improved config/Makefile.linux-mingw* to support any
host easily
---
config/Makefile.linux-mingw32 | 5 +++--
config/Makefile.linux-mingw64 | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/config/Makefile.linux-mingw32 b/config/Makefile.linux-mingw32
index 510e2a9..fdb2239 100644
--- a/config/Makefile.linux-mingw32
+++ b/config/Makefile.linux-mingw32
@@ -5,8 +5,9 @@
#
NAME := glew32
-CC := i586-mingw32msvc-gcc
-LD := i586-mingw32msvc-ld
+HOST := i586-mingw32msvc
+CC := $(HOST)-gcc
+LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
diff --git a/config/Makefile.linux-mingw64 b/config/Makefile.linux-mingw64
index 65c1949..0e19f6c 100644
--- a/config/Makefile.linux-mingw64
+++ b/config/Makefile.linux-mingw64
@@ -5,8 +5,9 @@
#
NAME := glew32
-CC := i686-w64-mingw32-gcc
-LD := i686-w64-mingw32-ld
+HOST := i686-w64-mingw32
+CC := $(HOST)-gcc
+LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
From 8b138bcd46a13b212f4121b2162d442842eec05f Mon Sep 17 00:00:00 2001
From: Togo Nishigaki
Date: Sun, 9 Nov 2014 22:25:45 +0900
Subject: [PATCH 20/22] added CMakeLists.txt
---
CMakeLists.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..e302989
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,59 @@
+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")
+
+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")
+
+include(FindPkgConfig)
+pkg_check_modules( OpenGL REQUIRED gl )
+
+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})
+
+add_executable(visualinfo src/visualinfo.c)
+target_link_libraries(visualinfo GLEW_shared ${OpenGL_LDFLAGS})
+
+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)
From 404df2ee70b3664ac4e417682bbf7ec43a505f5e Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Mon, 1 Dec 2014 20:13:15 +1000
Subject: [PATCH 21/22] cmake build on Linux needs to link X11
---
CMakeLists.txt | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e302989..b17b42a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,9 +5,12 @@ 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")
@@ -15,9 +18,21 @@ else(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
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 )
@@ -37,9 +52,17 @@ 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
From f1eae16bb89f54b60d8c25ba5578f4026f42785d Mon Sep 17 00:00:00 2001
From: Nigel Stewart
Date: Thu, 11 Dec 2014 19:34:52 +1000
Subject: [PATCH 22/22] Sourceforge bug 260 Missing defines:
GL_COPY_{READ|WRITE}_BUFFER_BINDING
---
auto/core/gl/GL_VERSION_4_2 | 2 ++
1 file changed, 2 insertions(+)
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