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