summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-01-06 23:13:05 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-01-06 23:13:05 +0100
commitedb1c0cbd62bfe7c620d7c8399f49acb98994b85 (patch)
treee6734198cd1dec222c9ed5596ba1dabaac74abf6 /src
parent8818a8e5db86f140230d789427373e1771747f5d (diff)
downloadcolobot-edb1c0cbd62bfe7c620d7c8399f49acb98994b85.tar.gz
colobot-edb1c0cbd62bfe7c620d7c8399f49acb98994b85.tar.bz2
colobot-edb1c0cbd62bfe7c620d7c8399f49acb98994b85.zip
GLEW fix for some graphics drivers
Diffstat (limited to 'src')
-rw-r--r--src/app/app.cpp2
-rw-r--r--src/graphics/opengl/gldevice.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 7323e2d..faf4526 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -444,8 +444,6 @@ bool CApplication::CreateVideoSurface()
// Use hardware surface if available
if (videoInfo->hw_available)
videoFlags |= SDL_HWSURFACE;
- else
- videoFlags |= SDL_SWSURFACE;
// Enable hardware blit if available
if (videoInfo->blit_hw)
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp
index c535609..80fa9a1 100644
--- a/src/graphics/opengl/gldevice.cpp
+++ b/src/graphics/opengl/gldevice.cpp
@@ -87,6 +87,8 @@ bool CGLDevice::Create()
{
glewInited = true;
+ glewExperimental = GL_TRUE;
+
if (glewInit() != GLEW_OK)
{
GetLogger()->Error("GLEW initialization failed\n");
@@ -95,7 +97,7 @@ bool CGLDevice::Create()
m_multitextureAvailable = glewIsSupported("GL_ARB_multitexture GL_ARB_texture_env_combine");
if (!m_multitextureAvailable)
- GetLogger()->Error("GLEW reports multitexturing not supported - graphics quality will be degraded!\n");
+ GetLogger()->Warn("GLEW reports multitexturing not supported - graphics quality will be degraded!\n");
m_vboAvailable = glewIsSupported("GL_ARB_vertex_buffer_object");
if (m_vboAvailable)
@@ -415,7 +417,9 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par
result.size.y = data->surface->h;
// Use & enable 1st texture stage
- glActiveTexture(GL_TEXTURE0);
+ if (m_multitextureAvailable)
+ glActiveTexture(GL_TEXTURE0);
+
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &result.id);