mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 07:29:02 -05:00 
			
		
		
		
	gl_state: Remove front face tracking
This commit is contained in:
		| @@ -1025,7 +1025,7 @@ void RasterizerOpenGL::SyncCullMode() { | ||||
|         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() { | ||||
|   | ||||
| @@ -170,10 +170,6 @@ void OpenGLState::ApplyCulling() { | ||||
|     if (UpdateValue(cur_state.cull.mode, cull.mode)) { | ||||
|         glCullFace(cull.mode); | ||||
|     } | ||||
|  | ||||
|     if (UpdateValue(cur_state.cull.front_face, cull.front_face)) { | ||||
|         glFrontFace(cull.front_face); | ||||
|     } | ||||
| } | ||||
|  | ||||
| void OpenGLState::ApplyRasterizerDiscard() { | ||||
|   | ||||
| @@ -34,7 +34,6 @@ public: | ||||
|     struct { | ||||
|         bool enabled = false;       // GL_CULL_FACE | ||||
|         GLenum mode = GL_BACK;      // GL_CULL_FACE_MODE | ||||
|         GLenum front_face = GL_CCW; // GL_FRONT_FACE | ||||
|     } cull; | ||||
|  | ||||
|     struct { | ||||
|   | ||||
| @@ -571,6 +571,10 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, | ||||
|     state.textures[0] = screen_info.display_texture; | ||||
|     state.framebuffer_srgb.enabled = screen_info.display_srgb; | ||||
|     state.Apply(); | ||||
|  | ||||
|     // TODO: Signal state tracker about these changes | ||||
|     glFrontFace(GL_CW); | ||||
|  | ||||
|     glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices)); | ||||
|     glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); | ||||
|     // Restore default state | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ReinUsesLisp
					ReinUsesLisp