gl_state: Remove front face tracking

This commit is contained in:
ReinUsesLisp 2019-12-25 19:46:04 -03:00
parent d2d5554296
commit 925521da5f
4 changed files with 5 additions and 6 deletions

View file

@ -1025,7 +1025,7 @@ void RasterizerOpenGL::SyncCullMode() {
state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face); state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
} }
state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face); glFrontFace(MaxwellToGL::FrontFace(regs.cull.front_face));
} }
void RasterizerOpenGL::SyncPrimitiveRestart() { void RasterizerOpenGL::SyncPrimitiveRestart() {

View file

@ -170,10 +170,6 @@ void OpenGLState::ApplyCulling() {
if (UpdateValue(cur_state.cull.mode, cull.mode)) { if (UpdateValue(cur_state.cull.mode, cull.mode)) {
glCullFace(cull.mode); glCullFace(cull.mode);
} }
if (UpdateValue(cur_state.cull.front_face, cull.front_face)) {
glFrontFace(cull.front_face);
}
} }
void OpenGLState::ApplyRasterizerDiscard() { void OpenGLState::ApplyRasterizerDiscard() {

View file

@ -34,7 +34,6 @@ public:
struct { struct {
bool enabled = false; // GL_CULL_FACE bool enabled = false; // GL_CULL_FACE
GLenum mode = GL_BACK; // GL_CULL_FACE_MODE GLenum mode = GL_BACK; // GL_CULL_FACE_MODE
GLenum front_face = GL_CCW; // GL_FRONT_FACE
} cull; } cull;
struct { struct {

View file

@ -571,6 +571,10 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
state.textures[0] = screen_info.display_texture; state.textures[0] = screen_info.display_texture;
state.framebuffer_srgb.enabled = screen_info.display_srgb; state.framebuffer_srgb.enabled = screen_info.display_srgb;
state.Apply(); state.Apply();
// TODO: Signal state tracker about these changes
glFrontFace(GL_CW);
glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices)); glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices));
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
// Restore default state // Restore default state