Skip to content

Commit

Permalink
Merge pull request xbmc#6561 from FernetMenta/sdlopengl
Browse files Browse the repository at this point in the history
SDL clean-up - remove HAS_SDL_OPENGL
  • Loading branch information
FernetMenta committed Mar 2, 2015
2 parents f3fe6fb + a55b387 commit 5a7ab40
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 274 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\xbmc\addons\include;..\..\..\..\..\xbmc\addons;..\..\..\..\..\xbmc\cores\dvdplayer\DVDDemuxers;..\..\..\..\..\xbmc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAS_SDL_OPENGL;HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\xbmc;..\..\..\..\..\xbmc\addons\include;..\..\..\..\..\xbmc\cores\dvdplayer\DVDDemuxers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAS_SDL_OPENGL;HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\xbmc;..\..\..\..\..\xbmc\addons\include;..\..\..\..\..\xbmc\cores\dvdplayer\DVDDemuxers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAS_SDL_OPENGL;HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\xbmc;..\..\..\..\..\xbmc\addons\include;..\..\..\..\..\xbmc\cores\dvdplayer\DVDDemuxers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAS_SDL_OPENGL;HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down
2 changes: 1 addition & 1 deletion xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ bool CApplication::CreateGUI()

uint32_t sdlFlags = 0;

#if (defined(HAS_SDL_OPENGL) || (HAS_GLES == 2)) && !defined(HAS_GLX)
#if defined(TARGET_DARWIN_OSX)
sdlFlags |= SDL_INIT_VIDEO;
#endif

Expand Down
2 changes: 0 additions & 2 deletions xbmc/addons/AddonDll.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ CAddonDll<TheDll, TheStruct, TheProps>::CAddonDll(const cp_extension_t *ext)
m_strLibName = CAddonMgr::Get().GetExtValue(ext->configuration, "@library_android");
#elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
m_strLibName = CAddonMgr::Get().GetExtValue(ext->configuration, "@library_linux");
#elif defined(TARGET_WINDOWS) && defined(HAS_SDL_OPENGL)
m_strLibName = CAddonMgr::Get().GetExtValue(ext->configuration, "@library_wingl");
#elif defined(TARGET_WINDOWS) && defined(HAS_DX)
m_strLibName = CAddonMgr::Get().GetExtValue(ext->configuration, "@library_windx");
#elif defined(TARGET_DARWIN)
Expand Down
4 changes: 0 additions & 4 deletions xbmc/addons/AddonManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ AddonPtr CAddonMgr::Factory(const cp_extension_t *props)
tograb = "@library_android";
#elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
tograb = "@library_linux";
#elif defined(TARGET_WINDOWS) && defined(HAS_SDL_OPENGL)
tograb = "@library_wingl";
#elif defined(TARGET_WINDOWS) && defined(HAS_DX)
tograb = "@library_windx";
#elif defined(TARGET_DARWIN)
Expand Down Expand Up @@ -794,8 +792,6 @@ bool CAddonMgr::PlatformSupportsAddon(const cp_plugin_info_t *plugin) const
if (*platform == "android")
#elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
if (*platform == "linux")
#elif defined(TARGET_WINDOWS) && defined(HAS_SDL_OPENGL)
if (*platform == "wingl")
#elif defined(TARGET_WINDOWS) && defined(HAS_DX)
if (*platform == "windx")
#elif defined(TARGET_DARWIN_OSX)
Expand Down
4 changes: 0 additions & 4 deletions xbmc/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
#if defined(TARGET_DARWIN_OSX)
#define HAS_GL
#define HAS_SDL
#define HAS_SDL_OPENGL
#define HAS_SDL_WIN_EVENTS
#endif
#define HAS_ZEROCONF
Expand All @@ -170,9 +169,6 @@
#endif
#ifdef HAVE_SDL
#define HAS_SDL
#ifndef HAS_SDL_OPENGL
#define HAS_SDL_OPENGL
#endif
#ifndef HAVE_X11
#define HAS_SDL_WIN_EVENTS
#endif
Expand Down
2 changes: 1 addition & 1 deletion xbmc/visualizations/Goom/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARCH=@ARCH@
INCLUDES=-I. -I.. -I../../linux -I../../ -Igoom2k4-0/src
OBJS=Main.o
SLIB=visualization.goom/Goom.vis
DEFINES+=-DHAS_SDL_OPENGL -DHAS_SDL
DEFINES+=-DHAS_GL
CXXFLAGS=-fPIC
DIRS=goom2k4-0
DISTCLEAN_FILES=../../../addons/visualization.goom
Expand Down
2 changes: 1 addition & 1 deletion xbmc/visualizations/Goom/build_xbmc_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ goom2k4-0/src/v3d.c \
goom2k4-0/src/xmmx.c \
"

gcc -c -O3 -g -D_WIN32PC -DHAS_SDL_OPENGL -DHAVE_MMX -D_MINGW -Igoom2k4-0/src/ -I../../../lib/libSDL-WIN32/include/ -I../../../visualisations/ ${GOOM_SRC} Main.cpp
gcc -c -O3 -g -D_WIN32PC -DHAVE_MMX -D_MINGW -Igoom2k4-0/src/ -I../../../lib/libSDL-WIN32/include/ -I../../../visualisations/ ${GOOM_SRC} Main.cpp

gcc -g -s -shared -o ../../../visualisations/goom_win32.vis *.o -lopengl32 -lstdc++
rm *.o
3 changes: 1 addition & 2 deletions xbmc/visualizations/OpenGLSpectrum/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ ifeq (@USE_OPENGLES@,1)
LDFLAGS += -lGLESv2
endif
else
DEFINES += -DHAS_SDL
DEFINES += -DHAS_SDL_OPENGL
DEFINES += -DHAS_GL
ifeq ($(findstring osx,$(ARCH)), osx)
LDFLAGS += -framework OpenGL
else
Expand Down
6 changes: 3 additions & 3 deletions xbmc/visualizations/OpenGLSpectrum/opengl_spectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static const char *vert = "attribute vec4 m_attrpos;\n"

static CVisGUIShader *vis_shader = NULL;

#elif defined(HAS_SDL_OPENGL)
#elif defined(HAS_GL)
#include <GL/glew.h>
static GLenum g_mode = GL_FILL;

Expand All @@ -102,7 +102,7 @@ static GLfloat z_angle = 0.0, z_speed = 0.0;
static GLfloat heights[16][16], cHeights[16][16], scale;
static GLfloat hSpeed = 0.05;

#if defined(HAS_SDL_OPENGL)
#if defined(HAS_GL)
static void draw_rectangle(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2)
{
if(y1 == y2)
Expand Down Expand Up @@ -606,7 +606,7 @@ extern "C" ADDON_STATUS ADDON_SetSetting(const char *strSetting, const void* val
}
else if (strcmp(strSetting, "mode")==0)
{
#if defined(HAS_SDL_OPENGL)
#if defined(HAS_GL)
switch (*(int*) value)
{
case 1:
Expand Down
21 changes: 0 additions & 21 deletions xbmc/visualizations/OpenGLSpectrum/opengl_spectrum.sln

This file was deleted.

211 changes: 0 additions & 211 deletions xbmc/visualizations/OpenGLSpectrum/opengl_spectrum.vcproj

This file was deleted.

Loading

0 comments on commit 5a7ab40

Please sign in to comment.