diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-14 08:48:30 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:40 +0200 |
commit | e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5 (patch) | |
tree | ac6ddd37fd94fd2ccd693b4da0443ff28b75008d /src/video_core/renderer_opengl/renderer_opengl.cpp | |
parent | shader: Implement ISETP.X (diff) | |
download | yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar.gz yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar.bz2 yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar.lz yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar.xz yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.tar.zst yuzu-e1ed218b418cd1ed94f6f25ccd0db86b63bd6bb5.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/renderer_opengl.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index c9cfa6366..d15167e19 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -251,10 +251,8 @@ void RendererOpenGL::LoadColorToActiveGLTexture(u8 color_r, u8 color_g, u8 color void RendererOpenGL::InitOpenGLObjects() { // Create shader programs - present_program.handle = glCreateProgram(); - AttachShader(GL_VERTEX_SHADER, present_program.handle, HostShaders::OPENGL_PRESENT_VERT); - AttachShader(GL_FRAGMENT_SHADER, present_program.handle, HostShaders::OPENGL_PRESENT_FRAG); - LinkProgram(present_program.handle); + present_vertex = CreateProgram(HostShaders::OPENGL_PRESENT_VERT, GL_VERTEX_SHADER); + present_fragment = CreateProgram(HostShaders::OPENGL_PRESENT_FRAG, GL_FRAGMENT_SHADER); // Generate presentation sampler present_sampler.Create(); @@ -340,8 +338,9 @@ void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) { // Set projection matrix const std::array ortho_matrix = MakeOrthographicMatrix(static_cast<float>(layout.width), static_cast<float>(layout.height)); - program_manager.BindProgram(present_program.handle); - glUniformMatrix3x2fv(ModelViewMatrixLocation, 1, GL_FALSE, ortho_matrix.data()); + program_manager.BindPresentPrograms(present_vertex.handle, present_fragment.handle); + glProgramUniformMatrix3x2fv(present_vertex.handle, ModelViewMatrixLocation, 1, GL_FALSE, + ortho_matrix.data()); const auto& texcoords = screen_info.display_texcoords; auto left = texcoords.left; |