diff options
Diffstat (limited to 'Runtime/Graphics/GfxDevice.cpp')
-rw-r--r-- | Runtime/Graphics/GfxDevice.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Runtime/Graphics/GfxDevice.cpp b/Runtime/Graphics/GfxDevice.cpp index d30a60a..f318487 100644 --- a/Runtime/Graphics/GfxDevice.cpp +++ b/Runtime/Graphics/GfxDevice.cpp @@ -80,6 +80,9 @@ void GfxDevice::UseShader(LuaBind::State& state, Shader* shader, int idx) m_Shader.shader = shader; m_Shader.ref.SetRef(state, idx); + + glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } void GfxDevice::UnuseShader() @@ -135,7 +138,8 @@ void GfxDevice::SetUniformTexture(const char* name, Texture* texture) int texUnit = s_TextureUnitBucket.back(); s_TextureUnitBucket.pop_back(); glActiveTexture(GL_TEXTURE0 + texUnit);
- glBindTexture(GL_TEXTURE_2D, texture->GetGpuID());
+ //glBindTexture(GL_TEXTURE_2D, texture->GetGpuID());
+ glBindTexture(GL_TEXTURE_2D, 2);
GLint loc = glGetUniformLocation(m_Shader.GetID(), name); glUniform1i(loc, texUnit); |