remove line thickness from the grid, add ambient light, fix lightmap texture resize

This commit is contained in:
2019-01-19 17:32:19 +01:00
parent d8c8a4b7ed
commit 7980fd4c37
8 changed files with 41 additions and 24 deletions

View File

@@ -337,10 +337,6 @@ void NodeCanvas::draw()
m_cache_rtt.unbindTexture();
}
for (auto& mode : *m_canvas->m_mode)
mode->on_Draw(ortho_proj, proj, camera);
glDisable(GL_DEPTH_TEST);
auto transform_mode = static_cast<CanvasModeTransform*>(Canvas::modes[(int)Canvas::kCanvasMode::Transform][0]);
bool importing = transform_mode->m_action == CanvasModeTransform::ActionType::Import;
@@ -357,6 +353,9 @@ void NodeCanvas::draw()
App::I.grid->draw_heightmap(proj, camera);
for (auto& mode : *m_canvas->m_mode)
mode->on_Draw(ortho_proj, proj, camera);
blend ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
depth ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST);
m_sampler.unbind();