Merge branch 'master' into subset

This commit is contained in:
Nigel Stewart 2015-08-10 22:06:43 +10:00
commit 75a7d59fa5
48 changed files with 1356 additions and 979 deletions

1
.gitattributes vendored
View File

@ -2,3 +2,4 @@
*.png binary *.png binary
build/*/* text eol=crlf build/*/* text eol=crlf
CMakeLists.txt text eol=lf CMakeLists.txt text eol=lf
build/cmake/* text eol=lf

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/bin /bin
/lib /lib
/tmp /tmp
/out

View File

@ -245,75 +245,6 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@ perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@
rm -f $@.bak rm -f $@.bak
$(S.DEST)/glew_def.c: $(EXT)/.dummy
cp -f $(SRC)/glew_license.h $@
echo -e "#include \"glew_utils.h\"\n\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
echo -e "\n#if !defined(GLEW_MX)\n\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
$(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
echo -e "\n#if defined(_WIN32)" >> $@
$(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
echo -e "\n#endif /* _WIN32 */" >> $@
echo -e "\n#endif /* !GLEW_MX */" >> $@;
echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\n#if !defined(GLEW_MX)" >> $@;
echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\n#endif /* !GLEW_MX */" >> $@;
echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@;
rm -f $@.bak
$(S.DEST)/glew_init.c: $(EXT)/.dummy
cp -f $(SRC)/glew_license.h $@
echo -e "#include \"glew_utils.h\"\n" >> $@
$(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
cat $(SRC)/glew_init_gl.c >> $@
$(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
$(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}\n\n#if defined(_WIN32)\n" >> $@;
$(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
cat $(SRC)/glew_init_wgl.c >> $@
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}\n\n" >> $@;
echo -e "\n#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)\n" >> $@
$(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glew_init_glx.c >> $@
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}\n\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */\n" >> $@;
cat $(SRC)/glew_init_tail.c >> $@
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
perl -e "s/\(\(glBlendColor = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glBlendColor = /g" -pi $@
rm -f $@.bak
$(S.DEST)/glew_str.c: $(EXT)/.dummy
cp -f $(SRC)/glew_license.h $@
echo -e "\n#include \"glew_utils.h\"\n" >> $@
cat $(SRC)/glew_str_head.c >> $@
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
cat $(SRC)/glew_str_wgl.c >> $@
$(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
cat $(SRC)/glew_str_glx.c >> $@
$(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glew_str_tail.c >> $@
# perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
# perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
rm -f $@.bak
$(S.DEST)/glewinfo.c: $(EXT)/.dummy $(S.DEST)/glewinfo.c: $(EXT)/.dummy
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
@echo "Creating glewinfo.c" @echo "Creating glewinfo.c"

View File

@ -2,8 +2,9 @@
import re import re
section = re.compile('^(Name|Name Strings?|Number|Dependencies|New Procedures and Functions|New Tokens|Additions to .*|Changes to .*|Modifications to .*|Add new Section .*)\s*$') section = re.compile('^(Name|Name Strings?|Contact|Notice|Number|Dependencies|Overview|Issues|IP Status|Status|Version|New Procedures and Functions|New Tokens|Additions to .*|Changes to .*|Modifications to .*|Add new Section .*)\s*$')
token = re.compile('^\s+(([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-F]+)([^\?]*))?\s*$') token = re.compile('^\s+(([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-F]+)([^\?]*))?\s*$')
match = [ 'Name', 'Name String', 'Contact', 'Notice', 'Name Strings', 'Version', 'Number', 'Dependencies', 'New Procedures and Functions', 'New Tokens']
if __name__ == '__main__': if __name__ == '__main__':
@ -16,17 +17,22 @@ if __name__ == '__main__':
for i in args: for i in args:
lines = open(i).readlines() lines = open(i).readlines()
f = open(i,'w') f = open(i,'w')
# Keep track of the current section as we iterate over the input
current = '' current = ''
for j in lines: for j in lines:
# Detect the start of a new section
m = section.match(j) m = section.match(j)
if m: if m:
current = m.group(1).strip() current = m.group(1).strip()
if current in [ 'Name', 'Name String', 'Name Strings', 'Number', 'Dependencies', 'New Procedures and Functions', 'New Tokens']: if current in match:
print >>f, j, print >>f, j,
continue continue
if current=='New Tokens': if current=='New Tokens':
if token.match(j): if token.match(j):
print >>f, j, print >>f, j,
elif current in [ 'Name', 'Name String', 'Name Strings', 'Number', 'Dependencies', 'New Procedures and Functions']: elif current in match:
print >>f, j, print >>f, j,

View File

@ -19,7 +19,7 @@ our $type = shift;
if (@ARGV) if (@ARGV)
{ {
@extlist = @ARGV; @extlist = @ARGV;
foreach my $ext (sort @extlist) foreach my $ext (sort @extlist)
{ {

View File

@ -38,18 +38,17 @@ if (@ARGV)
parse_ext($ext); parse_ext($ext);
#make_separator($extname); #make_separator($extname);
print "#ifdef $extname\n\n";
my $extvar = $extname; my $extvar = $extname;
my $extvardef = $extname; my $extvardef = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/; $extvar =~ s/GL(X*)_/GL$1EW_/;
if (keys %$functions) if (keys %$functions)
{ {
print "#ifdef $extname\n\n";
print "static GLboolean _glewInit_$extname (" . $type . print "static GLboolean _glewInit_$extname (" . $type .
"EW_CONTEXT_ARG_DEF_INIT)\n{\n GLboolean r = GL_FALSE;\n"; "EW_CONTEXT_ARG_DEF_INIT)\n{\n GLboolean r = GL_FALSE;\n";
output_decls($functions, \&make_pfn_def_init); output_decls($functions, \&make_pfn_def_init);
print "\n return r;\n}\n\n"; print "\n return r;\n}\n\n";
print "#endif /* $extname */\n\n";
} }
#print "\nGLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n\n";
print "#endif /* $extname */\n\n";
} }
} }

View File

@ -3,6 +3,8 @@ https://www.opengl.org/registry/doc/glspec42.compatibility.20120427.pdf
GL_COPY_READ_BUFFER_BINDING 0x8F36 GL_COPY_READ_BUFFER_BINDING 0x8F36
GL_COPY_WRITE_BUFFER_BINDING 0x8F37 GL_COPY_WRITE_BUFFER_BINDING 0x8F37
GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E

View File

@ -1,4 +1,8 @@
GL_VERSION_4_5 GL_VERSION_4_5
https://www.opengl.org/registry/doc/glspec45.compatibility.pdf https://www.opengl.org/registry/doc/glspec45.compatibility.pdf
GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
GLenum glGetGraphicsResetStatus (void) GLenum glGetGraphicsResetStatus (void)
void glGetnTexImage (GLenum tex, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *pixels)
void glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, GLvoid *pixels)
void glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params)

View File

@ -13,7 +13,7 @@ Mac OS X, FreeBSD, Irix, and Solaris.
<a href="http://sourceforge.net/projects/glew/">GLEW</a> is distributed <a href="http://sourceforge.net/projects/glew/">GLEW</a> is distributed
as source and precompiled binaries.<br/> as source and precompiled binaries.<br/>
The latest release is The latest release is
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a>[26-01-15]: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a>[08-10-15]:
</p> </p>
<p> <p>
</p> </p>
@ -27,8 +27,8 @@ The latest release is
<td align="right"><b>Source</b></td> <td align="right"><b>Source</b></td>
<td></td> <td></td>
<td align="left"> <td align="left">
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0.zip/download">ZIP</a>&nbsp;|&nbsp; <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.zip/download">ZIP</a>&nbsp;|&nbsp;
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0.tgz/download">TGZ</a></td> <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.tgz/download">TGZ</a></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
@ -36,7 +36,7 @@ The latest release is
<td align="right"><b>Binaries</b></td> <td align="right"><b>Binaries</b></td>
<td></td> <td></td>
<td align="left"> <td align="left">
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0-win32.zip/download">Windows 32-bit and 64-bit</a> <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0-win32.zip/download">Windows 32-bit and 64-bit</a>
</td> </td>
<td></td> <td></td>
</tr> </tr>
@ -60,8 +60,8 @@ An up-to-date copy is also available using <a href="http://git-scm.com/">git</a>
<a href="https://sourceforge.net/projects/glew/files/glew/snapshots/">Unsupported snapshots</a> are also available: <a href="https://sourceforge.net/projects/glew/files/glew/snapshots/">Unsupported snapshots</a> are also available:
</p> </p>
<ul> <ul>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150805.tgz/download">glew-20150805.tgz</a></li>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150124.tgz/download">glew-20150124.tgz</a></li> <li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150124.tgz/download">glew-20150124.tgz</a></li>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20140918.tgz/download">glew-20140918.tgz</a></li>
</ul> </ul>
<h2>Supported Extensions</h2> <h2>Supported Extensions</h2>
@ -76,6 +76,7 @@ The latest release contains support for OpenGL 4.5 and the following extensions:
<h2>News</h2> <h2>News</h2>
<ul> <ul>
<li>[08-10-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">GLEW 1.13.0</a> adds support for new extensions, fixes minor bugs</li>
<li>[26-01-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">GLEW 1.12.0</a> fixes minor bugs and adds new extensions</li> <li>[26-01-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">GLEW 1.12.0</a> fixes minor bugs and adds new extensions</li>
<li>[08-11-14] <a href="https://sourceforge.net/projects/glew/files/glew/1.11.0/">GLEW 1.11.0</a> adds support for OpenGL 4.5, new extensions</li> <li>[08-11-14] <a href="https://sourceforge.net/projects/glew/files/glew/1.11.0/">GLEW 1.11.0</a> adds support for OpenGL 4.5, new extensions</li>
<li>[07-22-13] <a href="https://sourceforge.net/projects/glew/files/glew/1.10.0/">GLEW 1.10.0</a> adds support for OpenGL 4.4, new extensions</li> <li>[07-22-13] <a href="https://sourceforge.net/projects/glew/files/glew/1.10.0/">GLEW 1.10.0</a> adds support for OpenGL 4.4, new extensions</li>

View File

@ -2,7 +2,42 @@
<hr align="center"> <hr align="center">
<ul class="none"> <ul class="none">
<li><b>1.12.0</b> [26-01-15] <li><b>1.13.0</b> [08-10-15]
<ul>
<li> Enhancements:
<ul>
<li> glxewInit, wglewInit
<li> glewinfo adds support for -version, -profile core|compatibility and -flag debug|forward parameters
<li> Improved cmake build support
<ul>
<li> New extensions:
<ul>
<li> GL_ARB_ES3_2_compatibility
<li> GL_ARB_fragment_shader_interlock
<li> GL_ARB_gpu_shader_int64
<li> GL_ARB_parallel_shader_compile
<li> GL_ARB_post_depth_coverage
<li> GL_ARB_sample_locations
<li> GL_ARB_shader_atomic_counter_ops
<li> GL_ARB_shader_ballot
<li> GL_ARB_shader_clock
<li> GL_ARB_shader_viewport_layer_array
<li> GL_ARB_sparse_texture2
<li> GL_ARB_sparse_texture_clamp
<li> GL_ARB_texture_filter_minmax
<li> GL_INTEL_framebuffer_CMAA
<li> GL_KHR_no_error
<li> GL_NV_conservative_raster_dilate
<li> GL_OVR_multiview
<li> GL_OVR_multiview2
</ul>
<li> <a href="http://sourceforge.net/p/glew/bugs/milestone/1.13.0/">Bug fixes</a>
</ul>
</ul>
<hr align="center">
<ul class="none">
<li><b>1.12.0</b> [01-26-15]
<ul> <ul>
<li> New extensions: <li> New extensions:
<ul> <ul>

View File

@ -12,7 +12,11 @@ GLboolean glxewGetExtension (const char* name)
return _glewSearchExtension(name, start, end); return _glewSearchExtension(name, start, end);
} }
#ifdef GLEW_MX
GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST) GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
#else
GLenum glxewInit (GLXEW_CONTEXT_ARG_DEF_LIST)
#endif
{ {
int major, minor; int major, minor;
const GLubyte* extStart; const GLubyte* extStart;

View File

@ -34,21 +34,15 @@ GLboolean glewExperimental = GL_FALSE;
#if !defined(GLEW_MX) #if !defined(GLEW_MX)
#if defined(_WIN32)
extern GLenum GLEWAPIENTRY wglewContextInit (void);
#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
extern GLenum GLEWAPIENTRY glxewContextInit (void);
#endif /* _WIN32 */
GLenum GLEWAPIENTRY glewInit (void) GLenum GLEWAPIENTRY glewInit (void)
{ {
GLenum r; GLenum r;
r = glewContextInit(); r = glewContextInit();
if ( r != 0 ) return r; if ( r != 0 ) return r;
#if defined(_WIN32) #if defined(_WIN32)
return wglewContextInit(); return wglewInit();
#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */ #elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
return glxewContextInit(); return glxewInit();
#else #else
return r; return r;
#endif /* _WIN32 */ #endif /* _WIN32 */

View File

@ -20,7 +20,11 @@ GLboolean GLEWAPIENTRY wglewGetExtension (const char* name)
return _glewSearchExtension(name, start, end); return _glewSearchExtension(name, start, end);
} }
#ifdef GLEW_MX
GLenum GLEWAPIENTRY wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST) GLenum GLEWAPIENTRY wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST)
#else
GLenum GLEWAPIENTRY wglewInit (WGLEW_CONTEXT_ARG_DEF_LIST)
#endif
{ {
GLboolean crippled; GLboolean crippled;
const GLubyte* extStart; const GLubyte* extStart;

View File

@ -1,162 +0,0 @@
/*
** The OpenGL Extension Wrangler Library
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
** Copyright (C) 2002, Lev Povalahev
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** * Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** * The name of the author may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
** THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <GL/glew.h>
#if defined(_WIN32)
# include <GL/wglew.h>
#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
# include <GL/glxew.h>
#endif
#include "glew_utils.h"
#if defined(__APPLE__)
#include <mach-o/dyld.h>
#include <stdlib.h>
#include <string.h>
void* NSGLGetProcAddress (const GLubyte *name)
{
NSSymbol symbol;
char* symbolName;
/* prepend a '_' for the Unix C symbol mangling convention */
symbolName = malloc(strlen((const char*)name) + 2);
strcpy(symbolName+1, (const char*)name);
symbolName[0] = '_';
symbol = NULL;
if (NSIsSymbolNameDefined(symbolName))
symbol = NSLookupAndBindSymbol(symbolName);
free(symbolName);
return symbol ? NSAddressOfSymbol(symbol) : NULL;
}
#endif /* __APPLE__ */
#if defined(__sgi) || defined (__sun)
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
void* dlGetProcAddress (const GLubyte* name)
{
static void* h = NULL;
static void* gpa;
if (h == NULL)
{
if ((h = dlopen(NULL, RTLD_LAZY | RTLD_LOCAL)) == NULL) return NULL;
gpa = dlsym(h, "glXGetProcAddress");
}
if (gpa != NULL)
return ((void*(*)(const GLubyte*))gpa)(name);
else
return dlsym(h, (const char*)name);
}
#endif /* __sgi || __sun */
/*
* GLEW, just like OpenGL or GLU, does not rely on the standard C library.
* These functions implement the functionality required in this file.
*/
GLuint _glewStrLen (const GLubyte* s)
{
GLuint i=0;
while (s+i != NULL && s[i] != '\0') i++;
return i;
}
GLuint _glewStrCLen (const GLubyte* s, GLubyte c)
{
GLuint i=0;
while (s+i != NULL && s[i] != '\0' && s[i] != c) i++;
return i;
}
GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n)
{
GLuint i=0;
while (i < n && a+i != NULL && b+i != NULL && a[i] == b[i]) i++;
return i == n ? GL_TRUE : GL_FALSE;
}
GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
{
while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t'))
{
*a++;
*na--;
}
if(*na >= nb)
{
GLuint i=0;
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
if(i == nb)
{
*a = *a + nb;
*na = *na - nb;
return GL_TRUE;
}
}
return GL_FALSE;
}
GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
{
if(*na >= nb)
{
GLuint i=0;
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
if(i == nb)
{
*a = *a + nb;
*na = *na - nb;
return GL_TRUE;
}
}
return GL_FALSE;
}
GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
{
if(*na >= nb)
{
GLuint i=0;
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
if (i == nb && (*na == nb || *a[i] == ' ' || *a[i] == '\n' || *a[i] == '\r' || *a[i] == '\t'))
{
*a = *a + nb;
*na = *na - nb;
return GL_TRUE;
}
}
return GL_FALSE;
}

View File

@ -1,101 +0,0 @@
/*
** The OpenGL Extension Wrangler Library
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
** Copyright (C) 2002, Lev Povalahev
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** * Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** * The name of the author may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
** THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __glew_utils_h__
#define __glew_utils_h__
#include <GL/glew.h>
#if defined(_WIN32)
# include <GL/wglew.h>
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
# include <GL/glxew.h>
#endif
/*
* Define glewGetContext and related helper macros.
*/
#ifdef GLEW_MX
# define glewGetContext() ctx
# ifdef _WIN32
# define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx
# define GLEW_CONTEXT_ARG_VAR_INIT ctx
# define wglewGetContext() ctx
# define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx
# define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx
# else /* _WIN32 */
# define GLEW_CONTEXT_ARG_DEF_INIT void
# define GLEW_CONTEXT_ARG_VAR_INIT
# define glxewGetContext() ctx
# define GLXEW_CONTEXT_ARG_DEF_INIT void
# define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx
# endif /* _WIN32 */
# define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx
#else /* GLEW_MX */
# define GLEW_CONTEXT_ARG_DEF_INIT void
# define GLEW_CONTEXT_ARG_VAR_INIT
# define GLEW_CONTEXT_ARG_DEF_LIST void
# define WGLEW_CONTEXT_ARG_DEF_INIT void
# define WGLEW_CONTEXT_ARG_DEF_LIST void
# define GLXEW_CONTEXT_ARG_DEF_INIT void
# define GLXEW_CONTEXT_ARG_DEF_LIST void
#endif /* GLEW_MX */
/*
* Define glewGetProcAddress.
*/
#if defined(_WIN32)
# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
#else
# if defined(__APPLE__)
extern void* NSGLGetProcAddress (const GLubyte* name);
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
# else
# if defined(__sgi) || defined(__sun)
extern void* dlGetProcAddress (const GLubyte* name);
# define glewGetProcAddress(name) dlGetProcAddress(name)
# else /* __linux */
# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
# endif
# endif
#endif
/*
* GLEW, just like OpenGL or GLU, does not rely on the standard C library.
* These functions implement the string processing functionality required in the library.
*/
extern GLuint _glewStrLen (const GLubyte* s);
extern GLuint _glewStrCLen (const GLubyte* s, GLubyte c);
extern GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n);
extern GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb);
extern GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb);
extern GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
#endif /* __glew_utils_h__ */

