From a6d2f52fc32295c73f41b86ab1b5e85d06afd5b0 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 27 May 2019 19:41:19 -0300 Subject: gl_rasterizer: Add some commentaries --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 6cab48329..bfc3c4df9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -650,12 +650,17 @@ void RasterizerOpenGL::DrawArrays() { gpu.dirty_flags.vertex_array.set(); } + // Prepare vertex array format. const GLuint vertex_array = SetupVertexFormat(); + // Upload vertex and index data. SetupVertexBuffer(vertex_array); const GLintptr index_buffer_offset = SetupIndexBuffer(); + // Setup draw parameters. It will automatically choose what glDraw* method to use. const DrawParameters params = SetupDraw(index_buffer_offset); + + // Setup shaders and their used resources. texture_cache.GuardSamplers(true); SetupShaders(params.primitive_mode); texture_cache.GuardSamplers(false); -- cgit v1.2.3