Merge https://github.com/nigels-com/glew.git into master HEAD at Sat Feb 2 17:44:17 GMT 2019

This commit is contained in:
Gyusun Yeom 2019-02-03 02:44:17 +09:00
commit b2ea0143bd
31 changed files with 97 additions and 56 deletions

View File

@ -45,6 +45,8 @@ Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel` RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
FreeBSD: `# pkg install xorg lang/gcc git cmake gmake bash python perl5`
##### Build ##### Build
$ make $ make

View File

@ -114,7 +114,7 @@ ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
xargs -J % cp % $(EXT) xargs -J % cp % $(EXT)
else else
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \ find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
xargs cp --target-directory=$(EXT) xargs -I % -n 1 cp % $(EXT)
endif endif
touch $@ touch $@
@ -290,7 +290,7 @@ $(S.DEST)/glewinfo.c: $(EXT)/.dummy
$(BIN)/make_info_list.pl $(EGL_CORE_SPEC) >> $@ $(BIN)/make_info_list.pl $(EGL_CORE_SPEC) >> $@
$(BIN)/make_info_list.pl $(EGL_EXT_SPEC) >> $@ $(BIN)/make_info_list.pl $(EGL_EXT_SPEC) >> $@
cat $(SRC)/glewinfo_tail.c >> $@ cat $(SRC)/glewinfo_tail.c >> $@
perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc("glColorSubTable"/g' -pi $@ perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc(fi, "glColorSubTable"/g' -pi $@
rm -f $@.bak rm -f $@.bak
# Update documentation # Update documentation

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/usr/bin/env bash
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##
@ -77,10 +78,6 @@ EOT
# fix GL_NV_occlusion_query and GL_HP_occlusion_test # fix GL_NV_occlusion_query and GL_HP_occlusion_test
grep -v '_HP' $1/GL_NV_occlusion_query > tmp grep -v '_HP' $1/GL_NV_occlusion_query > tmp
mv tmp $1/GL_NV_occlusion_query mv tmp $1/GL_NV_occlusion_query
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
$1/GL_HP_occlusion_test
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
$1/GL_HP_occlusion_test
# add deprecated constants to GL_ATI_fragment_shader # add deprecated constants to GL_ATI_fragment_shader
cat >> $1/GL_ATI_fragment_shader <<EOT cat >> $1/GL_ATI_fragment_shader <<EOT
@ -338,11 +335,6 @@ EOT
grep -v "glGetPointerv" $1/GL_KHR_debug > tmp grep -v "glGetPointerv" $1/GL_KHR_debug > tmp
mv tmp $1/GL_KHR_debug mv tmp $1/GL_KHR_debug
# Remove GL_ARB_debug_group, GL_ARB_debug_label and GL_ARB_debug_output2, for now
rm -f $1/GL_ARB_debug_group
rm -f $1/GL_ARB_debug_label
rm -f $1/GL_ARB_debug_output2
# add typedefs to GL_ARB_cl_event # add typedefs to GL_ARB_cl_event
# parse_spec.pl can't parse typedefs from New Types section, but ought to # parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_cl_event <<EOT cat >> $1/GL_ARB_cl_event <<EOT

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/usr/bin/env bash
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,4 +1,5 @@
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##
@ -19,7 +20,7 @@ do 'bin/make.pl';
sub make_pfn_info($%) sub make_pfn_info($%)
{ {
my $name = $_[0]; my $name = $_[0];
return " glewInfoFunc(\"$_[0]\", $name == NULL);"; return " glewInfoFunc(fi, \"$_[0]\", $name == NULL);";
} }
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
@ -43,13 +44,23 @@ if (@ARGV)
#make_separator($extname); #make_separator($extname);
print "#ifdef $extname\n\n"; print "#ifdef $extname\n\n";
print "static void _glewInfo_$extname (void)\n{\n"; print "static void _glewInfo_$extname (void)\n{\n";
if ($extvar =~ /VERSION/)
if (! %$functions)
{ {
print " glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n"; print " ";
} }
else else
{ {
print " glewPrintExt(\"$extname\", $extvar, $extpre" . print " GLboolean fi = ";
}
if ($extvar =~ /VERSION/)
{
print "glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
}
else
{
print "glewPrintExt(\"$extname\", $extvar, $extpre" .
"ewIsSupported(\"$extname\"), $extpre" . "ewIsSupported(\"$extname\"), $extpre" .
"ewGetExtension(\"$extstring\"));\n"; "ewGetExtension(\"$extstring\"));\n";
} }

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl #!/usr/bin/env perl
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/usr/bin/env bash
## ##
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## ##

View File

@ -42,6 +42,7 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n" "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\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-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n" "Copyright (C) 2002, Lev Povalahev\r\n"
@ -119,7 +120,7 @@ BEGIN
VALUE "FileDescription", "The OpenGL Extension Wrangler Library\0" VALUE "FileDescription", "The OpenGL Extension Wrangler Library\0"
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0" VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"
VALUE "InternalName", "GLEW\0" VALUE "InternalName", "GLEW\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0" VALUE "LegalCopyright", "© 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0" VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"

View File

@ -1,6 +1,6 @@
/* /*
** The OpenGL Extension Wrangler Library ** The OpenGL Extension Wrangler Library
** Copyright (C) 2008-2017, Nigel Stewart <nigels[]users sourceforge net> ** Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
** Copyright (C) 2002, Lev Povalahev ** Copyright (C) 2002, Lev Povalahev

View File

@ -30,6 +30,7 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n" "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\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-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n" "Copyright (C) 2002, Lev Povalahev\r\n"
@ -107,7 +108,7 @@ BEGIN
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"
VALUE "InternalName", "glewinfo\0" VALUE "InternalName", "glewinfo\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0" VALUE "LegalCopyright", "© 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0" VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"

View File

@ -40,6 +40,9 @@ struct createParams
/* https://www.opengl.org/registry/specs/ARB/glx_create_context.txt */ /* https://www.opengl.org/registry/specs/ARB/glx_create_context.txt */
int profile; /* core = 1, compatibility = 2 */ int profile; /* core = 1, compatibility = 2 */
int flags; /* debug = 1, forward compatible = 2 */ int flags; /* debug = 1, forward compatible = 2 */
/* GLEW experimental mode */
int experimental;
}; };
GLboolean glewCreateContext (struct createParams *params); GLboolean glewCreateContext (struct createParams *params);
@ -50,7 +53,7 @@ void glewDestroyContext ();
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3) static GLboolean glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3)
{ {
unsigned int i; unsigned int i;
fprintf(f, "\n%s:", name); fprintf(f, "\n%s:", name);
@ -65,15 +68,19 @@ static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLbo
for (i=0; i<strlen(name)+1; i++) fprintf(f, "-"); for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
fprintf(f, "\n"); fprintf(f, "\n");
fflush(f); fflush(f);
return def1 || def2 || def3 || glewExperimental; /* Enable per-function info too? */
} }
static void glewInfoFunc (const char* name, GLint undefined) static void glewInfoFunc (GLboolean fi, const char* name, GLint undefined)
{ {
unsigned int i; unsigned int i;
fprintf(f, " %s:", name); if (fi)
for (i=0; i<60-strlen(name); i++) fprintf(f, " "); {
fprintf(f, "%s\n", undefined ? "MISSING" : "OK"); fprintf(f, " %s:", name);
fflush(f); for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
fflush(f);
}
} }
/* ----------------------------- GL_VERSION_1_1 ---------------------------- */ /* ----------------------------- GL_VERSION_1_1 ---------------------------- */

