From 77b96ea0d6eba4afb7ace202231a8e08a0be95b3 Mon Sep 17 00:00:00 2001 From: mcgeagh Date: Wed, 8 Sep 2010 16:13:19 +0000 Subject: [ARM] Fixed: General OpenGL ES2.0 fixes git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33618 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- guilib/GUITextureGLES.cpp | 18 ++++++++++-------- xbmc/RenderSystemGLES.cpp | 8 ++++---- xbmc/WinSystemEGL.cpp | 6 +++--- xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/guilib/GUITextureGLES.cpp b/guilib/GUITextureGLES.cpp index 6fcd3692cf..8c4bbbef57 100644 --- a/guilib/GUITextureGLES.cpp +++ b/guilib/GUITextureGLES.cpp @@ -68,6 +68,15 @@ void CGUITextureGLES::Begin(color_t color) glEnableVertexAttribArray(colLoc); glEnableVertexAttribArray(tex0Loc); + // Setup Colors + for (int i = 0; i < 4; i++) + { + m_col[i][0] = (GLubyte)GET_R(color); + m_col[i][1] = (GLubyte)GET_G(color); + m_col[i][2] = (GLubyte)GET_B(color); + m_col[i][3] = (GLubyte)GET_A(color); + } + if (m_diffuse.size()) { GLint tex1Loc = g_Windowing.GUIShaderGetCoord1(); @@ -91,14 +100,7 @@ void CGUITextureGLES::Begin(color_t color) g_Windowing.EnableGUIShader(SM_TEXTURE_NOBLEND); } } - // Setup Colors - for (int i = 0; i < 4; i++) - { - m_col[i][0] = (GLubyte)GET_R(color); - m_col[i][1] = (GLubyte)GET_G(color); - m_col[i][2] = (GLubyte)GET_B(color); - m_col[i][3] = (GLubyte)GET_A(color); - } + } void CGUITextureGLES::End() diff --git a/xbmc/RenderSystemGLES.cpp b/xbmc/RenderSystemGLES.cpp index 7a6e20943b..d893f36efc 100644 --- a/xbmc/RenderSystemGLES.cpp +++ b/xbmc/RenderSystemGLES.cpp @@ -178,12 +178,12 @@ bool CRenderSystemGLES::ClearBuffers(color_t color) bool CRenderSystemGLES::IsExtSupported(const char* extension) { - if (extension == "GL_EXT_framebuffer_object") + if (strcmp( extension, "GL_EXT_framebuffer_object" ) == 0) { // GLES has FBO as a core element, not an extension! return true; } - else if (extension == "GL_TEXTURE_NPOT") + else if (strcmp( extension, "GL_TEXTURE_NPOT" ) == 0) { // GLES supports non-power-of-two textures as standard. return true; @@ -206,7 +206,7 @@ bool CRenderSystemGLES::IsExtSupported(const char* extension) } } -static int64_t abs(int64_t a) +static int64_t abs64(int64_t a) { if(a < 0) return -a; @@ -250,7 +250,7 @@ bool CRenderSystemGLES::PresentRender() diff = curr - m_iSwapStamp; m_iSwapStamp = curr; - if (abs(diff - m_iSwapRate) < abs(diff)) + if (abs64(diff - m_iSwapRate) < abs64(diff)) CLog::Log(LOGDEBUG, "%s - missed requested swap",__FUNCTION__); } diff --git a/xbmc/WinSystemEGL.cpp b/xbmc/WinSystemEGL.cpp index d1b409b741..f13fad46b7 100644 --- a/xbmc/WinSystemEGL.cpp +++ b/xbmc/WinSystemEGL.cpp @@ -410,9 +410,9 @@ void CWinSystemEGL::SetVSyncImpl(bool enable) void CWinSystemEGL::ShowOSMouse(bool show) { - // Have to force it to show the cursor, otherwise it hangs! - //SDL_ShowCursor(show ? 1 : 0); - SDL_ShowCursor(1); + SDL_ShowCursor(show ? 1 : 0); + // On BB have show the cursor, otherwise it hangs! (FIXME verify it if fixed) + //SDL_ShowCursor(1); } void CWinSystemEGL::NotifyAppActiveChange(bool bActivated) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp index b7b0eae715..d9df850126 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp @@ -663,9 +663,9 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha) VerifyGLState(); glEnable(GL_BLEND); - glFlush(); g_graphicsContext.EndPaint(); + glFinish(); } void CLinuxRendererGLES::FlipPage(int source) -- cgit v1.2.3