Have a separate list for glx extensions, to avoid mistakes - now initGL()
is called after initGLX(), so the glx extensions are reset. svn path=/trunk/KDE/kdebase/workspace/; revision=669818
This commit is contained in:
parent
b70a68b02b
commit
eb4fb38657
1 changed files with 4 additions and 3 deletions
|
@ -36,6 +36,7 @@ static int glVersion;
|
||||||
static int glXVersion;
|
static int glXVersion;
|
||||||
// List of all supported GL and GLX extensions
|
// List of all supported GL and GLX extensions
|
||||||
static QStringList glExtensions;
|
static QStringList glExtensions;
|
||||||
|
static QStringList glxExtensions;
|
||||||
|
|
||||||
int glTextureUnitsCount;
|
int glTextureUnitsCount;
|
||||||
|
|
||||||
|
@ -47,8 +48,8 @@ void initGLX()
|
||||||
int major, minor;
|
int major, minor;
|
||||||
glXQueryVersion( display(), &major, &minor );
|
glXQueryVersion( display(), &major, &minor );
|
||||||
glXVersion = MAKE_GL_VERSION( major, minor, 0 );
|
glXVersion = MAKE_GL_VERSION( major, minor, 0 );
|
||||||
// Get list of supported GLX extensions. Simply add it to the list of OpenGL extensions.
|
// Get list of supported GLX extensions
|
||||||
glExtensions += QString((const char*)glXQueryExtensionsString(
|
glxExtensions = QString((const char*)glXQueryExtensionsString(
|
||||||
display(), DefaultScreen( display()))).split(" ");
|
display(), DefaultScreen( display()))).split(" ");
|
||||||
|
|
||||||
glxResolveFunctions();
|
glxResolveFunctions();
|
||||||
|
@ -84,7 +85,7 @@ bool hasGLXVersion(int major, int minor, int release)
|
||||||
|
|
||||||
bool hasGLExtension(const QString& extension)
|
bool hasGLExtension(const QString& extension)
|
||||||
{
|
{
|
||||||
return glExtensions.contains(extension);
|
return glExtensions.contains(extension) || glxExtensions.contains(extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkGLError( const char* txt )
|
void checkGLError( const char* txt )
|
||||||
|
|
Loading…
Reference in a new issue