View File

@ -36,7 +36,81 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "Comments", "The OpenGL Extension Wrangler Library\r\nCopyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\nCopyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\nCopyright (C) 2002, Lev Povalahev\r\nAll rights reserved.\r\n \r\nRedistribution and use in source and binary forms, with or without \r\nmodification, are permitted provided that the following conditions are met:\r\n\r\n* Redistributions of source code must retain the above copyright notice, \r\n this list of conditions and the following disclaimer.\r\n* Redistributions in binary form must reproduce the above copyright notice, \r\n this list of conditions and the following disclaimer in the documentation \r\n and/or other materials provided with the distribution.\r\n* The name of the author may be used to endorse or promote products \r\n derived from this software without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' \r\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\nTHE POSSIBILITY OF SUCH DAMAGE.\r\n\r\nLicense Applicability. Except to the extent portions of this file are\r\nmade subject to an alternative license as permitted in the SGI Free\r\nSoftware License B, Version 1.1 (the 'License'), the contents of this\r\nfile are subject only to the provisions of the License. You may not use\r\nthis file except in compliance with the License. You may obtain a copy\r\nof the License at Silicon Graphics, Inc., attn: Legal Services, 1600\r\nAmphitheatre Parkway, Mountain View, CA 94043-1351, or at:\r\n\r\nhttp://oss.sgi.com/projects/FreeB\r\n\r\nNote that, as provided in the License, the Software is distributed on an\r\n'AS IS' basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS\r\nDISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND\r\nCONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A\r\nPARTICULAR PURPOSE, AND NON-INFRINGEMENT.\r\n\r\nOriginal Code. The Original Code is: OpenGL Sample Implementation,\r\nVersion 1.2.1, released January 26, 2000, developed by Silicon Graphics,\r\nInc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.\r\nCopyright in any portions created by third parties is as indicated\r\nelsewhere herein. All Rights Reserved.\r\n\r\nAdditional Notice Provisions: This software was created using the\r\nOpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has\r\nnot been independently verified as being compliant with the OpenGL(R)\r\nversion 1.2.1 Specification.\0" VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n"
"All rights reserved.\r\n"
"\r\n"
"Redistribution and use in source and binary forms, with or without \r\n"
"modification, are permitted provided that the following conditions are met:\r\n"
"\r\n"
"* Redistributions of source code must retain the above copyright notice, \r\n"
" this list of conditions and the following disclaimer.\r\n"
"* Redistributions in binary form must reproduce the above copyright notice, \r\n"
" this list of conditions and the following disclaimer in the documentation \r\n"
" and/or other materials provided with the distribution.\r\n"
"* The name of the author may be used to endorse or promote products \r\n"
" derived from this software without specific prior written permission.\r\n"
"\r\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\n"
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n"
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\n"
"LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\n"
"CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n"
"INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n"
"CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n"
"ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n"
"THE POSSIBILITY OF SUCH DAMAGE.\r\n"
"\r\n"
"\r\n"
"Mesa 3-D graphics library\r\n"
"\r\n"
"Version: 7.0\r\n"
"\r\n"
"Copyright (C) 1999-2007 Brian Paul All Rights Reserved.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and associated documentation files (the ''Software''),\r\n"
"to deal in the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\r\n"
"and/or sell copies of the Software, and to permit persons to whom the\r\n"
"Software is furnished to do so, subject to the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Software.\r\n"
"\r\n"
"THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n"
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n"
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\n"
"BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\n"
"AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
"\r\n"
"\r\n"
"Copyright (c) 2007 The Khronos Group Inc.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and/or associated documentation files (the\r\n"
"''Materials''), to deal in the Materials without restriction, including\r\n"
"without limitation the rights to use, copy, modify, merge, publish,\r\n"
"distribute, sublicense, and/or sell copies of the Materials, and to\r\n"
"permit persons to whom the Materials are furnished to do so, subject to\r\n"
"the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Materials.\r\n"
"\r\n"
"THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\n"
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n"
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n"
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n"
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n"
"MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0" VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for verifying extension entry points\0" VALUE "FileDescription", "Utility for verifying extension entry points\0"
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0" VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"

View File

@ -8,6 +8,10 @@
#include <GL/glxew.h> #include <GL/glxew.h>
#endif #endif
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#endif
#ifdef GLEW_REGAL #ifdef GLEW_REGAL
#include <GL/Regal.h> #include <GL/Regal.h>
#endif #endif
@ -26,17 +30,26 @@ GLXEWContext _glxewctx;
#endif #endif
#endif #endif
#if defined(_WIN32) /* Command-line parameters for GL context creation */
GLboolean glewCreateContext (int* pixelformat);
#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
GLboolean glewCreateContext (const char* display, int* visual);
#else
GLboolean glewCreateContext ();
#endif
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX) struct createParams
GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual); {
#if defined(_WIN32)
int pixelformat;
#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
const char* display;
int visual;
#endif #endif
int major, minor; /* GL context version number */
/* https://www.opengl.org/registry/specs/ARB/glx_create_context.txt */
int profile; /* core = 1, compatibility = 2 */
int flags; /* debug = 1, forward compatible = 2 */
};
GLboolean glewCreateContext (struct createParams *params);
GLboolean glewParseArgs (int argc, char** argv, struct createParams *);
void glewDestroyContext (); void glewDestroyContext ();

View File

@ -4,36 +4,40 @@
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
int main (int argc, char** argv) int main (int argc, char** argv)
#else
int main (void)
#endif
{ {
GLuint err; GLuint err;
struct createParams params =
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
char* display = NULL;
int visual = -1;
if (glewParseArgs(argc-1, argv+1, &display, &visual))
{ {
#if defined(_WIN32) #if defined(_WIN32)
fprintf(stderr, "Usage: glewinfo [-pf <id>]\n"); -1, /* pixelformat */
#else #elif !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
fprintf(stderr, "Usage: glewinfo [-display <display>] [-visual <id>]\n"); "", /* display */
-1, /* visual */
#endif #endif
0, /* major */
0, /* minor */
0, /* profile mask */
0 /* flags */
};
if (glewParseArgs(argc-1, argv+1, &params))
{
fprintf(stderr, "Usage: glewinfo "
#if defined(_WIN32)
"[-pf <pixelformat>] "
#elif !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
"[-display <display>] "
"[-visual <visual id>] "
#endif
"[-version <OpenGL version>] "
"[-profile core|compatibility] "
"[-flag debug|forward]"
"\n");
return 1; return 1;
} }
#endif
#if defined(_WIN32) if (GL_TRUE == glewCreateContext(&params))
if (GL_TRUE == glewCreateContext(&visual))
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
if (GL_TRUE == glewCreateContext())
#else
if (GL_TRUE == glewCreateContext(display, &visual))
#endif
{ {
fprintf(stderr, "Error: glewCreateContext failed\n"); fprintf(stderr, "Error: glewCreateContext failed\n");
glewDestroyContext(); glewDestroyContext();
@ -44,7 +48,7 @@ int main (void)
err = glewContextInit(glewGetContext()); err = glewContextInit(glewGetContext());
#ifdef _WIN32 #ifdef _WIN32
err = err || wglewContextInit(wglewGetContext()); err = err || wglewContextInit(wglewGetContext());
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) #elif !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
err = err || glxewContextInit(glxewGetContext()); err = err || glxewContextInit(glxewGetContext());
#endif #endif
@ -73,10 +77,10 @@ int main (void)
fprintf(f, "---------------------------\n\n"); fprintf(f, "---------------------------\n\n");
fprintf(f, "GLEW version %s\n", glewGetString(GLEW_VERSION)); fprintf(f, "GLEW version %s\n", glewGetString(GLEW_VERSION));
#if defined(_WIN32) #if defined(_WIN32)
fprintf(f, "Reporting capabilities of pixelformat %d\n", visual); fprintf(f, "Reporting capabilities of pixelformat %d\n", params.pixelformat);
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) #elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n", fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
display == NULL ? getenv("DISPLAY") : display, visual); params.display == NULL ? getenv("DISPLAY") : params.display, params.visual);
#endif #endif
fprintf(f, "Running on a %s from %s\n", fprintf(f, "Running on a %s from %s\n",
glGetString(GL_RENDERER), glGetString(GL_VENDOR)); glGetString(GL_RENDERER), glGetString(GL_VENDOR));
@ -94,39 +98,55 @@ int main (void)
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX) GLboolean glewParseArgs (int argc, char** argv, struct createParams *params)
GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
{ {
int p = 0; int p = 0;
while (p < argc) while (p < argc)
{ {
#if defined(_WIN32) if (!strcmp(argv[p], "-version"))
if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat"))
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
*display = 0; if (sscanf(argv[p++], "%d.%d", &params->major, &params->minor) != 2) return GL_TRUE;
*visual = strtol(argv[p++], NULL, 0);
} }
else else if (!strcmp(argv[p], "-profile"))
return GL_TRUE;
#else
if (!strcmp(argv[p], "-display"))
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
*display = argv[p++]; if (strcmp("core", argv[p]) == 0) params->profile |= 1;
else if (strcmp("compatibility",argv[p]) == 0) params->profile |= 2;
else return GL_TRUE;
++p;
}
else if (!strcmp(argv[p], "-flag"))
{
if (++p >= argc) return GL_TRUE;
if (strcmp("debug", argv[p]) == 0) params->flags |= 1;
else if (strcmp("forward",argv[p]) == 0) params->flags |= 2;
else return GL_TRUE;
++p;
}
#if defined(_WIN32)
else if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat"))
{
if (++p >= argc) return GL_TRUE;
params->pixelformat = strtol(argv[p++], NULL, 0);
}
#elif !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
else if (!strcmp(argv[p], "-display"))
{
if (++p >= argc) return GL_TRUE;
params->display = argv[p++];
} }
else if (!strcmp(argv[p], "-visual")) else if (!strcmp(argv[p], "-visual"))
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
*visual = (int)strtol(argv[p++], NULL, 0); params->visual = (int)strtol(argv[p++], NULL, 0);
} }
#endif
else else
return GL_TRUE; return GL_TRUE;
#endif
} }
return GL_FALSE; return GL_FALSE;
} }
#endif
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
@ -136,7 +156,7 @@ HWND wnd = NULL;
HDC dc = NULL; HDC dc = NULL;
HGLRC rc = NULL; HGLRC rc = NULL;
GLboolean glewCreateContext (int* pixelformat) GLboolean glewCreateContext (struct createParams* params)
{ {
WNDCLASS wc; WNDCLASS wc;
PIXELFORMATDESCRIPTOR pfd; PIXELFORMATDESCRIPTOR pfd;
@ -155,20 +175,58 @@ GLboolean glewCreateContext (int* pixelformat)
if (NULL == dc) return GL_TRUE; if (NULL == dc) return GL_TRUE;
/* find pixel format */ /* find pixel format */
ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR)); ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR));
if (*pixelformat == -1) /* find default */ if (params->pixelformat == -1) /* find default */
{ {
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1; pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
*pixelformat = ChoosePixelFormat(dc, &pfd); params->pixelformat = ChoosePixelFormat(dc, &pfd);
if (*pixelformat == 0) return GL_TRUE; if (params->pixelformat == 0) return GL_TRUE;
} }
/* set the pixel format for the dc */ /* set the pixel format for the dc */
if (FALSE == SetPixelFormat(dc, *pixelformat, &pfd)) return GL_TRUE; if (FALSE == SetPixelFormat(dc, params->pixelformat, &pfd)) return GL_TRUE;
/* create rendering context */ /* create rendering context */
rc = wglCreateContext(dc); rc = wglCreateContext(dc);
if (NULL == rc) return GL_TRUE; if (NULL == rc) return GL_TRUE;
if (FALSE == wglMakeCurrent(dc, rc)) return GL_TRUE; if (FALSE == wglMakeCurrent(dc, rc)) return GL_TRUE;
if (params->major || params->profile || params->flags)
{
HGLRC oldRC = rc;
int contextAttrs[20];
int i;
wglewInit();
/* Intel HD 3000 has WGL_ARB_create_context, but not WGL_ARB_create_context_profile */
if (!wglewGetExtension("WGL_ARB_create_context"))
return GL_TRUE;
i = 0;
if (params->major)
{
contextAttrs[i++] = WGL_CONTEXT_MAJOR_VERSION_ARB;
contextAttrs[i++] = params->major;
contextAttrs[i++] = WGL_CONTEXT_MINOR_VERSION_ARB;
contextAttrs[i++] = params->minor;
}
if (params->profile)
{
contextAttrs[i++] = WGL_CONTEXT_PROFILE_MASK_ARB;
contextAttrs[i++] = params->profile;
}
if (params->flags)
{
contextAttrs[i++] = WGL_CONTEXT_FLAGS_ARB;
contextAttrs[i++] = params->flags;
}
contextAttrs[i++] = 0;
rc = wglCreateContextAttribsARB(dc, 0, contextAttrs);
if (NULL == rc) return GL_TRUE;
if (!wglMakeCurrent(dc, rc)) return GL_TRUE;
wglDeleteContext(oldRC);
}
return GL_FALSE; return GL_FALSE;
} }
@ -190,22 +248,31 @@ void glewDestroyContext ()
CGLContextObj ctx, octx; CGLContextObj ctx, octx;
GLboolean glewCreateContext () GLboolean glewCreateContext (struct createParams *params)
{ {
const CGLPixelFormatAttribute attrib[4] = CGLPixelFormatAttribute contextAttrs[20];
{ int i;
kCGLPFAAccelerated, /* No software rendering */
#if 0
kCGLPFAOpenGLProfile, /* OSX 10.7 Lion onwards */
(CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core, /* 3.2 Core Context */
#endif
0
};
CGLPixelFormatObj pf; CGLPixelFormatObj pf;
GLint npix; GLint npix;
CGLError error; CGLError error;
error = CGLChoosePixelFormat(attrib, &pf, &npix); i = 0;
contextAttrs[i++] = kCGLPFAAccelerated; /* No software rendering */
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
if (params->profile & GL_CONTEXT_CORE_PROFILE_BIT)
{
if (params->major==3 && params->minor>=2)
{
contextAttrs[i++] = kCGLPFAOpenGLProfile; /* OSX 10.7 Lion onwards */
contextAttrs[i++] = (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core; /* 3.2 Core Context */
}
}
#endif
contextAttrs[i++] = 0;
error = CGLChoosePixelFormat(contextAttrs, &pf, &npix);
if (error) return GL_TRUE; if (error) return GL_TRUE;
error = CGLCreateContext(pf, NULL, &ctx); error = CGLCreateContext(pf, NULL, &ctx);
if (error) return GL_TRUE; if (error) return GL_TRUE;
@ -230,7 +297,7 @@ void glewDestroyContext ()
#elif defined(__HAIKU__) #elif defined(__HAIKU__)
GLboolean glewCreateContext () GLboolean glewCreateContext (struct createParams *params)
{ {
/* TODO: Haiku: We need to call C++ code here */ /* TODO: Haiku: We need to call C++ code here */
return GL_FALSE; return GL_FALSE;
@ -252,22 +319,22 @@ GLXContext ctx = NULL;
Window wnd = 0; Window wnd = 0;
Colormap cmap = 0; Colormap cmap = 0;
GLboolean glewCreateContext (const char* display, int* visual) GLboolean glewCreateContext (struct createParams *params)
{ {
int attrib[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None }; int attrib[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None };
int erb, evb; int erb, evb;
XSetWindowAttributes swa; XSetWindowAttributes swa;
/* open display */ /* open display */
dpy = XOpenDisplay(display); dpy = XOpenDisplay(params->display);
if (NULL == dpy) return GL_TRUE; if (NULL == dpy) return GL_TRUE;
/* query for glx */ /* query for glx */
if (!glXQueryExtension(dpy, &erb, &evb)) return GL_TRUE; if (!glXQueryExtension(dpy, &erb, &evb)) return GL_TRUE;
/* choose visual */ /* choose visual */
if (*visual == -1) if (params->visual == -1)
{ {
vi = glXChooseVisual(dpy, DefaultScreen(dpy), attrib); vi = glXChooseVisual(dpy, DefaultScreen(dpy), attrib);
if (NULL == vi) return GL_TRUE; if (NULL == vi) return GL_TRUE;
*visual = (int)XVisualIDFromVisual(vi->visual); params->visual = (int)XVisualIDFromVisual(vi->visual);
} }
else else
{ {
@ -275,7 +342,7 @@ GLboolean glewCreateContext (const char* display, int* visual)
vis = XGetVisualInfo(dpy, 0, NULL, &n_vis); vis = XGetVisualInfo(dpy, 0, NULL, &n_vis);
for (i=0; i<n_vis; i++) for (i=0; i<n_vis; i++)
{ {
if ((int)XVisualIDFromVisual(vis[i].visual) == *visual) if ((int)XVisualIDFromVisual(vis[i].visual) == params->visual)
vi = &vis[i]; vi = &vis[i];
} }
if (vi == NULL) return GL_TRUE; if (vi == NULL) return GL_TRUE;
@ -293,6 +360,54 @@ GLboolean glewCreateContext (const char* display, int* visual)
CWBorderPixel | CWColormap, &swa); CWBorderPixel | CWColormap, &swa);
/* make context current */ /* make context current */
if (!glXMakeCurrent(dpy, wnd, ctx)) return GL_TRUE; if (!glXMakeCurrent(dpy, wnd, ctx)) return GL_TRUE;
if (params->major || params->profile || params->flags)
{
GLXContext oldCtx = ctx;
GLXFBConfig *FBConfigs;
int FBConfigAttrs[] = { GLX_FBCONFIG_ID, 0, None };
int contextAttrs[20];
int nelems, i;
glxewInit();
if (!glxewGetExtension("GLX_ARB_create_context"))
return GL_TRUE;
if (glXQueryContext(dpy, oldCtx, GLX_FBCONFIG_ID, &FBConfigAttrs[1]))
return GL_TRUE;
FBConfigs = glXChooseFBConfig(dpy, vi->screen, FBConfigAttrs, &nelems);
if (nelems < 1)
return GL_TRUE;
i = 0;
if (params->major)
{
contextAttrs[i++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
contextAttrs[i++] = params->major;
contextAttrs[i++] = GLX_CONTEXT_MINOR_VERSION_ARB;
contextAttrs[i++] = params->minor;
}
if (params->profile)
{
contextAttrs[i++] = GLX_CONTEXT_PROFILE_MASK_ARB;
contextAttrs[i++] = params->profile;
}
if (params->flags)
{
contextAttrs[i++] = GLX_CONTEXT_FLAGS_ARB;
contextAttrs[i++] = params->flags;
}
contextAttrs[i++] = None;
ctx = glXCreateContextAttribsARB(dpy, *FBConfigs, NULL, True, contextAttrs);
if (NULL == ctx) return GL_TRUE;
if (!glXMakeCurrent(dpy, wnd, ctx)) return GL_TRUE;
glXDestroyContext(dpy, oldCtx);
XFree(FBConfigs);
}
return GL_FALSE; return GL_FALSE;
} }

View File

@ -14,11 +14,12 @@ GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx,
#else /* GLEW_MX */ #else /* GLEW_MX */
GLEWAPI GLenum GLEWAPIENTRY glxewInit ();
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name); GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -36,7 +36,81 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "Comments", "The OpenGL Extension Wrangler Library\r\nCopyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\nCopyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\nCopyright (C) 2002, Lev Povalahev\r\nAll rights reserved.\r\n \r\nRedistribution and use in source and binary forms, with or without \r\nmodification, are permitted provided that the following conditions are met:\r\n\r\n* Redistributions of source code must retain the above copyright notice, \r\n this list of conditions and the following disclaimer.\r\n* Redistributions in binary form must reproduce the above copyright notice, \r\n this list of conditions and the following disclaimer in the documentation \r\n and/or other materials provided with the distribution.\r\n* The name of the author may be used to endorse or promote products \r\n derived from this software without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' \r\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\nTHE POSSIBILITY OF SUCH DAMAGE.\r\n\r\nLicense Applicability. Except to the extent portions of this file are\r\nmade subject to an alternative license as permitted in the SGI Free\r\nSoftware License B, Version 1.1 (the 'License'), the contents of this\r\nfile are subject only to the provisions of the License. You may not use\r\nthis file except in compliance with the License. You may obtain a copy\r\nof the License at Silicon Graphics, Inc., attn: Legal Services, 1600\r\nAmphitheatre Parkway, Mountain View, CA 94043-1351, or at:\r\n\r\nhttp://oss.sgi.com/projects/FreeB\r\n\r\nNote that, as provided in the License, the Software is distributed on an\r\n'AS IS' basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS\r\nDISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND\r\nCONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A\r\nPARTICULAR PURPOSE, AND NON-INFRINGEMENT.\r\n\r\nOriginal Code. The Original Code is: OpenGL Sample Implementation,\r\nVersion 1.2.1, released January 26, 2000, developed by Silicon Graphics,\r\nInc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.\r\nCopyright in any portions created by third parties is as indicated\r\nelsewhere herein. All Rights Reserved.\r\n\r\nAdditional Notice Provisions: This software was created using the\r\nOpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has\r\nnot been independently verified as being compliant with the OpenGL(R)\r\nversion 1.2.1 Specification.\0" VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n"
"All rights reserved.\r\n"
"\r\n"
"Redistribution and use in source and binary forms, with or without \r\n"
"modification, are permitted provided that the following conditions are met:\r\n"
"\r\n"
"* Redistributions of source code must retain the above copyright notice, \r\n"
" this list of conditions and the following disclaimer.\r\n"
"* Redistributions in binary form must reproduce the above copyright notice, \r\n"
" this list of conditions and the following disclaimer in the documentation \r\n"
" and/or other materials provided with the distribution.\r\n"
"* The name of the author may be used to endorse or promote products \r\n"
" derived from this software without specific prior written permission.\r\n"
"\r\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\n"
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n"
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\n"
"LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\n"
"CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n"
"INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n"
"CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n"
"ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n"
"THE POSSIBILITY OF SUCH DAMAGE.\r\n"
"\r\n"
"\r\n"
"Mesa 3-D graphics library\r\n"
"\r\n"
"Version: 7.0\r\n"
"\r\n"
"Copyright (C) 1999-2007 Brian Paul All Rights Reserved.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and associated documentation files (the ''Software''),\r\n"
"to deal in the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\r\n"
"and/or sell copies of the Software, and to permit persons to whom the\r\n"
"Software is furnished to do so, subject to the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Software.\r\n"
"\r\n"
"THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n"
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n"
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\n"
"BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\n"
"AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
"\r\n"
"\r\n"
"Copyright (c) 2007 The Khronos Group Inc.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and/or associated documentation files (the\r\n"
"''Materials''), to deal in the Materials without restriction, including\r\n"
"without limitation the rights to use, copy, modify, merge, publish,\r\n"
"distribute, sublicense, and/or sell copies of the Materials, and to\r\n"
"permit persons to whom the Materials are furnished to do so, subject to\r\n"
"the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Materials.\r\n"
"\r\n"
"THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\n"
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n"
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n"
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n"
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n"
"MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0" VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for listing pixelformat capabilities\0" VALUE "FileDescription", "Utility for listing pixelformat capabilities\0"
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0" VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"

View File

@ -14,11 +14,12 @@ GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx,
#else /* GLEW_MX */ #else /* GLEW_MX */
GLEWAPI GLenum GLEWAPIENTRY wglewInit ();
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name); GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);

View File

@ -10,6 +10,8 @@ if (COMMAND cmake_policy)
cmake_policy (SET CMP0003 NEW) cmake_policy (SET CMP0003 NEW)
endif() endif()
set(CMAKE_DEBUG_POSTFIX d)
option (BUILD_UTILS "utilities" ON) option (BUILD_UTILS "utilities" ON)
set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..) set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
@ -55,7 +57,29 @@ set_target_properties (glewmx_s PROPERTIES COMPILE_DEFINITIONS "GLEW_STATIC;GLEW
target_link_libraries (glewmx ${GLEW_LIBRARIES}) target_link_libraries (glewmx ${GLEW_LIBRARIES})
target_link_libraries (glewmx_s ${GLEW_LIBRARIES}) target_link_libraries (glewmx_s ${GLEW_LIBRARIES})
install ( TARGETS glew glew_s glewmx glewmx_s if(CMAKE_VERSION VERSION_LESS 2.8.12)
set(MAYBE_EXPORT "")
else()
target_compile_definitions(glew_s INTERFACE "GLEW_STATIC")
target_compile_definitions(glewmx INTERFACE "GLEW_MX")
target_compile_definitions(glewmx_s INTERFACE "GLEW_STATIC;GLEW_MX")
foreach(t glew glew_s glewmx glewmx_s)
target_include_directories(${t} PUBLIC $<INSTALL_INTERFACE:include>)
endforeach()
set(MAYBE_EXPORT EXPORT glew-targets)
endif()
set(targets_to_install "")
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
list(APPEND targets_to_install glew glewmx)
endif()
if(NOT DEFINED BUILD_SHARED_LIBS OR NOT BUILD_SHARED_LIBS)
list(APPEND targets_to_install glew_s glewmx_s)
endif()
install ( TARGETS ${targets_to_install}
${MAYBE_EXPORT}
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX} LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}
@ -89,3 +113,18 @@ configure_file (${GLEW_DIR}/glew.pc.in ${GLEW_DIR}/glewmx.pc @ONLY)
install(FILES ${GLEW_DIR}/glew.pc ${GLEW_DIR}/glewmx.pc install(FILES ${GLEW_DIR}/glew.pc ${GLEW_DIR}/glewmx.pc
DESTINATION lib/pkgconfig DESTINATION lib/pkgconfig
) )
install (FILES
${GLEW_DIR}/include/GL/wglew.h
${GLEW_DIR}/include/GL/glew.h
${GLEW_DIR}/include/GL/glxew.h
DESTINATION include/GL)
if(MAYBE_EXPORT)
install(EXPORT glew-targets DESTINATION lib/cmake/glew
NAMESPACE GLEW::)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/glew-config.cmake
${CMAKE_CURRENT_SOURCE_DIR}/CopyImportedTargetProperties.cmake
DESTINATION lib/cmake/glew)
endif()

View File

@ -0,0 +1,88 @@
#.rst:
# CopyImportedTargetProperties
# --------------------------
#
# Copies the `INTERFACE*` and `IMPORTED*` properties from a target
# to another one.
# This function can be used to duplicate an `IMPORTED` or an `ALIAS` library
# with a different name since ``add_library(... ALIAS ...)`` does not work
# for those targets.
#
# ::
#
# copy_imported_target_properties(<source-target> <destination-target>)
#
# The function copies all the `INTERFACE*` and `IMPORTED*` target
# properties from `<source-target>` to `<destination-target>`.
#
# The function uses the `IMPORTED_CONFIGURATIONS` property to determine
# which configuration-dependent properties should be copied
# (`IMPORTED_LOCATION_<CONFIG>`, etc...)
#
# Example:
#
# Internally the CMake project of ZLIB builds the ``zlib`` and
# ``zlibstatic`` targets which can be exported in the ``ZLIB::`` namespace
# with the ``install(EXPORT ...)`` command.
#
# The config-module will then create the import libraries ``ZLIB::zlib`` and
# ``ZLIB::zlibstatic``. To use ``ZLIB::zlibstatic`` under the standard
# ``ZLIB::ZLIB`` name we need to create the ``ZLIB::ZLIB`` imported library
# and copy the appropriate properties:
#
# add_library(ZLIB::ZLIB STATIC IMPORTED)
# copy_imported_target_properties(ZLIB::zlibstatic ZLIB::ZLIB)
#
function(copy_imported_target_properties src_target dest_target)
set(config_dependent_props
IMPORTED_IMPLIB
IMPORTED_LINK_DEPENDENT_LIBRARIES
IMPORTED_LINK_INTERFACE_LANGUAGES
IMPORTED_LINK_INTERFACE_LIBRARIES
IMPORTED_LINK_INTERFACE_MULTIPLICITY
IMPORTED_LOCATION
IMPORTED_NO_SONAME
IMPORTED_SONAME
)
# copy configuration-independent properties
foreach(prop
${config_dependent_props}
IMPORTED_CONFIGURATIONS
INTERFACE_AUTOUIC_OPTIONS
INTERFACE_COMPILE_DEFINITIONS
INTERFACE_COMPILE_FEATURES
INTERFACE_COMPILE_OPTIONS
INTERFACE_INCLUDE_DIRECTORIES
INTERFACE_LINK_LIBRARIES
INTERFACE_POSITION_INDEPENDENT_CODE
INTERFACE_SOURCES
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
)
get_property(is_set TARGET ${src_target} PROPERTY ${prop} SET)
if(is_set)
get_target_property(v ${src_target} ${prop})
set_target_properties(${dest_target} PROPERTIES ${prop} "${v}")
# message(STATUS "set_target_properties(${dest_target} PROPERTIES ${prop} ${v})")
endif()
endforeach()
# copy configuration-dependent properties
get_target_property(imported_configs ${src_target}
IMPORTED_CONFIGURATIONS)
foreach(config ${imported_configs})
foreach(prop_prefix ${config_dependent_props})
set(prop ${prop_prefix}_${config})
get_property(is_set TARGET ${src_target} PROPERTY ${prop} SET)
if(is_set)
get_target_property(v ${src_target} ${prop})
set_target_properties(${dest_target}
PROPERTIES ${prop} "${v}")
# message(STATUS "set_target_properties(${dest_target} PROPERTIES ${prop} ${v})")
endif()
endforeach()
endforeach()
endfunction()

View File

@ -0,0 +1,46 @@
# This config-module creates the following import libraries:
#
# - GLEW::glew and GLEW::glewmx shared libs
# - GLEW::glew_s and GLEW::glewmx_s static libs
#
# Additionally GLEW::GLEW and GLEW::GLEWMX will be created as an
# copy of either the shared (default) or the static libs.
#
# Dependending on the setting of BUILD_SHARED_LIBS at GLEW build time
# either the static or shared versions may not be available.
#
# Set GLEW_USE_STATIC_LIBS to OFF or ON to force using the shared
# or static libs for GLEW::GLEW and GLEW::GLEWMX
#
include(${CMAKE_CURRENT_LIST_DIR}/glew-targets.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CopyImportedTargetProperties.cmake)
# decide which import library (glew/glew_s and glewmx/glewmx_s)
# needs to be copied to GLEW::GLEW and GLEW::GLEWMX
set(_glew_target_postfix "")
set(_glew_target_type SHARED)
if(DEFINED GLEW_USE_STATIC_LIBS)
# if defined, use only static or shared
if(GLEW_USE_STATIC_LIBS)
set(_glew_target_postfix "_s")
endif()
# else use static only if no shared
elseif(NOT TARGET GLEW::glew AND TARGET GLEW::glew_s)
set(_glew_target_postfix "_s")
endif()
if(_glew_target_postfix STREQUAL "")
set(_glew_target_type SHARED)
else()
set(_glew_target_type STATIC)
endif()
# CMake doesn't allow creating ALIAS lib for an IMPORTED lib
# so create imported ones and copy the properties
foreach(_glew_target glew glewmx)
set(_glew_src_target "GLEW::${_glew_target}${_glew_target_postfix}")
string(TOUPPER "GLEW::${_glew_target}" _glew_dest_target)
add_library(${_glew_dest_target} ${_glew_target_type} IMPORTED)
# message(STATUS "add_library(${_glew_dest_target} ${_glew_target_type} IMPORTED)")
copy_imported_target_properties(${_glew_src_target} ${_glew_dest_target})
endforeach()

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.8.12)
project(glew-cmake-test)
find_package(GLEW REQUIRED CONFIG)
find_package(OpenGL REQUIRED)
add_executable(cmake-test main.c)
set_target_properties(cmake-test PROPERTIES DEBUG_POSTFIX _d)
target_link_libraries(cmake-test PRIVATE GLEW::GLEW ${OPENGL_LIBRARIES})
target_include_directories(cmake-test PRIVATE ${OPENGL_INCLUDE_DIR})
if(CMAKE_VERSION VERSION_LESS 3.0)
set(cgex $<CONFIGURATION>)
else()
set(cgex $<CONFIG>)
endif()
target_compile_definitions(cmake-test PRIVATE
-DGLEW_CMAKE_TEST_CONFIG=${cgex}
-DGLEW_CMAKE_TEST_TARGET_FILE_NAME=$<TARGET_FILE_NAME:GLEW::GLEW>
-DGLEW_CMAKE_TEST_TARGET_TYPE=$<TARGET_PROPERTY:GLEW::GLEW,TYPE>
)
install(TARGETS cmake-test DESTINATION bin)

View File

@ -0,0 +1,23 @@
#include <GL/glew.h>
#include <stdio.h>
#include <stdlib.h>
#define S(x) SS(x)
#define SS(x) #x
int main(int argc, char* argv[]) {
printf("GLEW CMake test, %s build\n",
S(GLEW_CMAKE_TEST_CONFIG));
printf("-- linked to %s which is %s\n",
S(GLEW_CMAKE_TEST_TARGET_FILE_NAME),
S(GLEW_CMAKE_TEST_TARGET_TYPE));
const GLubyte* v = glewGetString(GLEW_VERSION);
if(v) {
printf("-- glewGetString(GLEW_VERSION) returns %s\n-- test passed.\n", v);
return EXIT_SUCCESS;
} else {
printf("-- glewGetString(GLEW_VERSION) returns NULL\n-- test failed.\n");
return EXIT_FAILURE;
}
}

View File

@ -440,6 +440,9 @@
<Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project> <Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\glewinfo.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@ -439,6 +439,9 @@
<Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project> <Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\visualinfo.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

71
cmake-testbuild.sh Executable file
View File

@ -0,0 +1,71 @@
#!/bin/sh
# This script tests the CMake build:
#
# - builds the main CMakeLists.txt
# - builds and runs a small test app in a separate build tree so
# the config-module is tested, too
#
# Options (environment variables):
#
# - The variable BUILD_SHARED_LIBS will be forwarded to the CMake project
# that builds and installs the GLEW libraries. Set BUILD_SHARED_LIBS to
# ON or OFF to install only static or shared libs. Leave it unset to
# install both.
#
# Note: BUILD_SHARED_LIBS controls only what to install not what to build.
#
# - GLEW_USE_STATIC_LIBS will be forwarded to the test project that calls
# `find_package` to find GLEW. Set GLEW_USE_STATIC LIBS to ON or OFF force
# finding the shared or static versions of GLEW. Leave it unset to find
# the shared or what is available.
#
# Examples:
#
# Build & install shared + static, find default (shared)
#
# ./cmake-testbuild.shh
#
# Build & install shared + static, find static
#
# GLEW_USE_STATIC_LIBS=ON ./cmake-testbuild.sh
#
# Install static only (still build both)
#
# BUILD_SHARED_LIBS=OFF ./cmake-testbuild.sh
#
set -ex
rm -rf out/include
rm -rf out/lib*
rm -rf out/bin
if [ -n "$BUILD_SHARED_LIBS" ]; then
bsl=-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
else
bsl=-UBUILD_SHARED_LIBS
fi
if [ -n "$GLEW_USE_STATIC_LIBS" ]; then
gusl=-DGLEW_USE_STATIC_LIBS=$GLEW_USE_STATIC_LIBS
else
gusl=-UGLEW_USE_STATIC_LIBS
fi
cmake -Hbuild/cmake -Bout/build/glew -DCMAKE_INSTALL_PREFIX=${PWD}/out -DCMAKE_BUILD_TYPE=Debug $bsl
cmake --build out/build/glew --target install --config Debug
cmake out/build/glew -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/glew --target install --config Release --clean-first
cmake -Hbuild/cmake/testbuild -Bout/build/cmake-testbuild -DCMAKE_INSTALL_PREFIX=${PWD}/out -DCMAKE_PREFIX_PATH=${PWD}/out -DCMAKE_BUILD_TYPE=Debug $gusl
cmake --build out/build/cmake-testbuild --target install --config Debug
cmake out/build/cmake-testbuild -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/cmake-testbuild --target install --config Release --clean-first
export LD_LIBRARY_PATH=${PWD}/out/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=${PWD}/out/lib:$DYLD_LIBRARY_PATH
out/bin/cmake-test_d
out/bin/cmake-test

View File

@ -2,13 +2,14 @@ NAME = $(GLEW_NAME)
CC = cc CC = cc
LD = cc LD = cc
CFLAGS.EXTRA = -dynamic -fno-common CFLAGS.EXTRA = -dynamic -fno-common
CFLAGS.EXTRA += -ansi -pedantic
#CFLAGS.EXTRA += -no-cpp-precomp #CFLAGS.EXTRA += -no-cpp-precomp
LDFLAGS.EXTRA = LDFLAGS.EXTRA =
ifneq (undefined, $(origin GLEW_APPLE_GLX)) ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX' CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11 LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else else
LDFLAGS.GL = -framework AGL -framework OpenGL LDFLAGS.GL = -framework OpenGL
endif endif
LDFLAGS.STATIC = LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = LDFLAGS.DYNAMIC =

View File

@ -8,7 +8,7 @@ ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX' CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11 LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else else
LDFLAGS.GL = -framework AGL -framework OpenGL LDFLAGS.GL = -framework OpenGL
endif endif
LDFLAGS.STATIC = LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = LDFLAGS.DYNAMIC =

View File

@ -12,7 +12,7 @@ ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX' CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11 LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else else
LDFLAGS.GL = -framework AGL -framework OpenGL LDFLAGS.GL = -framework OpenGL
endif endif
LDFLAGS.DYNAMIC = LDFLAGS.DYNAMIC =
WARN = -Wall -W WARN = -Wall -W

View File

@ -8,7 +8,7 @@ ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX' CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11 LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else else
LDFLAGS.GL = -framework AGL -framework OpenGL LDFLAGS.GL = -framework OpenGL
endif endif
LDFLAGS.STATIC = LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = LDFLAGS.DYNAMIC =

View File

@ -24,6 +24,7 @@ WARN = -Wall -W
POPT = -O2 POPT = -O2
CFLAGS.EXTRA += -fPIC CFLAGS.EXTRA += -fPIC
CFLAGS.EXTRA += -Wcast-qual CFLAGS.EXTRA += -Wcast-qual
CFLAGS.EXTRA += -ansi -pedantic
BIN.SUFFIX = BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR) LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so LIB.DEVLNK = lib$(NAME).so

View File

@ -0,0 +1,38 @@
NAME = $(GLEW_NAME)
CC = clang
LD = clang
M_ARCH ?= $(shell uname -m)
ARCH64 = false
ifeq (x86_64,${M_ARCH})
ARCH64 = true
endif
ifeq (ppc64,${M_ARCH})
ARCH64 = true
endif
ifeq (${ARCH64},true)
LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
LIBDIR = $(GLEW_DEST)/lib64
else
LDFLAGS.EXTRA = -L/usr/X11R6/lib -L/usr/lib
LIBDIR = $(GLEW_DEST)/lib
endif
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
CFLAGS.EXTRA += -Wcast-qual
CFLAGS.EXTRA += -ansi -pedantic
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
LIB.DEVLNK.MX = lib$(NAME)mx.so
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)

