Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
third-party
glew
Commits
a4aa9b27
Commit
a4aa9b27
authored
Nov 19, 2015
by
Nigel Stewart
Browse files
Remove MX support due to the complexity of supporting both MX and Core contexts
parent
01b33567
Changes
27
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
a4aa9b27
...
...
@@ -81,7 +81,7 @@ endif
INCLUDE
=
-Iinclude
CFLAGS
=
$(OPT)
$(WARN)
$(INCLUDE)
$(CFLAGS.EXTRA)
all debug
:
glew.lib
glew.lib.mx
glew.bin
all debug
:
glew.lib glew.bin
# GLEW shared and static libraries
...
...
@@ -96,11 +96,6 @@ LIB.OBJS := $(LIB.OBJS:.c=.o)
LIB.SOBJS
:=
$(
addprefix
tmp/
$(SYSTEM)
/default/shared/,
$(LIB.SRCS.NAMES)
)
LIB.SOBJS
:=
$(LIB.SOBJS:.c=.o)
LIB.OBJS.MX
:=
$(
addprefix
tmp/
$(SYSTEM)
/mx/static/,
$(LIB.SRCS.NAMES)
)
LIB.OBJS.MX
:=
$(LIB.OBJS.MX:.c=.o)
LIB.SOBJS.MX
:=
$(
addprefix
tmp/
$(SYSTEM)
/mx/shared/,
$(LIB.SRCS.NAMES)
)
LIB.SOBJS.MX
:=
$(LIB.SOBJS.MX:.c=.o)
glew.lib
:
lib lib/$(LIB.SHARED) lib/$(LIB.STATIC) glew.pc
lib
:
...
...
@@ -150,54 +145,6 @@ glew.pc: glew.pc.in
-e
"s|@requireslib@|
$(LIBGLU)
|g"
\
<
$<
>
$@
# GLEW MX static and shared libraries
glew.lib.mx
:
lib lib/$(LIB.SHARED.MX) lib/$(LIB.STATIC.MX) glewmx.pc
lib/$(LIB.STATIC.MX)
:
$(LIB.OBJS.MX)
ifneq
($(AR),)
$(AR)
$(ARFLAGS)
$@
$^
else
ifneq
($(LIBTOOL),)
$(LIBTOOL)
$@
$^
endif
ifneq
($(STRIP),)
$(STRIP)
-x
$@
endif
lib/$(LIB.SHARED.MX)
:
$(LIB.SOBJS.MX)
$(LD)
$(LDFLAGS.SO.MX)
-o
$@
$^
$(LIB.LDFLAGS)
$(LIB.LIBS)
ifneq
($(LN),)
$(LN)
$(LIB.SHARED.MX)
lib/
$(LIB.SONAME.MX)
$(LN)
$(LIB.SHARED.MX)
lib/
$(LIB.DEVLNK.MX)
endif
ifneq
($(STRIP),)
$(STRIP)
-x
$@
endif
tmp/$(SYSTEM)/mx/static/glew.o
:
src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@
mkdir
-p
$(
dir
$@
)
$(CC)
-DGLEW_NO_GLU
-DGLEW_MX
-DGLEW_STATIC
$(CFLAGS)
$(CFLAGS.SO)
-o
$@
-c
$<
tmp/$(SYSTEM)/mx/shared/glew.o
:
src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@
mkdir
-p
$(
dir
$@
)
$(CC)
-DGLEW_NO_GLU
-DGLEW_MX
-DGLEW_BUILD
$(CFLAGS)
$(CFLAGS.SO)
-o
$@
-c
$<
# Force re-write of glewmx.pc, GLEW_DEST can vary
.PHONY
:
glewmx.pc
glewmx.pc
:
glew.pc.in
sed
\
-e
"s|@prefix@|
$(GLEW_PREFIX)
|g"
\
-e
"s|@libdir@|
$(LIBDIR)
|g"
\
-e
"s|@exec_prefix@|
$(BINDIR)
|g"
\
-e
"s|@includedir@|
$(INCDIR)
|g"
\
-e
"s|@version@|
$(GLEW_VERSION)
|g"
\
-e
"s|@cflags@|-DGLEW_MX|g"
\
-e
"s|@libname@|
$(NAME)
mx|g"
\
-e
"s|@requireslib@|
$(LIBGLU)
|g"
\
<
$<
>
$@
# GLEW utility programs
BIN.LIBS
=
-Llib
$(LDFLAGS.DYNAMIC)
-l
$(NAME)
$(LDFLAGS.EXTRA)
$(LDFLAGS.GL)
...
...
@@ -245,12 +192,10 @@ $(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.
# Install targets
install.all
:
install
install.mx
install.bin
install.all
:
install install.bin
install
:
install.include install.lib install.pkgconfig
install.mx
:
install.include install.lib.mx install.pkgconfig.mx
install.lib
:
glew.lib
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(LIBDIR)
"
# runtime
...
...
@@ -273,27 +218,6 @@ ifneq ($(LN),)
endif
$(INSTALL)
-m
0644
lib/$(LIB.STATIC)
"$(DESTDIR)$(LIBDIR)/"
install.lib.mx
:
glew.lib.mx
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(LIBDIR)
"
# runtime
ifeq
($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL)
-d
-m
0755
"$(DESTDIR)$(BINDIR)"
$(INSTALL)
-m
0755
lib/$(LIB.SHARED.MX)
"$(DESTDIR)$(BINDIR)/"
else
$(INSTALL)
-m
0644
lib/$(LIB.SHARED.MX)
"$(DESTDIR)$(LIBDIR)/"
endif
ifneq
($(LN),)
$(LN)
$(LIB.SHARED.MX)
"$(DESTDIR)$(LIBDIR)/$(LIB.SONAME.MX)"
endif
# development files
ifeq
($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL)
-m
0644
lib/$(LIB.DEVLNK.MX)
"$(DESTDIR)$(LIBDIR)/"
endif
ifneq
($(LN),)
$(LN)
$(LIB.SHARED.MX)
"$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK.MX)"
endif
$(INSTALL)
-m
0644
lib/$(LIB.STATIC.MX)
"$(DESTDIR)$(LIBDIR)/"
install.bin
:
glew.bin
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(BINDIR)
"
$(INSTALL)
-s
-m
0755 bin/
$(GLEWINFO.BIN)
bin/
$(VISUALINFO.BIN)
"
$(DESTDIR)$(BINDIR)
/"
...
...
@@ -309,30 +233,25 @@ install.pkgconfig: glew.pc
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(LIBDIR)
/pkgconfig"
$(INSTALL)
-m
0644 glew.pc
"
$(DESTDIR)$(LIBDIR)
/pkgconfig/"
install.pkgconfig.mx
:
glewmx.pc
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(LIBDIR)
"
$(INSTALL)
-d
-m
0755
"
$(DESTDIR)$(LIBDIR)
/pkgconfig"
$(INSTALL)
-m
0644 glewmx.pc
"
$(DESTDIR)$(LIBDIR)
/pkgconfig/"
uninstall
:
$(RM)
"
$(DESTDIR)$(INCDIR)
/wglew.h"
$(RM)
"
$(DESTDIR)$(INCDIR)
/glew.h"
$(RM)
"
$(DESTDIR)$(INCDIR)
/glxew.h"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.DEVLNK)
"
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.DEVLNK.MX)
"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.DEVLNK)
"
ifeq
($(filter-out mingw% cygwin,$(SYSTEM)),)
$(RM)
"
$(DESTDIR)$(BINDIR)
/
$(LIB.SHARED)
"
"
$(DESTDIR)$(BINDIR)
/
$(LIB.SHARED.MX)
"
$(RM)
"
$(DESTDIR)$(BINDIR)
/
$(LIB.SHARED)
"
else
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SONAME)
"
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SONAME.MX)
"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SHARED)
"
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SHARED.MX)
"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SONAME)
"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.SHARED)
"
endif
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.STATIC)
"
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.STATIC.MX)
"
$(RM)
"
$(DESTDIR)$(LIBDIR)
/
$(LIB.STATIC)
"
$(RM)
"
$(DESTDIR)$(BINDIR)
/
$(GLEWINFO.BIN)
"
"
$(DESTDIR)$(BINDIR)
/
$(VISUALINFO.BIN)
"
clean
:
$(RM)
-r
tmp/
$(RM)
-r
lib/
$(RM)
-r
bin/
$(RM)
glew.pc
glewmx.pc
$(RM)
glew.pc
distclean
:
clean
find
.
-name
\*
~ | xargs
$(RM)
...
...
auto/Makefile
View file @
a4aa9b27
...
...
@@ -250,7 +250,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
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/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader
\(\)
;/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(); _glewInit_GL_ARB_vertex_program(); }/g"
-pi
$@
perl
-e
"s/
\(\(
glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)
\"
glBlendEquation
\"
)) == NULL) || r;
\n
r = ((glColorSubTable = /g"
-pi
$@
rm
-f
$@
.bak
...
...
auto/bin/make_init.pl
View file @
a4aa9b27
...
...
@@ -23,7 +23,7 @@ sub make_pfn_def_init($%)
sub
make_reuse_call
($%)
{
return
"
r = _glewInit_
"
.
$_
[
0
]
.
"
(
GLEW_CONTEXT_ARG_VAR_INIT
) || r;
";
return
"
r = _glewInit_
"
.
$_
[
0
]
.
"
() || r;
";
}
#-------------------------------------------------------------------------------
...
...
@@ -49,8 +49,7 @@ if (@ARGV)
if
(
keys
%$functions
or
keys
@$reuse
)
{
print
"
#ifdef
$extname
\n\n
";
print
"
static GLboolean _glewInit_
$extname
(
"
.
$type
.
"
EW_CONTEXT_ARG_DEF_INIT)
\n
{
\n
GLboolean r = GL_FALSE;
\n
";
print
"
static GLboolean _glewInit_
$extname
()
\n
{
\n
GLboolean r = GL_FALSE;
\n
";
output_reuse
(
$reuse
,
\
&make_reuse_call
);
output_decls
(
$functions
,
\
&make_pfn_def_init
);
print
"
\n
return r;
\n
}
\n\n
";
...
...
auto/bin/make_initd.pl
View file @
a4aa9b27
...
...
@@ -36,8 +36,7 @@ if (@ARGV)
#print "#ifdef $extname\n\n";
if
(
keys
%$functions
)
{
print
"
static GLboolean _glewInit_
$extname
(
"
.
$type
.
"
EW_CONTEXT_ARG_DEF_INIT);
\n
";
print
"
static GLboolean _glewInit_
$extname
();
\n
";
}
#print "#endif /* $extname */\n\n";
}
...
...
auto/bin/make_list.pl
View file @
a4aa9b27
...
...
@@ -56,11 +56,11 @@ if (@ARGV)
{
if
(
$extname
=~
/WGL_.*/
)
{
print
"
if (glewExperimental ||
"
.
$extvar
.
"
|| crippled)
"
.
$extvar
.
"
= !_glewInit_
$extname
(
GLEW_CONTEXT_ARG_VAR_INIT
);
\n
";
print
"
if (glewExperimental ||
"
.
$extvar
.
"
|| crippled)
"
.
$extvar
.
"
= !_glewInit_
$extname
();
\n
";
}
else
{
print
"
if (glewExperimental ||
"
.
$extvar
.
"
)
"
.
$extvar
.
"
= !_glewInit_
$extname
(
GLEW_CONTEXT_ARG_VAR_INIT
);
\n
";
print
"
if (glewExperimental ||
"
.
$extvar
.
"
)
"
.
$extvar
.
"
= !_glewInit_
$extname
();
\n
";
}
}
...
...
auto/doc/advanced.html
View file @
a4aa9b27
...
...
@@ -110,45 +110,6 @@ WGL_ATI_pixel_format_float<br>
WGL_NV_float_buffer
<br>
</p>
<h2>
Multiple Rendering Contexts (GLEW MX)
</h2>
<p>
Starting with release 1.2.0, thread-safe support for multiple
rendering contexts, possibly with different capabilities, is
available. Since this is not required by most users, it is not added
to the binary releases to maintain compatibility between different
versions. To include multi-context support, you have to do the
following:
</p>
<ol>
<li>
Compile and use GLEW with the
<tt>
GLEW_MX
</tt>
preprocessor token
defined.
</li>
<li>
For each rendering context, create a
<tt>
GLEWContext
</tt>
object
that will be available as long as the rendering context exists.
</li>
<li>
Define a macro or function called
<tt>
glewGetContext()
</tt>
that
returns a pointer to the
<tt>
GLEWContext
</tt>
object associated with
the rendering context from which OpenGL/WGL/GLX calls are issued. This
dispatch mechanism is primitive, but generic.
<li>
Make sure that you call
<tt>
glewInit()
</tt>
after creating the
<tt>
GLEWContext
</tt>
object in each rendering context. Note, that the
<tt>
GLEWContext
</tt>
pointer returned by
<tt>
glewGetContext()
</tt>
has
to reside in global or thread-local memory.
</ol>
<p>
Note that according to the
<a
href=
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6yer.asp"
>
MSDN
WGL documentation
</a>
, you have to initialize the entry points for
every rendering context that use pixel formats with different
capabilities For example, the pixel formats provided by the generic
software OpenGL implementation by Microsoft vs. the hardware
accelerated pixel formats have different capabilities.
<b>
GLEW by
default ignores this requirement, and does not define per-context
entry points (you can however do this using the steps described
above).
</b>
Assuming a global namespace for the entry points works in
most situations, because typically all hardware accelerated pixel
formats provide the same entry points and capabilities. This means
that unless you use the multi-context version of GLEW, you need to
call
<tt>
glewInit()
</tt>
only once in your program, or more precisely,
once per process.
</p>
<h2>
Separate Namespace
</h2>
<p>
...
...
auto/src/glew.rc
View file @
a4aa9b27
#include <windows.h>
#ifdef GLEW_MX
# ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32mxsd.dll"
# else
# define FILENAME "glew32mxs.dll"
# endif
# else
# ifdef _DEBUG
# define FILENAME "glew32mxd.dll"
# else
# define FILENAME "glew32mx.dll"
# endif
# endif
#ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32sd.dll"
# else
# define FILENAME "glew32s.dll"
# endif
#else
# ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32sd.dll"
# else
# define FILENAME "glew32s.dll"
# endif
# else
# ifdef _DEBUG
# define FILENAME "glew32d.dll"
# else
# define FILENAME "glew32.dll"
# endif
# endif
# ifdef _DEBUG
# define FILENAME "glew32d.dll"
# else
# define FILENAME "glew32.dll"
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
...
...
auto/src/glew_head.c
View file @
a4aa9b27
...
...
@@ -13,35 +13,6 @@
#include <stdlib.h>
/* For malloc, free */
#include <string.h>
/* For memset */
/*
* 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 */
#if defined(GLEW_REGAL)
/* In GLEW_REGAL mode we call direcly into the linked
...
...
@@ -165,28 +136,16 @@ void* NSGLGetProcAddress (const GLubyte *name)
*/
#undef GLEW_GET_VAR
#ifdef GLEW_MX
# define GLEW_GET_VAR(x) (glewGetContext()->x)
#else
/* GLEW_MX */
# define GLEW_GET_VAR(x) (x)
#endif
/* GLEW_MX */
#ifdef WGLEW_GET_VAR
# undef WGLEW_GET_VAR
# ifdef GLEW_MX
# define WGLEW_GET_VAR(x) (wglewGetContext()->x)
# else
/* GLEW_MX */
# define WGLEW_GET_VAR(x) (x)
# endif
/* GLEW_MX */
# define WGLEW_GET_VAR(x) (x)
#endif
/* WGLEW_GET_VAR */
#ifdef GLXEW_GET_VAR
# undef GLXEW_GET_VAR
# ifdef GLEW_MX
# define GLXEW_GET_VAR(x) (glxewGetContext()->x)
# else
/* GLEW_MX */
# define GLXEW_GET_VAR(x) (x)
# endif
/* GLEW_MX */
# define GLXEW_GET_VAR(x) (x)
#endif
/* GLXEW_GET_VAR */
/*
...
...
auto/src/glew_init_gl.c
View file @
a4aa9b27
...
...
@@ -59,10 +59,7 @@ GLboolean GLEWAPIENTRY glewGetExtension (const char* name)
/* ------------------------------------------------------------------------- */
#ifndef GLEW_MX
static
#endif
GLenum
GLEWAPIENTRY
glewContextInit
(
GLEW_CONTEXT_ARG_DEF_LIST
)
static
GLenum
GLEWAPIENTRY
glewContextInit
()
{
const
GLubyte
*
s
;
GLuint
dot
;
...
...
auto/src/glew_init_glx.c
View file @
a4aa9b27
...
...
@@ -12,17 +12,13 @@ GLboolean glxewGetExtension (const char* name)
return
_glewSearchExtension
(
name
,
start
,
end
);
}
#ifdef GLEW_MX
GLenum
glxewContextInit
(
GLXEW_CONTEXT_ARG_DEF_LIST
)
#else
GLenum
glxewInit
(
GLXEW_CONTEXT_ARG_DEF_LIST
)
#endif
GLenum
glxewInit
()
{
int
major
,
minor
;
const
GLubyte
*
extStart
;
const
GLubyte
*
extEnd
;
/* initialize core GLX 1.2 */
if
(
_glewInit_GLX_VERSION_1_2
(
GLEW_CONTEXT_ARG_VAR_INIT
))
return
GLEW_ERROR_GLX_VERSION_11_ONLY
;
if
(
_glewInit_GLX_VERSION_1_2
())
return
GLEW_ERROR_GLX_VERSION_11_ONLY
;
/* initialize flags */
GLXEW_VERSION_1_0
=
GL_TRUE
;
GLXEW_VERSION_1_1
=
GL_TRUE
;
...
...
auto/src/glew_init_tail.c
View file @
a4aa9b27
...
...
@@ -32,8 +32,6 @@ const GLubyte * GLEWAPIENTRY glewGetString (GLenum name)
GLboolean
glewExperimental
=
GL_FALSE
;
#if !defined(GLEW_MX)
GLenum
GLEWAPIENTRY
glewInit
(
void
)
{
GLenum
r
;
...
...
@@ -49,5 +47,3 @@ GLenum GLEWAPIENTRY glewInit (void)
return
r
;
#endif
/* _WIN32 */
}
#endif
/* !GLEW_MX */
auto/src/glew_init_wgl.c
View file @
a4aa9b27
...
...
@@ -20,11 +20,7 @@ GLboolean GLEWAPIENTRY wglewGetExtension (const char* name)
return
_glewSearchExtension
(
name
,
start
,
end
);
}
#ifdef GLEW_MX
GLenum
GLEWAPIENTRY
wglewContextInit
(
WGLEW_CONTEXT_ARG_DEF_LIST
)
#else
GLenum
GLEWAPIENTRY
wglewInit
(
WGLEW_CONTEXT_ARG_DEF_LIST
)
#endif
GLenum
GLEWAPIENTRY
wglewInit
()
{
GLboolean
crippled
;
const
GLubyte
*
extStart
;
...
...
auto/src/glew_str_glx.c
View file @
a4aa9b27
...
...
@@ -6,11 +6,7 @@
#elif !defined(GLEW_OSMESA) && !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
#if defined(GLEW_MX)
GLboolean
glxewContextIsSupported
(
const
GLXEWContext
*
ctx
,
const
char
*
name
)
#else
GLboolean
glxewIsSupported
(
const
char
*
name
)
#endif
{
const
GLubyte
*
pos
=
(
const
GLubyte
*
)
name
;
GLuint
len
=
_glewStrLen
(
pos
);
...
...
auto/src/glew_str_head.c
View file @
a4aa9b27
#ifdef GLEW_MX
GLboolean
GLEWAPIENTRY
glewContextIsSupported
(
const
GLEWContext
*
ctx
,
const
char
*
name
)
#else
GLboolean
GLEWAPIENTRY
glewIsSupported
(
const
char
*
name
)
#endif
{
const
GLubyte
*
pos
=
(
const
GLubyte
*
)
name
;
GLuint
len
=
_glewStrLen
(
pos
);
...
...
auto/src/glew_str_wgl.c
View file @
a4aa9b27
...
...
@@ -6,11 +6,7 @@
#if defined(_WIN32) && !defined(GLEW_OSMESA)
#if defined(GLEW_MX)
GLboolean
GLEWAPIENTRY
wglewContextIsSupported
(
const
WGLEWContext
*
ctx
,
const
char
*
name
)
#else
GLboolean
GLEWAPIENTRY
wglewIsSupported
(
const
char
*
name
)
#endif
{
const
GLubyte
*
pos
=
(
const
GLubyte
*
)
name
;
GLuint
len
=
_glewStrLen
(
pos
);
...
...
auto/src/glew_tail.h
View file @
a4aa9b27
...
...
@@ -25,25 +25,6 @@ VERSION_MICRO GLEW_VERSION_MICRO_STRING
*/
/* API */
#ifdef GLEW_MX
typedef
struct
GLEWContextStruct
GLEWContext
;
GLEWAPI
GLenum
GLEWAPIENTRY
glewContextInit
(
GLEWContext
*
ctx
);
GLEWAPI
GLboolean
GLEWAPIENTRY
glewContextIsSupported
(
const
GLEWContext
*
ctx
,
const
char
*
name
);
#define glewInit() glewContextInit(glewGetContext())
#define glewIsSupported(x) glewContextIsSupported(glewGetContext(), x)
#define glewIsExtensionSupported(x) glewIsSupported(x)
#define GLEW_GET_VAR(x) (*(const GLboolean*)&(glewGetContext()->x))
#ifdef _WIN32
# define GLEW_GET_FUN(x) glewGetContext()->x
#else
# define GLEW_GET_FUN(x) x
#endif
#else
/* GLEW_MX */
GLEWAPI
GLenum
GLEWAPIENTRY
glewInit
(
void
);
GLEWAPI
GLboolean
GLEWAPIENTRY
glewIsSupported
(
const
char
*
name
);
#define glewIsExtensionSupported(x) glewIsSupported(x)
...
...
@@ -51,8 +32,6 @@ GLEWAPI GLboolean GLEWAPIENTRY glewIsSupported (const char *name);
#define GLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLEW_GET_FUN(x) x
#endif
/* GLEW_MX */
GLEWAPI
GLboolean
glewExperimental
;
GLEWAPI
GLboolean
GLEWAPIENTRY
glewGetExtension
(
const
char
*
name
);
GLEWAPI
const
GLubyte
*
GLEWAPIENTRY
glewGetErrorString
(
GLenum
error
);
...
...
auto/src/glewinfo.rc
View file @
a4aa9b27
#include <windows.h>
#ifdef GLEW_MX
# ifdef _DEBUG
# define FILENAME "glewinfo-mxd.exe"
# else
# define FILENAME "glewinfo-mx.exe"
# endif
#ifdef _DEBUG
# define FILENAME "glewinfod.exe"
#else
# ifdef _DEBUG
# define FILENAME "glewinfod.exe"
# else
# define FILENAME "glewinfo.exe"
# endif
# define FILENAME "glewinfo.exe"
#endif
/////////////////////////////////////////////////////////////////////////////
...
...
auto/src/glewinfo_head.c
View file @
a4aa9b27
...
...
@@ -21,18 +21,6 @@
static
FILE
*
f
;
#ifdef GLEW_MX
GLEWContext
_glewctx
;
#define glewGetContext() (&_glewctx)
#if defined(_WIN32)
WGLEWContext
_wglewctx
;
#define wglewGetContext() (&_wglewctx)
#elif !defined(GLEW_OSMESA) && !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
GLXEWContext
_glxewctx
;
#define glxewGetContext() (&_glxewctx)
#endif
#endif
/* Command-line parameters for GL context creation */
struct
createParams
...
...
auto/src/glewinfo_tail.c
View file @
a4aa9b27
...
...
@@ -46,18 +46,7 @@ int main (int argc, char** argv)
return
1
;
}
glewExperimental
=
GL_TRUE
;
#ifdef GLEW_MX
err
=
glewContextInit
(
glewGetContext
());
#if defined(GLEW_OSMESA)
#elif defined(_WIN32)
err
=
err
||
wglewContextInit
(
wglewGetContext
());
#elif !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
err
=
err
||
glxewContextInit
(
glxewGetContext
());
#endif
#else
err
=
glewInit
();
#endif
if
(
GLEW_OK
!=
err
)
{
fprintf
(
stderr
,
"Error [main]: glewInit failed: %s
\n
"
,
glewGetErrorString
(
err
));
...
...
auto/src/glxew_mid.h
View file @
a4aa9b27
/* ------------------------------------------------------------------------- */
#ifdef GLEW_MX
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif
/* GLEW_MX */
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment