Fixed tgt::FramebufferObject to work with Intel GPUs (for some reason, the...

Fixed tgt::FramebufferObject to work with Intel GPUs (for some reason, the Intel OpenGL driver fails generating and binding FBOs when using the core (non-EXT) GL functions).
parent 5a2b70dd
......@@ -45,12 +45,14 @@ FramebufferObject::~FramebufferObject()
void FramebufferObject::activate()
{
glBindFramebuffer(GL_FRAMEBUFFER, id_);
glBindFramebufferEXT(GL_FRAMEBUFFER, id_);
LGL_ERROR;
}
void FramebufferObject::deactivate()
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
LGL_ERROR;
}
void FramebufferObject::attachTexture(Texture* texture, GLenum attachment, int mipLevel, int zSlice)
......@@ -168,7 +170,8 @@ GLuint FramebufferObject::getActiveObject() {
GLuint FramebufferObject::generateId() {
id_ = 0;
glGenFramebuffers(1, &id_);
glGenFramebuffersEXT(1, &id_);
LGL_ERROR;
return id_;
}
......
......@@ -60,7 +60,7 @@ namespace tgt {
// delete FBOs
if (! _fbosToDelete[backIndex].empty()) {
glDeleteFramebuffers(static_cast<GLsizei>(_fbosToDelete[backIndex].size()), &(_fbosToDelete[backIndex].front()));
glDeleteFramebuffersEXT(static_cast<GLsizei>(_fbosToDelete[backIndex].size()), &(_fbosToDelete[backIndex].front()));
_fbosToDelete[backIndex].clear();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment