瀏覽代碼

more depth testing

testing
totallyfake 3 年之前
父節點
當前提交
7d46eeea77
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/game.cpp

+ 1
- 1
src/game.cpp 查看文件

@@ -113,12 +113,12 @@ void Game::loop() {

activeScene->update(dTime);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
glDepthFunc(GL_GREATER);
glClearDepth(0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
activeScene->draw(); //draw the scene
glBindFramebuffer(GL_FRAMEBUFFER, 0);

Loading…
取消
儲存