From 5cbd1d458bd02ff5e6501f44197ed60384661da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Fri, 4 Feb 2011 17:30:36 +0100 Subject: [PATCH] kwin: Static member variables shouldn't have the m prefix. --- lib/kwinglutils.cpp | 38 +++++++++++++++++++------------------- lib/kwinglutils.h | 24 ++++++++++++------------ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 878c0d8dcf..72438b9472 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -357,9 +357,9 @@ void popMatrix() // GLTexture //**************************************** -bool GLTexture::mNPOTTextureSupported = false; -bool GLTexture::mFramebufferObjectSupported = false; -bool GLTexture::mSaturationSupported = false; +bool GLTexture::sNPOTTextureSupported = false; +bool GLTexture::sFramebufferObjectSupported = false; +bool GLTexture::sSaturationSupported = false; GLTexture::GLTexture() { @@ -432,13 +432,13 @@ void GLTexture::init() void GLTexture::initStatic() { #ifdef KWIN_HAVE_OPENGLES - mNPOTTextureSupported = true; - mFramebufferObjectSupported = true; - mSaturationSupported = true; + sNPOTTextureSupported = true; + sFramebufferObjectSupported = true; + sSaturationSupported = true; #else - mNPOTTextureSupported = hasGLExtension("GL_ARB_texture_non_power_of_two"); - mFramebufferObjectSupported = hasGLExtension("GL_EXT_framebuffer_object"); - mSaturationSupported = ((hasGLExtension("GL_ARB_texture_env_crossbar") + sNPOTTextureSupported = hasGLExtension("GL_ARB_texture_non_power_of_two"); + sFramebufferObjectSupported = hasGLExtension("GL_EXT_framebuffer_object"); + sSaturationSupported = ((hasGLExtension("GL_ARB_texture_env_crossbar") && hasGLExtension("GL_ARB_texture_env_dot3")) || hasGLVersion(1, 4)) && (glTextureUnitsCount >= 4) && glActiveTexture != NULL; #endif @@ -813,18 +813,18 @@ QImage GLTexture::convertToGLFormat(const QImage& img) const // GLShader //**************************************** -bool GLShader::mFragmentShaderSupported = false; -bool GLShader::mVertexShaderSupported = false; +bool GLShader::sFragmentShaderSupported = false; +bool GLShader::sVertexShaderSupported = false; void GLShader::initStatic() { #ifdef KWIN_HAVE_OPENGLES - mFragmentShaderSupported = mVertexShaderSupported = true; + sFragmentShaderSupported = sVertexShaderSupported = true; #else - mFragmentShaderSupported = mVertexShaderSupported = + sFragmentShaderSupported = sVertexShaderSupported = hasGLExtension("GL_ARB_shader_objects") && hasGLExtension("GL_ARB_shading_language_100"); - mVertexShaderSupported &= hasGLExtension("GL_ARB_vertex_shader"); - mFragmentShaderSupported &= hasGLExtension("GL_ARB_fragment_shader"); + sVertexShaderSupported &= hasGLExtension("GL_ARB_vertex_shader"); + sFragmentShaderSupported &= hasGLExtension("GL_ARB_fragment_shader"); #endif } @@ -1382,14 +1382,14 @@ void ShaderManager::resetShader(ShaderType type) } /*** GLRenderTarget ***/ -bool GLRenderTarget::mSupported = false; +bool GLRenderTarget::sSupported = false; void GLRenderTarget::initStatic() { #ifdef KWIN_HAVE_OPENGLES - mSupported = true; + sSupported = true; #else - mSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D; + sSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D; #endif } @@ -1401,7 +1401,7 @@ GLRenderTarget::GLRenderTarget(GLTexture* color) mTexture = color; // Make sure FBO is supported - if (mSupported && mTexture && !mTexture->isNull()) { + if (sSupported && mTexture && !mTexture->isNull()) { initFBO(); } else kError(1212) << "Render targets aren't supported!" << endl; diff --git a/lib/kwinglutils.h b/lib/kwinglutils.h index cf64e4b449..468d7b4bb5 100644 --- a/lib/kwinglutils.h +++ b/lib/kwinglutils.h @@ -249,13 +249,13 @@ public: static void initStatic(); static bool NPOTTextureSupported() { - return mNPOTTextureSupported; + return sNPOTTextureSupported; } static bool framebufferObjectSupported() { - return mFramebufferObjectSupported; + return sFramebufferObjectSupported; } static bool saturationSupported() { - return mSaturationSupported; + return sSaturationSupported; } protected: @@ -278,9 +278,9 @@ private: GLVertexBuffer* m_vbo; QSize m_cachedSize; - static bool mNPOTTextureSupported; - static bool mFramebufferObjectSupported; - static bool mSaturationSupported; + static bool sNPOTTextureSupported; + static bool sFramebufferObjectSupported; + static bool sSaturationSupported; Q_DISABLE_COPY(GLTexture) }; @@ -317,10 +317,10 @@ public: static void initStatic(); static bool fragmentShaderSupported() { - return mFragmentShaderSupported; + return sFragmentShaderSupported; } static bool vertexShaderSupported() { - return mVertexShaderSupported; + return sVertexShaderSupported; } @@ -336,8 +336,8 @@ protected: private: unsigned int mProgram; bool mValid; - static bool mFragmentShaderSupported; - static bool mVertexShaderSupported; + static bool sFragmentShaderSupported; + static bool sVertexShaderSupported; float mTextureWidth; float mTextureHeight; friend class ShaderManager; @@ -520,7 +520,7 @@ public: static void initStatic(); static bool supported() { - return mSupported; + return sSupported; } @@ -529,7 +529,7 @@ protected: private: - static bool mSupported; + static bool sSupported; GLTexture* mTexture; bool mValid;