diff options
| author | bunnei <bunneidev@gmail.com> | 2018-04-14 20:40:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-14 20:40:39 -0400 |
| commit | fdca7b5f7a4ca626c15e70ae6f684e88686277f5 (patch) | |
| tree | 57b8c1f1952c53d54a0c14b00543dd21302d661b /src/video_core/renderer_opengl/renderer_opengl.cpp | |
| parent | c6ab2c94d9fd7e82d780e0598bfe8c982661d1aa (diff) | |
| parent | 1b41b875dcd24c662b947731f48f4d1c7131fa0b (diff) | |
Merge pull request #329 from bunnei/shader-gen-part-1
OpenGL shader generation part 1
Diffstat (limited to 'src/video_core/renderer_opengl/renderer_opengl.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 78b50b227..5e78723a2 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -57,7 +57,7 @@ uniform sampler2D color_texture; void main() { // Swap RGBA -> ABGR so we don't have to do this on the CPU. This needs to change if we have to // support more framebuffer pixel formats. - color = texture(color_texture, frag_tex_coord).abgr; + color = texture(color_texture, frag_tex_coord); } )"; @@ -210,7 +210,7 @@ void RendererOpenGL::InitOpenGLObjects() { 0.0f); // Link shaders and get variable locations - shader.Create(vertex_shader, nullptr, fragment_shader); + shader.CreateFromSource(vertex_shader, nullptr, fragment_shader); state.draw.shader_program = shader.handle; state.Apply(); uniform_modelview_matrix = glGetUniformLocation(shader.handle, "modelview_matrix"); @@ -311,10 +311,10 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, } std::array<ScreenRectVertex, 4> vertices = {{ - ScreenRectVertex(x, y, texcoords.top, right), - ScreenRectVertex(x + w, y, texcoords.bottom, right), - ScreenRectVertex(x, y + h, texcoords.top, left), - ScreenRectVertex(x + w, y + h, texcoords.bottom, left), + ScreenRectVertex(x, y, texcoords.top, left), + ScreenRectVertex(x + w, y, texcoords.bottom, left), + ScreenRectVertex(x, y + h, texcoords.top, right), + ScreenRectVertex(x + w, y + h, texcoords.bottom, right), }}; state.texture_units[0].texture_2d = screen_info.display_texture; |
