summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-05-27 19:41:19 -0300
committerGravatar ReinUsesLisp2019-07-06 00:37:55 -0300
commita6d2f52fc32295c73f41b86ab1b5e85d06afd5b0 (patch)
tree4d6c96182a406b607597bb43693a1a2cca1678ea /src
parentgl_rasterizer: Make DrawParameters rasterizer instance const (diff)
downloadyuzu-a6d2f52fc32295c73f41b86ab1b5e85d06afd5b0.tar.gz
yuzu-a6d2f52fc32295c73f41b86ab1b5e85d06afd5b0.tar.xz
yuzu-a6d2f52fc32295c73f41b86ab1b5e85d06afd5b0.zip
gl_rasterizer: Add some commentaries
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp5
1 files changed, 5 insertions, 0 deletions
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() {
650 gpu.dirty_flags.vertex_array.set(); 650 gpu.dirty_flags.vertex_array.set();
651 } 651 }
652 652
653 // Prepare vertex array format.
653 const GLuint vertex_array = SetupVertexFormat(); 654 const GLuint vertex_array = SetupVertexFormat();
654 655
656 // Upload vertex and index data.
655 SetupVertexBuffer(vertex_array); 657 SetupVertexBuffer(vertex_array);
656 const GLintptr index_buffer_offset = SetupIndexBuffer(); 658 const GLintptr index_buffer_offset = SetupIndexBuffer();
657 659
660 // Setup draw parameters. It will automatically choose what glDraw* method to use.
658 const DrawParameters params = SetupDraw(index_buffer_offset); 661 const DrawParameters params = SetupDraw(index_buffer_offset);
662
663 // Setup shaders and their used resources.
659 texture_cache.GuardSamplers(true); 664 texture_cache.GuardSamplers(true);
660 SetupShaders(params.primitive_mode); 665 SetupShaders(params.primitive_mode);
661 texture_cache.GuardSamplers(false); 666 texture_cache.GuardSamplers(false);