aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcgeagh <mcgeagh@svn>2010-09-08 16:13:19 +0000
committermcgeagh <mcgeagh@svn>2010-09-08 16:13:19 +0000
commit77b96ea0d6eba4afb7ace202231a8e08a0be95b3 (patch)
tree6ffd0f8509b5729431fa4ee295941384f1f2348b
parent1f34208c99db496e7c0d90e112890366123340c0 (diff)
[ARM] Fixed: General OpenGL ES2.0 fixes
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33618 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--guilib/GUITextureGLES.cpp18
-rw-r--r--xbmc/RenderSystemGLES.cpp8
-rw-r--r--xbmc/WinSystemEGL.cpp6
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp2
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)