mirror of
https://github.com/nigels-com/glew.git
synced 2025-01-19 02:55:48 +00:00
*** empty log message ***
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@233 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
fecaa911f5
commit
7214d0be63
@ -49,7 +49,7 @@ foreach my $ext (sort @extlist)
|
||||
if (keys %$functions)
|
||||
{
|
||||
print "static GLboolean _glewInit_$extname (" . $type .
|
||||
"EWContext* ctx)\n{\n GLboolean r = GL_FALSE;\n";
|
||||
"EW_CONTEXT_ARG_DEF)\n{\n GLboolean r = GL_FALSE;\n";
|
||||
output_decls($functions, \&make_pfn_def_init);
|
||||
print "\n return r;\n}\n";
|
||||
}
|
||||
|
@ -52,11 +52,11 @@ foreach my $ext (sort @extlist)
|
||||
{
|
||||
if ($extname =~ /WGL_.*/)
|
||||
{
|
||||
print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(ctx);\n";
|
||||
print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(ctx);\n";
|
||||
print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n";
|
||||
}
|
||||
}
|
||||
print "#endif /* $extname */\n";
|
||||
|
@ -54,7 +54,7 @@ GLboolean glewGetExtension (const char* name)
|
||||
#ifndef GLEW_MX
|
||||
static
|
||||
#endif
|
||||
GLenum glewContextInit (GLEWContext* ctx)
|
||||
GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF)
|
||||
{
|
||||
const GLubyte* s;
|
||||
GLuint i;
|
||||
|
@ -24,7 +24,7 @@ GLboolean glxewGetExtension (const char* name)
|
||||
#ifndef GLEW_MX
|
||||
static
|
||||
#endif
|
||||
GLenum glxewContextInit (GLXEWContext* ctx)
|
||||
GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF)
|
||||
{
|
||||
int major, minor;
|
||||
/* initialize core GLX 1.2 */
|
||||
|
@ -39,11 +39,11 @@ GLboolean glewExperimental = GL_FALSE;
|
||||
GLenum glewInit ()
|
||||
{
|
||||
GLenum r;
|
||||
if ( (r = glewContextInit(0)) ) return r;
|
||||
if ( (r = glewContextInit()) ) return r;
|
||||
#if defined(_WIN32)
|
||||
return wglewContextInit(0);
|
||||
return wglewContextInit();
|
||||
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
|
||||
return glxewContextInit(0);
|
||||
return glxewContextInit();
|
||||
#else
|
||||
return r;
|
||||
#endif /* _WIN32 */
|
||||
|
@ -96,10 +96,15 @@ static void *dlGetProcAddress (const GLubyte* name)
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define glewGetContext() ctx
|
||||
#define GLEW_CONTEXT_ARG_DEF GLEWContext* ctx
|
||||
#define WGLEW_CONTEXT_ARG_DEF WGLEWContext* ctx
|
||||
#define GLXEW_CONTEXT_ARG_DEF GLXEWContext* ctx
|
||||
#define GLEW_CONTEXT_ARG_VAR ctx
|
||||
#else
|
||||
#define GLEWContext void
|
||||
#define WGLEWContext void
|
||||
#define GLXEWContext void
|
||||
#define GLEW_CONTEXT_ARG_DEF void
|
||||
#define WGLEW_CONTEXT_ARG_DEF void
|
||||
#define GLXEW_CONTEXT_ARG_DEF void
|
||||
#define GLEW_CONTEXT_ARG_VAR
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) || !defined(GLEW_MX)
|
||||
|
@ -118,7 +118,7 @@
|
||||
#define WINGDIAPI __declspec(dllimport)
|
||||
#endif
|
||||
/* <ctype.h> */
|
||||
#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(_WCHAR_T_DEFINED)
|
||||
#if !defined(__CYGWIN__) && !defined(_WCHAR_T_DEFINED)
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
|
@ -34,7 +34,7 @@ GLboolean wglewGetExtension (const char* name)
|
||||
#ifndef GLEW_MX
|
||||
static
|
||||
#endif
|
||||
GLenum wglewContextInit (WGLEWContext* ctx)
|
||||
GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF)
|
||||
{
|
||||
GLboolean crippled;
|
||||
/* find wgl extension string query functions */
|
||||
|
@ -89,6 +89,7 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
|
||||
if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat"))
|
||||
{
|
||||
if (++p >= argc) return GL_TRUE;
|
||||
*display = 0;
|
||||
*visual = strtol(argv[p++], NULL, 0);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user