...
This commit is contained in:
parent
8926f33679
commit
1339e18202
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue