Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit 2ce14bc2 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

* Fixed CMake script disabling tests per default

* Reverted some of the changes introduced with 3c7bf8c0: tgt::FramebufferObject now uses EXT functions (instead of core functions) throughout the entire code. Previous mix of EXT and core function calls showed problems with AMD GPUs. All core methods broke results on Intel GPUs.
parent 6f9d4563
......@@ -21,8 +21,8 @@ OPTION(CAMPVIS_BUILD_DOXYGEN "Build Doxygen Documentation"
OPTION(CAMPVIS_DEPLOY_SHADERS "Deploy Shader files to binary directory" OFF)
OPTION(CAMPVIS_GROUP_SOURCE_FILES "Group source files by directory" ON)
OPTION(CAMPVIS_BUILD_GOOGLETEST "Build googletest library" ON)
OPTION(CAMPVIS_BUILD_TEST_SOURCES "Build Unit Tests of gooogletest" ON)
OPTION(CAMPVIS_BUILD_GOOGLETEST "Build googletest library" OFF)
OPTION(CAMPVIS_BUILD_TEST_SOURCES "Build Unit Tests of gooogletest" OFF)
IF(WIN32)
OPTION(CAMPVIS_COPY_EXTERNAL_DLLS "Copy external DLLs to bin directory?" ON)
......
......@@ -45,13 +45,13 @@ FramebufferObject::~FramebufferObject()
void FramebufferObject::activate()
{
glBindFramebufferEXT(GL_FRAMEBUFFER, id_);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, id_);
LGL_ERROR;
}
void FramebufferObject::deactivate()
{
glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
LGL_ERROR;
}
......@@ -59,16 +59,16 @@ void FramebufferObject::attachTexture(Texture* texture, GLenum attachment, int m
{
switch(texture->getType()) {
case GL_TEXTURE_1D:
glFramebufferTexture1D( GL_FRAMEBUFFER, attachment, GL_TEXTURE_1D, texture->getId(), mipLevel );
glFramebufferTexture1DEXT( GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_1D, texture->getId(), mipLevel );
break;
case GL_TEXTURE_3D:
glFramebufferTexture3D( GL_FRAMEBUFFER, attachment, GL_TEXTURE_3D, texture->getId(), mipLevel, zSlice );
glFramebufferTexture3DEXT( GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_3D, texture->getId(), mipLevel, zSlice );
break;
case GL_TEXTURE_2D_ARRAY:
glFramebufferTextureLayer( GL_FRAMEBUFFER, attachment, texture->getId(), mipLevel, zSlice );
glFramebufferTextureLayerEXT( GL_FRAMEBUFFER_EXT, attachment, texture->getId(), mipLevel, zSlice );
break;
default: //GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE
glFramebufferTexture2D( GL_FRAMEBUFFER, attachment, texture->getType(), texture->getId(), mipLevel );
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, attachment, texture->getType(), texture->getId(), mipLevel );
break;
}
LGL_ERROR;
......@@ -92,16 +92,16 @@ void FramebufferObject::detachTexture(GLenum attachment) {
if (attachments_[index] != 0) {
switch (attachments_[index]->getType()) {
case GL_TEXTURE_1D:
glFramebufferTexture1D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_1D, 0, 0);
glFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_1D, 0, 0);
break;
case GL_TEXTURE_2D_ARRAY:
glFramebufferTextureLayer(GL_FRAMEBUFFER, attachment, 0, 0, 0);
glFramebufferTextureLayerEXT(GL_FRAMEBUFFER_EXT, attachment, 0, 0, 0);
break;
case GL_TEXTURE_3D:
glFramebufferTexture3D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_3D, 0, 0, 0);
glFramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_3D, 0, 0, 0);
break;
default: // GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE
glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, 0, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_2D, 0, 0);
break;
}
attachments_[index] = 0;
......@@ -132,31 +132,31 @@ bool FramebufferObject::isComplete() const
{
bool complete = false;
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT);
switch(status) {
case GL_FRAMEBUFFER_COMPLETE:
case GL_FRAMEBUFFER_COMPLETE_EXT:
complete = true;
break;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT");
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_ATTACHMENT");
break;
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_MISSING_ATTACHMENT");
break;
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_DIMENSIONS");
break;
case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_FORMATS");
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_FORMATS");
break;
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER");
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_DRAW_BUFFER");
break;
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
LERROR("GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER");
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
LERROR("GL_FRAMEBUFFER_EXT_INCOMPLETE_READ_BUFFER");
break;
case GL_FRAMEBUFFER_UNSUPPORTED:
LERROR("GL_FRAMEBUFFER_UNSUPPORTED");
case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
LERROR("GL_FRAMEBUFFER_EXT_UNSUPPORTED");
break;
default:
LERROR("Unknown error!");
......@@ -170,7 +170,7 @@ bool FramebufferObject::isActive() const {
GLuint FramebufferObject::getActiveObject() {
GLint fbo;
glGetIntegerv (GL_FRAMEBUFFER_BINDING, &fbo);
glGetIntegerv (GL_FRAMEBUFFER_BINDING_EXT, &fbo);
return static_cast<GLuint>(fbo);
}
......
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