View File

@ -1,5 +1,5 @@
GLEW_MAJOR = 1 GLEW_MAJOR = 1
GLEW_MINOR = 12 GLEW_MINOR = 13
GLEW_MICRO = 0 GLEW_MICRO = 0
GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO) GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO)
GLEW_NAME = GLEW GLEW_NAME = GLEW

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>
@ -108,7 +107,7 @@ Mac OS X, FreeBSD, Irix, and Solaris.
<a href="http://sourceforge.net/projects/glew/">GLEW</a> is distributed <a href="http://sourceforge.net/projects/glew/">GLEW</a> is distributed
as source and precompiled binaries.<br/> as source and precompiled binaries.<br/>
The latest release is The latest release is
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a>[26-01-15]: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a>[08-10-15]:
</p> </p>
<p> <p>
</p> </p>
@ -122,8 +121,8 @@ The latest release is
<td align="right"><b>Source</b></td> <td align="right"><b>Source</b></td>
<td></td> <td></td>
<td align="left"> <td align="left">
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0.zip/download">ZIP</a>&nbsp;|&nbsp; <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.zip/download">ZIP</a>&nbsp;|&nbsp;
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0.tgz/download">TGZ</a></td> <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.tgz/download">TGZ</a></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
@ -131,7 +130,7 @@ The latest release is
<td align="right"><b>Binaries</b></td> <td align="right"><b>Binaries</b></td>
<td></td> <td></td>
<td align="left"> <td align="left">
<a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0-win32.zip/download">Windows 32-bit and 64-bit</a> <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0-win32.zip/download">Windows 32-bit and 64-bit</a>
</td> </td>
<td></td> <td></td>
</tr> </tr>
@ -155,8 +154,8 @@ An up-to-date copy is also available using <a href="http://git-scm.com/">git</a>
<a href="https://sourceforge.net/projects/glew/files/glew/snapshots/">Unsupported snapshots</a> are also available: <a href="https://sourceforge.net/projects/glew/files/glew/snapshots/">Unsupported snapshots</a> are also available:
</p> </p>
<ul> <ul>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150805.tgz/download">glew-20150805.tgz</a></li>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150124.tgz/download">glew-20150124.tgz</a></li> <li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20150124.tgz/download">glew-20150124.tgz</a></li>
<li><a href="http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20140918.tgz/download">glew-20140918.tgz</a></li>
</ul> </ul>
<h2>Supported Extensions</h2> <h2>Supported Extensions</h2>
@ -171,6 +170,7 @@ The latest release contains support for OpenGL 4.5 and the following extensions:
<h2>News</h2> <h2>News</h2>
<ul> <ul>
<li>[08-10-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">GLEW 1.13.0</a> adds support for new extensions, fixes minor bugs</li>
<li>[26-01-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">GLEW 1.12.0</a> fixes minor bugs and adds new extensions</li> <li>[26-01-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">GLEW 1.12.0</a> fixes minor bugs and adds new extensions</li>
<li>[08-11-14] <a href="https://sourceforge.net/projects/glew/files/glew/1.11.0/">GLEW 1.11.0</a> adds support for OpenGL 4.5, new extensions</li> <li>[08-11-14] <a href="https://sourceforge.net/projects/glew/files/glew/1.11.0/">GLEW 1.11.0</a> adds support for OpenGL 4.5, new extensions</li>
<li>[07-22-13] <a href="https://sourceforge.net/projects/glew/files/glew/1.10.0/">GLEW 1.10.0</a> adds support for OpenGL 4.4, new extensions</li> <li>[07-22-13] <a href="https://sourceforge.net/projects/glew/files/glew/1.10.0/">GLEW 1.10.0</a> adds support for OpenGL 4.4, new extensions</li>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>
@ -97,7 +96,42 @@ THE POSSIBILITY OF SUCH DAMAGE.
<hr align="center"> <hr align="center">
<ul class="none"> <ul class="none">
<li><b>1.12.0</b> [26-01-15] <li><b>1.13.0</b> [08-10-15]
<ul>
<li> Enhancements:
<ul>
<li> glxewInit, wglewInit
<li> glewinfo adds support for -version, -profile core|compatibility and -flag debug|forward parameters
<li> Improved cmake build support
<ul>
<li> New extensions:
<ul>
<li> GL_ARB_ES3_2_compatibility
<li> GL_ARB_fragment_shader_interlock
<li> GL_ARB_gpu_shader_int64
<li> GL_ARB_parallel_shader_compile
<li> GL_ARB_post_depth_coverage
<li> GL_ARB_sample_locations
<li> GL_ARB_shader_atomic_counter_ops
<li> GL_ARB_shader_ballot
<li> GL_ARB_shader_clock
<li> GL_ARB_shader_viewport_layer_array
<li> GL_ARB_sparse_texture2
<li> GL_ARB_sparse_texture_clamp
<li> GL_ARB_texture_filter_minmax
<li> GL_INTEL_framebuffer_CMAA
<li> GL_KHR_no_error
<li> GL_NV_conservative_raster_dilate
<li> GL_OVR_multiview
<li> GL_OVR_multiview2
</ul>
<li> <a href="http://sourceforge.net/p/glew/bugs/milestone/1.13.0/">Bug fixes</a>
</ul>
</ul>
<hr align="center">
<ul class="none">
<li><b>1.12.0</b> [01-26-15]
<ul> <ul>
<li> New extensions: <li> New extensions:
<ul> <ul>

View File

@ -31,7 +31,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE. THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
<!-- &nbsp;<img src="new.png" height="12" alt="NEW!"> -->
<html> <html>
<head> <head>
<title>GLEW: The OpenGL Extension Wrangler Library</title> <title>GLEW: The OpenGL Extension Wrangler Library</title>
@ -47,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="top"> <td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">1.12.0</a></i></td></tr> <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">1.13.0</a></i></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr> <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
<tr><td align="center"><br></td></tr> <tr><td align="center"><br></td></tr>
@ -73,7 +72,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<td valign="bottom"> <td valign="bottom">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left"> <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td align="center"><i>Last Update: 26-01-15</i></td></tr> <tr><td align="center"><i>Last Update: 08-10-15</i></td></tr>
<tr><td align="center"> <tr><td align="center">
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/> <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/> <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>

View File

@ -37,7 +37,8 @@
#if defined(_WIN32) #if defined(_WIN32)
#include <GL/wglew.h> #include <GL/wglew.h>
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
#include <AGL/agl.h> #include <OpenGL/OpenGL.h>
#include <OpenGL/CGLTypes.h>
#elif !defined(__HAIKU__) #elif !defined(__HAIKU__)
#include <GL/glxew.h> #include <GL/glxew.h>
#endif #endif
@ -61,7 +62,7 @@ typedef struct GLContextStruct
HDC dc; HDC dc;
HGLRC rc; HGLRC rc;
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
AGLContext ctx, octx; CGLContextObj ctx, octx;
#elif !defined(__HAIKU__) #elif !defined(__HAIKU__)
Display* dpy; Display* dpy;
XVisualInfo* vi; XVisualInfo* vi;
@ -1072,30 +1073,28 @@ void InitContext (GLContext* ctx)
GLboolean CreateContext (GLContext* ctx) GLboolean CreateContext (GLContext* ctx)
{ {
int attrib[] = { AGL_RGBA, AGL_NONE }; CGLPixelFormatAttribute attrib[] = { kCGLPFAAccelerated, 0 };
AGLPixelFormat pf; CGLPixelFormatObj pf;
GLint npix;
CGLError error;
/* check input */ /* check input */
if (NULL == ctx) return GL_TRUE; if (NULL == ctx) return GL_TRUE;
/*int major, minor; error = CGLChoosePixelFormat(attrib, &pf, &npix);
SetPortWindowPort(wnd); if (error) return GL_TRUE;
aglGetVersion(&major, &minor); error = CGLCreateContext(pf, NULL, &ctx->ctx);
fprintf(stderr, "GL %d.%d\n", major, minor);*/ if (error) return GL_TRUE;
pf = aglChoosePixelFormat(NULL, 0, attrib); CGLReleasePixelFormat(pf);
if (NULL == pf) return GL_TRUE; ctx->octx = CGLGetCurrentContext();
ctx->ctx = aglCreateContext(pf, NULL); error = CGLSetCurrentContext(ctx->ctx);
if (NULL == ctx->ctx || AGL_NO_ERROR != aglGetError()) return GL_TRUE; if (error) return GL_TRUE;
aglDestroyPixelFormat(pf);
/*aglSetDrawable(ctx, GetWindowPort(wnd));*/
ctx->octx = aglGetCurrentContext();
if (GL_FALSE == aglSetCurrentContext(ctx->ctx)) return GL_TRUE;
return GL_FALSE; return GL_FALSE;
} }
void DestroyContext (GLContext* ctx) void DestroyContext (GLContext* ctx)
{ {
if (NULL == ctx) return; if (NULL == ctx) return;
aglSetCurrentContext(ctx->octx); CGLSetCurrentContext(ctx->octx);
if (NULL != ctx->ctx) aglDestroyContext(ctx->ctx); if (NULL != ctx->ctx) CGLReleaseContext(ctx->ctx);
} }
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */