GPU/HW: Implement flipped quad coordinate hack from beetle-psx

Fixes graphical glitches around the edges of flipped sprites.
This commit is contained in:
Connor McLaughlin
2020-03-28 02:24:22 +10:00
parent f23bcc0faa
commit 0b347e2151
5 changed files with 99 additions and 14 deletions

View File

@ -252,7 +252,7 @@ bool GPU_HW_OpenGL::CreateVertexBuffer()
glVertexAttribIPointer(0, 2, GL_INT, sizeof(BatchVertex), reinterpret_cast<void*>(offsetof(BatchVertex, x)));
glVertexAttribPointer(1, 4, GL_UNSIGNED_BYTE, true, sizeof(BatchVertex),
reinterpret_cast<void*>(offsetof(BatchVertex, color)));
glVertexAttribIPointer(2, 1, GL_INT, sizeof(BatchVertex), reinterpret_cast<void*>(offsetof(BatchVertex, texcoord)));
glVertexAttribIPointer(2, 1, GL_INT, sizeof(BatchVertex), reinterpret_cast<void*>(offsetof(BatchVertex, u)));
glVertexAttribIPointer(3, 1, GL_INT, sizeof(BatchVertex), reinterpret_cast<void*>(offsetof(BatchVertex, texpage)));
glBindVertexArray(0);