refactor font loading
This commit is contained in:
@@ -18,8 +18,8 @@ void NodeImageTexture::clone_copy(Node* dest) const
|
||||
|
||||
void NodeImageTexture::draw()
|
||||
{
|
||||
tex.bind();
|
||||
auto& sampler = tex.has_mips ? NodeImage::m_sampler_mips : NodeImage::m_sampler;
|
||||
tex ? tex->bind() : glBindTexture(GL_TEXTURE_2D, 0);
|
||||
auto& sampler = tex && tex->has_mips ? NodeImage::m_sampler_mips : NodeImage::m_sampler;
|
||||
sampler.bind(0);
|
||||
glEnable(GL_BLEND);
|
||||
ShaderManager::use(kShader::Texture);
|
||||
@@ -27,6 +27,5 @@ void NodeImageTexture::draw()
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
|
||||
NodeImage::m_plane.draw_fill();
|
||||
sampler.unbind();
|
||||
tex.unbind();
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user