summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphicsmanager.cpp36
-rw-r--r--src/gui/editserverdialog.cpp3
-rw-r--r--src/tileset.h2
3 files changed, 25 insertions, 16 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 34b16989a..5a02b1776 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -20,16 +20,12 @@
#include "graphicsmanager.h"
-#define GL_GLEXT_PROTOTYPES 1
#ifndef WIN32
+#define GL_GLEXT_PROTOTYPES 1
#include "GL/glx.h"
// hack to hide warnings
#undef GL_GLEXT_VERSION
#undef GL_GLEXT_PROTOTYPES
-//#else
-//#include "GL/glext.h"
-//#undef GL_GLEXT_VERSION
-//#undef WIN32_LEAN_AND_MEAN
#endif
#include "configuration.h"
@@ -56,7 +52,9 @@ GraphicsManager graphicsManager;
GraphicsManager::GraphicsManager() :
mMinor(0),
- mMajor(0)
+ mMajor(0),
+ mPlatformMinor(0),
+ mPlatformMajor(0)
{
}
@@ -253,7 +251,7 @@ void GraphicsManager::updatePlanformExtensions()
return;
HDC hdc = GetDC(info.window);
- if (hdc > 0)
+ if (hdc)
{
const char *extensions = mwglGetExtensionsString (hdc);
if (extensions)
@@ -480,12 +478,16 @@ void GraphicsManager::createFBO(int width, int height, FBOInfo *fbo)
// create a texture object
glGenTextures(1, &fbo->textureId);
glBindTexture(OpenGLImageHelper::mTextureType, fbo->textureId);
- glTexParameterf(OpenGLImageHelper::mTextureType, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(OpenGLImageHelper::mTextureType, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(OpenGLImageHelper::mTextureType, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(OpenGLImageHelper::mTextureType, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(OpenGLImageHelper::mTextureType, 0, GL_RGBA8, width, height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
+ glTexParameterf(OpenGLImageHelper::mTextureType,
+ GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameterf(OpenGLImageHelper::mTextureType,
+ GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterf(OpenGLImageHelper::mTextureType,
+ GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(OpenGLImageHelper::mTextureType,
+ GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexImage2D(OpenGLImageHelper::mTextureType, 0, GL_RGBA8, width, height,
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glBindTexture(OpenGLImageHelper::mTextureType, 0);
// create a renderbuffer object to store depth info
@@ -539,12 +541,14 @@ void GraphicsManager::deleteFBO(FBOInfo *fbo)
}
#ifdef WIN32
-#define getFunction(name) wglGetProcAddress(name);
+#define getFunction(name) wglGetProcAddress(name)
#else
-#define getFunction(name) glXGetProcAddress((const GLubyte*)(name))
+#define getFunction(name) glXGetProcAddress(\
+ reinterpret_cast<const GLubyte*>(name))
#endif
-#define assignFunction(func, name) m##func = (func##_t)getFunction(name)
+#define assignFunction(func, name) m##func \
+ = reinterpret_cast<func##_t>(getFunction(name))
void GraphicsManager::initOpenGLFunctions()
{
diff --git a/src/gui/editserverdialog.cpp b/src/gui/editserverdialog.cpp
index 434a4f827..28103e350 100644
--- a/src/gui/editserverdialog.cpp
+++ b/src/gui/editserverdialog.cpp
@@ -159,6 +159,9 @@ EditServerDialog::EditServerDialog(ServerDialog *parent, ServerInfo server,
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
+#ifndef EATHENA_SUPPORT
+ case ServerInfo::EATHENA:
+#endif
mTypeField->setSelected(0);
break;
case ServerInfo::EVOL:
diff --git a/src/tileset.h b/src/tileset.h
index 5c21e8835..f60e95266 100644
--- a/src/tileset.h
+++ b/src/tileset.h
@@ -25,6 +25,8 @@
#include "resources/imageset.h"
+#include <map>
+
/**
* A tileset, which is basically just an image set but it stores a firstgid.
*/