From 1339e182024d04fde3d88ddb0e5104d78af30b6f Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 15 Dec 2011 16:42:48 -0200 Subject: [PATCH] ... --- src/framework/graphics/particlemanager.cpp | 1 + src/framework/graphics/shader.cpp | 1 + src/framework/graphics/texture.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/framework/graphics/particlemanager.cpp b/src/framework/graphics/particlemanager.cpp index d1028d4d..6d1667f7 100644 --- a/src/framework/graphics/particlemanager.cpp +++ b/src/framework/graphics/particlemanager.cpp @@ -33,6 +33,7 @@ bool ParticleManager::load(const std::string& filename) try { OTMLDocumentPtr doc = OTMLDocument::parse(filename); + const OTMLNodePtr& node = doc->at("ParticleSystem"); for(const OTMLNodePtr& node : doc->children()) { if(node->tag() == "ParticleSystem") { ParticleSystemPtr particleSystem = ParticleSystemPtr(new ParticleSystem); diff --git a/src/framework/graphics/shader.cpp b/src/framework/graphics/shader.cpp index ca24c03d..0dad6090 100644 --- a/src/framework/graphics/shader.cpp +++ b/src/framework/graphics/shader.cpp @@ -56,6 +56,7 @@ bool Shader::compileSourceCode(const std::string& sourceCode) "#ifndef GL_FRAGMENT_PRECISION_HIGH\n" "#define highp mediump\n" "#endif\n"; + "precision highp float;\n" #endif std::string code = qualifierDefines; diff --git a/src/framework/graphics/texture.cpp b/src/framework/graphics/texture.cpp index 2ce5dc7c..e76cdc2e 100644 --- a/src/framework/graphics/texture.cpp +++ b/src/framework/graphics/texture.cpp @@ -67,7 +67,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int std::vector tmp; // old opengl drivers only accept power of two dimensions - //if(!g_painter.isExtensionSupported("GL_ARB_texture_non_power_of_two")) { + /* + if(!g_painter.isExtensionSupported("GL_ARB_texture_non_power_of_two")) { int glWidth = 1; while(glWidth < width) glWidth = glWidth << 1; @@ -86,8 +87,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int } m_glSize.resize(glWidth, glHeight); - //} else - // m_glSize = m_size; + } else */ + m_glSize = m_size; // detect pixels GL format GLenum format = 0;