mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-03 04:09:59 +00:00
gl_state: Remove front face tracking
This commit is contained in:
parent
d2d5554296
commit
925521da5f
4 changed files with 5 additions and 6 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue