WINTERMUTE: WME3D: Fixed drawLine and enabled update save indicator

This commit is contained in:
Paweł Kołodziejski 2022-07-16 17:29:57 +02:00
parent b7b71597fe
commit 6fd582b3ad
No known key found for this signature in database
GPG key ID: 0BDADC9E74440FF7
2 changed files with 5 additions and 6 deletions

View file

@ -325,8 +325,8 @@ bool BaseRenderOpenGL3D::drawLine(int x1, int y1, int x2, int y2, uint32 color)
glBegin(GL_LINES);
glColor4ub(r, g, b, a);
glVertex3f(x1, y1, 0.9f);
glVertex3f(x2, y2, 0.9f);
glVertex3f(x1, _height - y1, 0.9f);
glVertex3f(x2, _height - y2, 0.9f);
glEnd();
return true;
@ -441,7 +441,7 @@ bool Wintermute::BaseRenderOpenGL3D::flip() {
}
bool BaseRenderOpenGL3D::indicatorFlip() {
warning("BaseRenderOpenGL3D::indicatorFlip not yet implemented");
flip();
return true;
}

View file

@ -423,7 +423,7 @@ bool BaseRenderOpenGL3DShader::drawLine(int x1, int y1, int x2, int y2, uint32 c
_lineShader->use();
_lineShader->setUniform("color", colorValue);
_fadeShader->setUniform("projMatrix", _projectionMatrix2d);
_lineShader->setUniform("projMatrix", _projectionMatrix2d);
glDrawArrays(GL_LINES, 0, 2);
@ -556,7 +556,6 @@ bool BaseRenderOpenGL3DShader::initRenderer(int width, int height, bool windowed
static const char *fadeAttributes[] = { "position", nullptr };
_fadeShader = OpenGL::Shader::fromFiles("wme_fade", fadeAttributes);
_fadeShader->enableVertexAttribute("position", _fadeVBO, 2, GL_FLOAT, false, 8, 0);
glGenBuffers(1, &_lineVBO);
@ -583,7 +582,7 @@ bool Wintermute::BaseRenderOpenGL3DShader::flip() {
}
bool BaseRenderOpenGL3DShader::indicatorFlip() {
warning("BaseRenderOpenGL3DShader::indicatorFlip not yet implemented");
flip();
return true;
}