summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-01 19:05:01 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-01 19:08:02 +0300
commita45370aa8bf7a5558801220d625bff89f3f1a185 (patch)
treea29cc2402b57e232389a2b22667e2a2a474cc30b /src
parent5359b7c20b9ee93989a840e555f0a2102b7bb806 (diff)
downloadplus-a45370aa8bf7a5558801220d625bff89f3f1a185.tar.gz
plus-a45370aa8bf7a5558801220d625bff89f3f1a185.tar.bz2
plus-a45370aa8bf7a5558801220d625bff89f3f1a185.tar.xz
plus-a45370aa8bf7a5558801220d625bff89f3f1a185.zip
fix renderer names and types.
Diffstat (limited to 'src')
-rw-r--r--src/render/graphics.cpp4
-rw-r--r--src/render/graphics.h6
-rw-r--r--src/render/mobileopenglgraphics.cpp2
-rw-r--r--src/render/normalopenglgraphics.cpp2
-rw-r--r--src/render/nullopenglgraphics.cpp2
-rw-r--r--src/render/renderers.h1
-rw-r--r--src/render/safeopenglgraphics.cpp2
-rw-r--r--src/render/sdl2graphics.cpp2
-rw-r--r--src/render/sdlgraphics.cpp2
-rw-r--r--src/render/surfacegraphics.cpp2
10 files changed, 17 insertions, 8 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 42de3429d..8a6c3e858 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -67,10 +67,10 @@ Graphics::Graphics() :
mDoubleBuffer(false),
mRect(),
mSecure(false),
- mOpenGL(0),
+ mOpenGL(RENDER_SOFTWARE),
mEnableResize(false),
mNoFrame(false),
- mName("Software"),
+ mName("Unknown"),
mStartFreeMem(0),
mSync(false),
mColor(),
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 5025709ec..c2fd7480a 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -27,6 +27,8 @@
#include "sdlshared.h"
+#include "render/renderers.h"
+
#include <guichan/color.hpp>
#include <guichan/graphics.hpp>
@@ -319,7 +321,7 @@ class Graphics : public gcn::Graphics
bool getDoubleBuffer() const A_WARN_UNUSED
{ return mDoubleBuffer; }
- int getOpenGL() const A_WARN_UNUSED
+ RenderType getOpenGL() const A_WARN_UNUSED
{ return mOpenGL; }
void setNoFrame(const bool n)
@@ -415,7 +417,7 @@ class Graphics : public gcn::Graphics
bool mDoubleBuffer;
SDL_Rect mRect;
bool mSecure;
- int mOpenGL;
+ RenderType mOpenGL;
bool mEnableResize;
bool mNoFrame;
std::string mName;
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 054588645..d8ed1bc3a 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -64,7 +64,7 @@ MobileOpenGLGraphics::MobileOpenGLGraphics():
#endif
mFbo()
{
- mOpenGL = 3;
+ mOpenGL = RENDER_GLES_OPENGL;
mName = "mobile OpenGL";
}
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 91cd429fb..56393d0da 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -66,7 +66,7 @@ NormalOpenGLGraphics::NormalOpenGLGraphics():
#endif
mFbo()
{
- mOpenGL = 1;
+ mOpenGL = RENDER_NORMAL_OPENGL;
mName = "fast OpenGL";
}
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 8030353eb..b3027a5c2 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -61,7 +61,7 @@ NullOpenGLGraphics::NullOpenGLGraphics():
#endif
mFbo()
{
- mOpenGL = 100;
+ mOpenGL = RENDER_NULL;
mName = "null OpenGL";
}
diff --git a/src/render/renderers.h b/src/render/renderers.h
index f7d58b5e9..2a6af27d2 100644
--- a/src/render/renderers.h
+++ b/src/render/renderers.h
@@ -30,6 +30,7 @@ enum RenderType
RENDER_SAFE_OPENGL = 2,
RENDER_GLES_OPENGL = 3,
RENDER_SDL2_DEFAULT = 4,
+ RENDER_NULL = 5,
RENDER_LAST
};
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index 1c7130475..9f9d0cd13 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -49,7 +49,7 @@ SafeOpenGLGraphics::SafeOpenGLGraphics():
mColorAlpha(false),
mFbo()
{
- mOpenGL = 2;
+ mOpenGL = RENDER_SAFE_OPENGL;
mName = "safe OpenGL";
}
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 82ad78198..c8974df29 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -74,6 +74,8 @@ SDLGraphics::SDLGraphics() :
mOldPixel(0),
mOldAlpha(0)
{
+ mOpenGL = RENDER_SDL2_DEFAULT;
+ mName = "SDL2 default";
}
SDLGraphics::~SDLGraphics()
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 9c410db8d..e194c51f8 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -50,6 +50,8 @@ SDLGraphics::SDLGraphics() :
mOldPixel(0),
mOldAlpha(0)
{
+ mOpenGL = RENDER_SOFTWARE;
+ mName = "Software";
}
SDLGraphics::~SDLGraphics()
diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp
index 9a8e51891..6075a9891 100644
--- a/src/render/surfacegraphics.cpp
+++ b/src/render/surfacegraphics.cpp
@@ -41,6 +41,8 @@ SurfaceGraphics::SurfaceGraphics() :
mBlitMode(BLIT_NORMAL),
mTarget(nullptr)
{
+ mOpenGL = RENDER_SOFTWARE;
+ mName = "Surface";
}
SurfaceGraphics::~SurfaceGraphics()