Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-01-22 02:18:56 -04:00
11 changed files with 418 additions and 6 deletions
+10 -1
View File
@@ -593,7 +593,9 @@ bool Canvas::loadVolatile()
if (glGetError() != GL_NO_ERROR)
{
status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
gl.deleteTexture(texture);
texture = 0;
status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
return false;
}
@@ -617,7 +619,14 @@ bool Canvas::loadVolatile()
status = strategy->createFBO(fbo, texture);
if (status != GL_FRAMEBUFFER_COMPLETE)
{
if (fbo != 0)
{
strategy->deleteFBO(fbo, 0, 0);
fbo = 0;
}
return false;
}
clear(Color(0, 0, 0, 0));
+2
View File
@@ -50,6 +50,8 @@ Graphics::Graphics()
, created(false)
, writingToStencil(false)
{
gl = OpenGL();
states.reserve(10);
states.push_back(DisplayState());
+5
View File
@@ -218,6 +218,10 @@ void Shader::mapActiveUniforms()
bool Shader::loadVolatile()
{
// Recreating the shader program will invalidate uniforms that rely on these.
lastCanvas = (Canvas *) -1;
lastViewport = OpenGL::Viewport();
// zero out active texture list
activeTexUnits.clear();
activeTexUnits.insert(activeTexUnits.begin(), maxTexUnits, 0);
@@ -306,6 +310,7 @@ bool Shader::loadVolatile()
// make sure glUseProgram gets called.
current = nullptr;
attach();
checkSetScreenParams();
}
return true;