mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 16:24:35 +01:00
Fixed Depricated Enum Drawing Errors
This commit is contained in:
@@ -42,8 +42,6 @@ CopyFramebufferShader::~CopyFramebufferShader()
|
||||
{
|
||||
glDeleteBuffers(1, &_vbo);
|
||||
glDeleteVertexArrays(1, &_vao);
|
||||
|
||||
glBindVertexArray(_vao);
|
||||
}
|
||||
|
||||
void CopyFramebufferShader::GetLocations()
|
||||
@@ -79,7 +77,7 @@ void CopyFramebufferShader::SetTexture(GLuint texture)
|
||||
void CopyFramebufferShader::Draw()
|
||||
{
|
||||
glBindVertexArray(_vao);
|
||||
glDrawArrays(GL_QUADS, 0, 4);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
}
|
||||
|
||||
#endif /* DISABLE_OPENGL */
|
||||
|
||||
@@ -87,7 +87,7 @@ void DrawImageMaskedShader::Draw(sint32 left, sint32 top, sint32 right, sint32 b
|
||||
SetBounds(left, top, right, bottom);
|
||||
|
||||
glBindVertexArray(_vao);
|
||||
glDrawArrays(GL_QUADS, 0, 4);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
}
|
||||
|
||||
#endif /* DISABLE_OPENGL */
|
||||
|
||||
@@ -100,7 +100,7 @@ void DrawImageShader::Draw(sint32 left, sint32 top, sint32 right, sint32 bottom)
|
||||
SetBounds(left, top, right, bottom);
|
||||
|
||||
glBindVertexArray(_vao);
|
||||
glDrawArrays(GL_QUADS, 0, 4);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
}
|
||||
|
||||
#endif /* DISABLE_OPENGL */
|
||||
|
||||
@@ -95,7 +95,7 @@ void FillRectShader::Draw(sint32 left, sint32 top, sint32 right, sint32 bottom)
|
||||
SetBounds(left, top, right, bottom);
|
||||
|
||||
glBindVertexArray(_vao);
|
||||
glDrawArrays(GL_QUADS, 0, 4);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
}
|
||||
|
||||
#endif /* DISABLE_OPENGL */
|
||||
|
||||
@@ -154,6 +154,16 @@ GLAPI_DECL PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer GLAP
|
||||
|
||||
#endif /* OPENGL_NO_LINK */
|
||||
|
||||
inline void CheckGLError()
|
||||
{
|
||||
GLenum error = glGetError();
|
||||
while (error != GL_NO_ERROR)
|
||||
{
|
||||
log_error("OpenGL Error 0x%04X", error);
|
||||
error = glGetError();
|
||||
}
|
||||
}
|
||||
|
||||
namespace OpenGLAPI
|
||||
{
|
||||
bool Initialise();
|
||||
|
||||
@@ -330,6 +330,7 @@ public:
|
||||
->GetTexture());
|
||||
_copyFramebufferShader->Draw();
|
||||
|
||||
CheckGLError();
|
||||
Display();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user