mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
improvments for shaders
This commit is contained in:
@@ -36,7 +36,7 @@ bool PainterShaderProgram::link()
|
||||
bindUniformLocation(COLOR_UNIFORM, "color");
|
||||
bindUniformLocation(OPACITY_UNIFORM, "opacity");
|
||||
bindUniformLocation(TEXTURE_UNIFORM, "texture");
|
||||
bindUniformLocation(TIME_UNIFORM, "ticks");
|
||||
bindUniformLocation(TIME_UNIFORM, "time");
|
||||
return true;
|
||||
}
|
||||
m_startTimer.restart();
|
||||
|
@@ -86,8 +86,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_size.width(), m_size.height(), 0, format, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
// disable texture border
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
||||
// nearest filtering (non smooth)
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
|
Reference in New Issue
Block a user