mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
water render before world render
This commit is contained in:
parent
c7d77084c2
commit
ed74f11d39
@ -235,15 +235,15 @@ void GameRenderer::renderWorld(GameWorld* world, const ViewCamera& camera,
|
||||
|
||||
culled = 0;
|
||||
|
||||
renderObjects(world);
|
||||
renderer->pushDebugGroup("Water");
|
||||
|
||||
renderer->pushDebugGroup("Water");
|
||||
|
||||
water.render(*this, world);
|
||||
water.render(*this, world);
|
||||
|
||||
profWater = renderer->popDebugGroup();
|
||||
|
||||
renderer->pushDebugGroup("Sky");
|
||||
renderObjects(world);
|
||||
|
||||
renderer->pushDebugGroup("Sky");
|
||||
|
||||
glBindVertexArray(vao);
|
||||
|
||||
|
@ -132,7 +132,7 @@ void WaterRenderer::render(GameRenderer &renderer, GameWorld* world) {
|
||||
|
||||
glStencilFunc(GL_EQUAL, 1, 0xFF);
|
||||
glStencilMask(0x00);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
r.useProgram(waterProg.get());
|
||||
|
||||
@ -152,4 +152,5 @@ void WaterRenderer::render(GameRenderer &renderer, GameWorld* world) {
|
||||
r.drawArrays(m, &gridDraw, wdp);
|
||||
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user