View File

@ -20,7 +20,8 @@ int main (int argc, char** argv)
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
0, /* profile mask */ 0, /* profile mask */
0 /* flags */ 0, /* flags */
0 /* experimental */
}; };
#if defined(GLEW_EGL) #if defined(GLEW_EGL)
@ -41,7 +42,8 @@ int main (int argc, char** argv)
#endif #endif
"[-version <OpenGL version>] " "[-version <OpenGL version>] "
"[-profile core|compatibility] " "[-profile core|compatibility] "
"[-flag debug|forward]" "[-flag debug|forward] "
"[-experimental]"
"\n"); "\n");
return 1; return 1;
} }
@ -52,7 +54,7 @@ int main (int argc, char** argv)
glewDestroyContext(); glewDestroyContext();
return 1; return 1;
} }
glewExperimental = GL_TRUE; glewExperimental = params.experimental ? GL_TRUE : GL_FALSE;
err = glewInit(); err = glewInit();
if (GLEW_OK != err) if (GLEW_OK != err)
{ {
@ -162,13 +164,18 @@ GLboolean glewParseArgs (int argc, char** argv, struct createParams *params)
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
params->display = argv[p++]; 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;
params->visual = (int)strtol(argv[p++], NULL, 0); params->visual = (int)strtol(argv[p++], NULL, 0);
} }
#endif #endif
else if (!strcmp(argv[p], "-experimental"))
{
params->experimental = 1;
++p;
}
else else
return GL_TRUE; return GL_TRUE;
} }

