WateFilter depth write fix (yeah 'fix' Kirill). Issue was glClear(GL_DEPTH_BUFFER_BIT) seems to not work when glDepthMask is false
see http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=257223 Also there might be the same issue when copying frame buffers git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7628 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
be8929da87
commit
978ee32a96
engine/src
@ -199,9 +199,6 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
|||||||
r.clearBuffers(false, true, true);
|
r.clearBuffers(false, true, true);
|
||||||
renderManager.renderGeometry(fsQuad);
|
renderManager.renderGeometry(fsQuad);
|
||||||
|
|
||||||
//re applying default render state at the end of the render
|
|
||||||
// to avoid depth write issues, MUST BE A BETTER WAY
|
|
||||||
r.applyRenderState(RenderState.DEFAULT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInitialized() {
|
public boolean isInitialized() {
|
||||||
|
@ -456,6 +456,15 @@ public class LwjglRenderer implements Renderer {
|
|||||||
bits = GL_COLOR_BUFFER_BIT;
|
bits = GL_COLOR_BUFFER_BIT;
|
||||||
}
|
}
|
||||||
if (depth) {
|
if (depth) {
|
||||||
|
|
||||||
|
//glClear(GL_DEPTH_BUFFER_BIT) seems to not work when glDepthMask is false
|
||||||
|
//here s some link on openl board
|
||||||
|
//http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=257223
|
||||||
|
//if depth clear is requested, we enable the depthMask
|
||||||
|
if (context.depthWriteEnabled == false) {
|
||||||
|
glDepthMask(true);
|
||||||
|
context.depthWriteEnabled = true;
|
||||||
|
}
|
||||||
bits |= GL_DEPTH_BUFFER_BIT;
|
bits |= GL_DEPTH_BUFFER_BIT;
|
||||||
}
|
}
|
||||||
if (stencil) {
|
if (stencil) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user