mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-18 03:20:33 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user