View File

@ -1,7 +1,7 @@
<!-- begin header.html --> <!-- begin header.html -->
<!-- <!--
The OpenGL Extension Wrangler Library The OpenGL Extension Wrangler Library
Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net> Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev Copyright (C) 2002, Lev Povalahev

View File

@ -30,6 +30,7 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n" "The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\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-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n" "Copyright (C) 2002, Lev Povalahev\r\n"
@ -107,7 +108,7 @@ BEGIN
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"
VALUE "InternalName", "visualinfo\0" VALUE "InternalName", "visualinfo\0"
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0" VALUE "LegalCopyright", "© 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0" VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"

View File

@ -42,9 +42,8 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
find_package (OpenGL REQUIRED) find_package (OpenGL REQUIRED)
# X11 required when builing visualinfo and glewinfo, # X11 required except for Windows and Apple OSX platforms
# but not for Windows or Apple OSX platforms if (NOT WIN32 AND NOT APPLE)
if (BUILD_UTILS AND NOT WIN32 AND NOT APPLE)
find_package (X11) find_package (X11)
endif() endif()
@ -55,7 +54,7 @@ else ()
set (DLL_PREFIX lib) set (DLL_PREFIX lib)
endif () endif ()
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES}) set (GLEW_LIBRARIES ${OPENGL_LIBRARIES} ${X11_LIBRARIES})
add_definitions (-DGLEW_NO_GLU) add_definitions (-DGLEW_NO_GLU)
@ -96,7 +95,7 @@ endif ()
#### GLEW #### #### GLEW ####
include_directories (${GLEW_DIR}/include) include_directories (${GLEW_DIR}/include ${X11_INCLUDE_DIR})
set (GLEW_PUBLIC_HEADERS_FILES ${GLEW_DIR}/include/GL/wglew.h ${GLEW_DIR}/include/GL/glew.h ${GLEW_DIR}/include/GL/glxew.h) set (GLEW_PUBLIC_HEADERS_FILES ${GLEW_DIR}/include/GL/wglew.h ${GLEW_DIR}/include/GL/glew.h ${GLEW_DIR}/include/GL/glxew.h)
set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c) set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)

View File

@ -1,11 +1,13 @@
# As of FreeBSD12 X11 is in /usr/local
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC = cc
LD = ld LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.EXTRA = -L/usr/local/lib
LDFLAGS.GL = -lGL -lX11 LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include -fPIC CFLAGS.EXTRA += -I/usr/local/include -fPIC
NAME = GLEW NAME = GLEW
WARN = -Wall -W WARN = -Wall -W
POPT = -O2 POPT = -O2