Permalink
Browse files

fixed: gles rendersystem compile fixes

  • Loading branch information...
1 parent 8e98a4c commit 57d17bb9ec1fb3af7ac4c9fad9311f1b6000e03c Phaeodaria committed Jan 28, 2011
@@ -27,20 +27,20 @@
#if HAS_GLES == 2
#include <locale.h>
-#include "MatrixGLES.h"
+#include "guilib/MatrixGLES.h"
#include "LinuxRendererGLES.h"
#include "Application.h"
-#include "MathUtils.h"
-#include "Settings.h"
-#include "AdvancedSettings.h"
-#include "GUISettings.h"
-#include "FrameBufferObject.h"
+#include "utils/MathUtils.h"
+#include "settings/Settings.h"
+#include "settings/AdvancedSettings.h"
+#include "settings/GUISettings.h"
+#include "guilib/FrameBufferObject.h"
#include "VideoShaders/YUV2RGBShader.h"
#include "VideoShaders/VideoFilterShader.h"
-#include "WindowingFactory.h"
-#include "Texture.h"
-#include "../dvdplayer/Codecs/DllSwScale.h"
-#include "../dvdplayer/Codecs/DllAvCodec.h"
+#include "windowing/WindowingFactory.h"
+#include "guilib/Texture.h"
+#include "lib/DllSwScale.h"
+#include "lib/DllAvCodec.h"
#include "../dvdplayer/DVDCodecs/Video/OpenMaxVideo.h"
using namespace Shaders;
@@ -24,11 +24,11 @@
#if HAS_GLES == 2
-#include "../../../guilib/FrameBufferObject.h"
-#include "../../../guilib/Shader.h"
+#include "xbmc/guilib/FrameBufferObject.h"
+#include "xbmc/guilib/Shader.h"
#include "../../settings/VideoSettings.h"
#include "RenderFlags.h"
-#include "GraphicContext.h"
+#include "guilib/GraphicContext.h"
#include "BaseRenderer.h"
#include "../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h"
@@ -27,7 +27,7 @@
#if defined(HAVE_LIBOPENMAX)
#include "DVDClock.h"
-#include "GUISettings.h"
+#include "settings/GUISettings.h"
#include "DVDStreamInfo.h"
#include "DVDVideoCodecOpenMax.h"
#include "OpenMaxVideo.h"
@@ -23,6 +23,7 @@ SRCS+= DVDVideoCodecVDA.cpp \
endif
ifeq (@USE_OPENMAX@,1)
SRCS += OpenMax.cpp \
+ OpenMaxVideo.cpp \
DVDVideoCodecOpenMax.cpp \
endif
@@ -30,7 +30,7 @@
#include "DynamicDll.h"
#include "DVDClock.h"
#include "DVDStreamInfo.h"
-#include "WindowingFactory.h"
+#include "windowing/WindowingFactory.h"
#include "DVDVideoCodec.h"
#include "utils/log.h"
#include "utils/TimeUtils.h"
@@ -22,9 +22,9 @@
#if defined(HAVE_LIBOPENMAX)
-#include "DVDStreamInfo.h"
+#include "cores/dvdplayer/DVDStreamInfo.h"
#include "DVDVideoCodec.h"
-#include "utils/Event.h"
+#include "threads/Event.h"
#include <queue>
#include <semaphore.h>
@@ -29,7 +29,7 @@
#include "DVDClock.h"
#include "DVDStreamInfo.h"
-#include "WindowingFactory.h"
+#include "windowing/WindowingFactory.h"
#include "DVDVideoCodec.h"
#include "utils/log.h"
#include "utils/TimeUtils.h"
@@ -70,8 +70,8 @@
#include "MultiPathFile.h"
#include "FileTuxBox.h"
#include "FileUDF.h"
-#include "HDHomeRun.h"
#include "MythFile.h"
+#include "HDHomeRun.h"
#include "Application.h"
#include "URL.h"
#include "utils/log.h"
@@ -28,7 +28,7 @@
#include "gui3d.h"
#include "utils/log.h"
#if HAS_GLES == 2
-#include "WindowingFactory.h"
+#include "windowing/WindowingFactory.h"
#endif
// stuff for freetype
@@ -22,7 +22,9 @@
#include "system.h"
+#pragma message("msg1")
#if HAS_GLES == 2
+#pragma message("msg2")
#include "GUIShader.h"
#include "MatrixGLES.h"
@@ -45,15 +45,13 @@ void CGUITextureGLES::Begin(color_t color)
glBindTexture(GL_TEXTURE_2D, texture->GetTextureObject());
glEnable(GL_TEXTURE_2D);
- if (m_diffuse.size())
- {
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, m_diffuse.m_textures[0]->GetTextureObject());
- glEnable(GL_TEXTURE_2D);
- }
- else
+ // Setup Colors
+ for (int i = 0; i < 4; i++)
{
- g_Windowing.EnableGUIShader(SM_TEXTURE);
+ 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);
}
GLint posLoc = g_Windowing.GUIShaderGetPos();
@@ -68,39 +66,54 @@ 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);
- }
+ bool hasAlpha = m_texture.m_textures[m_currentFrame]->HasAlpha() || m_col[0][3] < 255;
if (m_diffuse.size())
{
+ if (m_col[0][0] == 255 && m_col[0][1] == 255 && m_col[0][2] == 255 && m_col[0][3] == 255 )
+ {
+ g_Windowing.EnableGUIShader(SM_MULTI);
+ }
+ else
+ {
+ g_Windowing.EnableGUIShader(SM_MULTI_BLENDCOLOR);
+ }
+
+ hasAlpha |= m_diffuse.m_textures[0]->HasAlpha();
+
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, m_diffuse.m_textures[0]->GetTextureObject());
+ glEnable(GL_TEXTURE_2D);
+
GLint tex1Loc = g_Windowing.GUIShaderGetCoord1();
glVertexAttribPointer(tex1Loc, 2, GL_FLOAT, 0, 0, m_tex1);
glEnableVertexAttribArray(tex1Loc);
- glEnable( GL_BLEND );
- g_Windowing.EnableGUIShader(SM_MULTI);
+
+ hasAlpha = true;
}
else
{
- CBaseTexture* textureObject = m_texture.m_textures[m_currentFrame];
- if (textureObject->HasAlpha() || m_col[0][3] < 255 )
+ if ( hasAlpha )
{
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND); // Turn Blending On
g_Windowing.EnableGUIShader(SM_TEXTURE);
}
else
{
- glDisable(GL_BLEND);
g_Windowing.EnableGUIShader(SM_TEXTURE_NOBLEND);
}
}
+
+ if ( hasAlpha )
+ {
+ glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+ glEnable( GL_BLEND );
+ }
+ else
+ {
+ glDisable(GL_BLEND);
+ }
+
}
void CGUITextureGLES::End()
View
@@ -46,7 +46,6 @@ SRCS=AnimatedGif.cpp \
GUIScrollBarControl.cpp \
GUISelectButtonControl.cpp \
GUISettingsSliderControl.cpp \
- GUIShader.cpp \
GUISliderControl.cpp \
GUISound.cpp \
GUISpinControl.cpp \
@@ -81,8 +80,12 @@ SRCS+=TextureGL.cpp \
GUITextureGL.cpp
endif
ifeq (@USE_OPENGLES@,1)
-SRCS+=GUITextureGLES.cpp \
- MatrixGLES.cpp
+SRCS+=TextureGL.cpp \
+ GUIFontTTFGL.cpp \
+ GUITextureGLES.cpp \
+ MatrixGLES.cpp \
+ GUIShader.cpp \
+
endif
LIB=guilib.a
@@ -8,6 +8,11 @@ SRCS+= DbusServer.cpp \
endif
+ifeq ($(findstring arm,$(ARCH)), arm)
+SRCS+= DbusServer.cpp \
+
+endif
+
LIB=interfaces.a
include @abs_top_srcdir@/Makefile.include
@@ -24,10 +24,10 @@
#if HAS_GLES == 2
-#include "GraphicContext.h"
-#include "AdvancedSettings.h"
+#include "guilib/GraphicContext.h"
+#include "settings/AdvancedSettings.h"
#include "RenderSystemGLES.h"
-#include "MatrixGLES.h"
+#include "guilib/MatrixGLES.h"
#include "utils/log.h"
#include "utils/TimeUtils.h"
#include "utils/SystemInfo.h"
@@ -24,8 +24,8 @@
#pragma once
-#include "RenderSystem.h"
-#include "GUIShader.h"
+#include "rendering/RenderSystem.h"
+#include "xbmc/guilib/GUIShader.h"
enum ESHADERMETHOD
{
@@ -43,7 +43,7 @@ extern CWinSystemX11GL g_Windowing;
#endif
#if defined(HAS_EGL)
-#include "gles/WinSystemEGL.h"
+#include "egl/WinSystemEGL.h"
extern CWinSystemEGL g_Windowing;
#endif
@@ -1,8 +1,9 @@
INCLUDES=-I. -I../.. -I../../linux
-SRCS=WinSystemGLES.cpp \
+SRCS=WinSystemEGL.cpp \
+ ../X11/XRandR.cpp
-LIB=windowing_gles.a
+LIB=windowing_egl.a
include ../../../Makefile.include
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
@@ -25,10 +25,10 @@
#include "WinSystemEGL.h"
#include "utils/log.h"
#include <SDL/SDL_syswm.h>
-#include "SpecialProtocol.h"
-#include "Settings.h"
-#include "Texture.h"
-#include "linux/XRandR.h"
+#include "filesystem/SpecialProtocol.h"
+#include "settings/Settings.h"
+#include "guilib/Texture.h"
+#include "windowing/X11/XRandR.h"
#include <vector>
using namespace std;
@@ -23,10 +23,10 @@
* http://www.gnu.org/copyleft/gpl.html
*
*/
-#include "WinSystem.h"
+#include "windowing/WinSystem.h"
#include <EGL/egl.h>
#include <X11/Xlib.h>
-#include "RenderSystemGLES.h"
+#include "rendering/gles/RenderSystemGLES.h"
class CWinSystemEGL : public CWinSystemBase, public CRenderSystemGLES
{

0 comments on commit 57d17bb

Please sign in to comment.