Committing the depth hack for renderablemodel

Adding GL_STENCIL_BIT for Mac as it seems to help with an NSOpenGL error
This commit is contained in:
Alexander Bock
2015-05-17 12:07:08 +02:00
parent 6a9fdef2e0
commit fe9b3172c6
2 changed files with 6 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ void main()
{
vec4 position = vs_position;
float depth = pscDepth(position);
depth = length(campos - position);
vec4 diffuse = texture(texture1, vs_st);
diffuse[3] = fading;
@@ -89,5 +90,5 @@ void main()
ABufferStruct_t frag = createGeometryFragment(diffuse, position, depth);
addToBuffer(frag);
}
}

View File

@@ -79,6 +79,10 @@ int main(int argc, char** argv) {
sgct::MessageHandler::instance()->setLogToCallback(true);
sgct::MessageHandler::instance()->setLogCallback(mainLogCallback);
#ifdef __APPLE__
glfwWindowHint(GLFW_STENCIL_BITS, 8);
#endif
LDEBUG("Creating SGCT Engine");
_sgctEngine = new sgct::Engine(newArgc, newArgv);