mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-22 05:45:07 +00:00
Clarify name of extension string begin and end
This commit is contained in:
parent
1b38b41837
commit
48e4e82de0
@ -44,10 +44,10 @@ if (@ARGV)
|
||||
|
||||
print "#ifdef $extname\n";
|
||||
|
||||
if (length($extstring))
|
||||
{
|
||||
print " CONST_CAST(" . $extvar . ") = _glewSearchExtension(\"$extstring\", start, end);\n";
|
||||
}
|
||||
if (length($extstring))
|
||||
{
|
||||
print " CONST_CAST(" . $extvar . ") = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n";
|
||||
}
|
||||
|
||||
if (keys %$functions)
|
||||
{
|
||||
|
@ -21,8 +21,8 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
||||
const GLubyte* s;
|
||||
GLuint dot;
|
||||
GLint major, minor;
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
const GLubyte* extStart;
|
||||
const GLubyte* extEnd;
|
||||
/* query opengl version */
|
||||
s = glGetString(GL_VERSION);
|
||||
dot = _glewStrCLen(s, '.');
|
||||
@ -61,9 +61,9 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
||||
}
|
||||
|
||||
/* query opengl extensions string */
|
||||
start = glGetString(GL_EXTENSIONS);
|
||||
if (start == 0)
|
||||
start = (const GLubyte*)"";
|
||||
end = start + _glewStrLen(start);
|
||||
extStart = glGetString(GL_EXTENSIONS);
|
||||
if (extStart == 0)
|
||||
extStart = (const GLubyte*)"";
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
|
||||
/* initialize extensions */
|
||||
|
@ -15,8 +15,8 @@ GLboolean glxewGetExtension (const char* name)
|
||||
GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
|
||||
{
|
||||
int major, minor;
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
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;
|
||||
/* initialize flags */
|
||||
@ -44,10 +44,10 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
|
||||
}
|
||||
}
|
||||
/* query GLX extension string */
|
||||
start = 0;
|
||||
extStart = 0;
|
||||
if (glXGetCurrentDisplay != NULL)
|
||||
start = (const GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (start == 0)
|
||||
start = (const GLubyte *)"";
|
||||
end = start + _glewStrLen(start);
|
||||
extStart = (const GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (extStart == 0)
|
||||
extStart = (const GLubyte *)"";
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
/* initialize extensions */
|
||||
|
@ -23,19 +23,19 @@ GLboolean wglewGetExtension (const char* name)
|
||||
GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST)
|
||||
{
|
||||
GLboolean crippled;
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
const GLubyte* extStart;
|
||||
const GLubyte* extEnd;
|
||||
/* find wgl extension string query functions */
|
||||
_wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB");
|
||||
_wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT");
|
||||
/* query wgl extension string */
|
||||
if (_wglewGetExtensionsStringARB == NULL)
|
||||
if (_wglewGetExtensionsStringEXT == NULL)
|
||||
start = (const GLubyte*)"";
|
||||
extStart = (const GLubyte*)"";
|
||||
else
|
||||
start = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
||||
extStart = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
||||
else
|
||||
start = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
||||
end = start + _glewStrLen(start);
|
||||
extStart = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
/* initialize extensions */
|
||||
crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user