summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-11-11 18:06:29 +0200
committerTor Lillqvist <tml@collabora.com>2015-11-11 18:06:42 +0200
commitbb34de0189a7c2ac81c08f3a283a71c2e67093d3 (patch)
tree771b9b7798a201e8d7ec8e8b84bda6199fce4bbb /include/vcl
parent11fc639c0897a192f1da0c69d1f7ab683ff1208e (diff)
Move checkExtension() to a more private location
Change-Id: I9f8a4ca0991b59bb9b6af4d40e3136ce5c986731
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx39
1 files changed, 1 insertions, 38 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 783806d5d7db..695a43389b1e 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -72,43 +72,6 @@ class OpenGLTests;
/// Holds the information of our new child window
struct GLWindow
{
- // Copy of gluCheckExtension(), from the Apache-licensed
- // https://code.google.com/p/glues/source/browse/trunk/glues/source/glues_registry.c
- static GLboolean checkExtension(const GLubyte* extName, const GLubyte* extString)
- {
- GLboolean flag=GL_FALSE;
- char* word;
- char* lookHere;
- char* deleteThis;
-
- if (extString==nullptr)
- {
- return GL_FALSE;
- }
-
- deleteThis=lookHere=static_cast<char*>(malloc(strlen(reinterpret_cast<const char*>(extString))+1));
- if (lookHere==nullptr)
- {
- return GL_FALSE;
- }
-
- /* strtok() will modify string, so copy it somewhere */
- strcpy(lookHere, reinterpret_cast<const char*>(extString));
-
- while ((word=strtok(lookHere, " "))!=nullptr)
- {
- if (strcmp(word, reinterpret_cast<const char*>(extName))==0)
- {
- flag=GL_TRUE;
- break;
- }
- lookHere=nullptr; /* get next token */
- }
- free(static_cast<void*>(deleteThis));
-
- return flag;
- }
-
#if defined( _WIN32 )
HWND hWnd;
HDC hDC;
@@ -129,7 +92,7 @@ struct GLWindow
GLXContext ctx;
GLXPixmap glPix;
- bool HasGLXExtension( const char* name ) { return checkExtension( reinterpret_cast<const GLubyte*>(name), reinterpret_cast<const GLubyte*>(GLXExtensions) ); }
+ bool HasGLXExtension( const char* name ) const;
const char* GLXExtensions;
#endif
unsigned int bpp;