This commit is contained in:
Eduardo Bart 2011-12-15 16:42:48 -02:00
parent 8926f33679
commit 1339e18202
3 changed files with 6 additions and 3 deletions

View File

@ -33,6 +33,7 @@ bool ParticleManager::load(const std::string& filename)
try { try {
OTMLDocumentPtr doc = OTMLDocument::parse(filename); OTMLDocumentPtr doc = OTMLDocument::parse(filename);
const OTMLNodePtr& node = doc->at("ParticleSystem");
for(const OTMLNodePtr& node : doc->children()) { for(const OTMLNodePtr& node : doc->children()) {
if(node->tag() == "ParticleSystem") { if(node->tag() == "ParticleSystem") {
ParticleSystemPtr particleSystem = ParticleSystemPtr(new ParticleSystem); ParticleSystemPtr particleSystem = ParticleSystemPtr(new ParticleSystem);

View File

@ -56,6 +56,7 @@ bool Shader::compileSourceCode(const std::string& sourceCode)
"#ifndef GL_FRAGMENT_PRECISION_HIGH\n" "#ifndef GL_FRAGMENT_PRECISION_HIGH\n"
"#define highp mediump\n" "#define highp mediump\n"
"#endif\n"; "#endif\n";
"precision highp float;\n"
#endif #endif
std::string code = qualifierDefines; std::string code = qualifierDefines;

View File

@ -67,7 +67,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int
std::vector<uint8> tmp; std::vector<uint8> tmp;
// old opengl drivers only accept power of two dimensions // 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; int glWidth = 1;
while(glWidth < width) while(glWidth < width)
glWidth = glWidth << 1; glWidth = glWidth << 1;
@ -86,8 +87,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int
} }
m_glSize.resize(glWidth, glHeight); m_glSize.resize(glWidth, glHeight);
//} else } else */
// m_glSize = m_size; m_glSize = m_size;
// detect pixels GL format // detect pixels GL format
GLenum format = 0; GLenum format = 0;