diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index 0220e54806..e7fb7ad7b7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -203,8 +203,8 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms glTexCoordPointer(2, GL_FLOAT, 6*sizeof(GLfloat), (GLfloat*)NULL+4); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); // EFB framebuffer is currently bound, make sure to clear its alpha value to 1.f glViewport(0, 0, m_targetWidth, m_targetHeight); @@ -360,9 +360,6 @@ void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, }; glBindBuffer(GL_ARRAY_BUFFER, s_VBO); glBufferData(GL_ARRAY_BUFFER, 2*4*3*sizeof(GLfloat), vertices, GL_STREAM_DRAW); - - // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); s_cached_sourcerc = sourcerc; s_cached_drawrc = drawrc; @@ -373,6 +370,7 @@ void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, // TODO: this after merging with graphic_update glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); GL_REPORT_ERRORD(); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp index 5bebd76eb6..95c99ac78c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp @@ -181,8 +181,8 @@ RasterFont::RasterFont() glVertexAttribPointer(glGetAttribLocation(shader_program, "texturePosition"), 2, GL_FLOAT, 0, sizeof(GLfloat)*4, (GLfloat*)NULL+2); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); } RasterFont::~RasterFont() @@ -276,8 +276,8 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta glDrawArrays(GL_TRIANGLES, 0, usage/4); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); glUseProgram(0); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 15fa36046d..a2d0a94ee3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -503,8 +503,8 @@ Renderer::Renderer() glTexCoordPointer(2, GL_FLOAT, 7*sizeof(GLfloat), (GLfloat*)NULL+5); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); glStencilFunc(GL_ALWAYS, 0, 0); glBlendFunc(GL_ONE, GL_ONE); @@ -704,8 +704,8 @@ void Renderer::DrawDebugInfo() glDrawArrays(GL_LINES, 0, stats.efb_regions.size() * 2*6); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); // Restore Line Size glLineWidth(lSize); @@ -1286,9 +1286,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons glBindBuffer(GL_ARRAY_BUFFER, s_Swap_VBO); glBufferData(GL_ARRAY_BUFFER, 4*7*sizeof(GLfloat), vertices, GL_STREAM_DRAW); - - // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); s_cached_targetRc = targetRc; } @@ -1299,6 +1296,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons // TODO: this after merging with graphic_update glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); if(applyShader) PixelShaderCache::DisableShader(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp index 40dac17df6..d90f651a82 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp @@ -357,9 +357,6 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo glBindBuffer(GL_ARRAY_BUFFER, vbo_it->second.vbo); glBufferData(GL_ARRAY_BUFFER, 4*4*sizeof(GLfloat), vertices, GL_STREAM_DRAW); - // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); - vbo_it->second.targetSource = targetSource; } @@ -368,6 +365,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo // TODO: this after merging with graphic_update glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); GL_REPORT_ERRORD(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index f45277f759..54a2e2464c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -176,8 +176,8 @@ void Init() glTexCoordPointer(2, GL_FLOAT, sizeof(GLfloat)*4, (GLfloat*)NULL+2); // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); glGenRenderbuffersEXT(1, &s_dstRenderBuffer); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, s_dstRenderBuffer); @@ -271,9 +271,6 @@ void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const Tar glBindBuffer(GL_ARRAY_BUFFER, s_encode_VBO ); glBufferData(GL_ARRAY_BUFFER, 4*4*sizeof(GLfloat), vertices, GL_STREAM_DRAW); - // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); - s_cached_sourceRc = sourceRc; } @@ -282,6 +279,7 @@ void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const Tar // TODO: this after merging with graphic_update glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); GL_REPORT_ERRORD(); @@ -454,9 +452,6 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur glBindBuffer(GL_ARRAY_BUFFER, s_decode_VBO ); glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat)*4*4, vertices, GL_STREAM_DRAW); - // TODO: this after merging with graphic_update - glBindBuffer(GL_ARRAY_BUFFER, 0); - s_cached_srcHeight = srcHeight; s_cached_srcWidth = srcWidth; } @@ -466,6 +461,7 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur // TODO: this after merging with graphic_update glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); GL_REPORT_ERRORD();