continue implementing new graphics engine

* implement OpenGL ES 1.1 and OpenGL ES 2.0 support
* new framebuffer that can run on any opengl implementation
* fixes in outfit size rendering
This commit is contained in:
Eduardo Bart
2012-04-20 07:16:03 -03:00
parent 58d76e255d
commit f14706206a
25 changed files with 515 additions and 398 deletions

View File

@@ -46,7 +46,7 @@ Shader::~Shader()
bool Shader::compileSourceCode(const std::string& sourceCode)
{
#ifndef OPENGL_ES2
#ifndef OPENGL_ES
static const char *qualifierDefines =
"#define lowp\n"
"#define mediump\n"
@@ -65,7 +65,7 @@ bool Shader::compileSourceCode(const std::string& sourceCode)
glShaderSource(m_shaderId, 1, &c_source, NULL);
glCompileShader(m_shaderId);
int res;
int res = GL_FALSE;
glGetShaderiv(m_shaderId, GL_COMPILE_STATUS, &res);
return (res == GL_TRUE);
}
@@ -79,7 +79,7 @@ bool Shader::compileSourceFile(const std::string& sourceFile)
std::string Shader::log()
{
std::string infoLog;
GLint infoLogLength;
GLint infoLogLength = 0;
glGetShaderiv(m_shaderId, GL_INFO_LOG_LENGTH, &infoLogLength);
if(infoLogLength > 1) {
std::vector<char> buf(infoLogLength);