implement heightmap grid

This commit is contained in:
2018-08-07 19:45:38 +02:00
parent 16c04c433f
commit f941fc4254
11 changed files with 257 additions and 65 deletions

View File

@@ -20,13 +20,14 @@ void NodeImageTexture::draw()
{
using namespace ui;
tex.bind();
NodeImage::m_sampler.bind(0);
auto& sampler = tex.has_mips ? NodeImage::m_sampler : NodeImage::m_sampler_mips;
sampler.bind(0);
glEnable(GL_BLEND);
ui::ShaderManager::use(kShader::Texture);
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
ui::ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
NodeImage::m_plane.draw_fill();
NodeImage::m_sampler.unbind();
sampler.unbind();
tex.unbind();
glDisable(GL_BLEND);
}