Skip to content

Commit

Permalink
Add glFinish() before unmapping the surface.
Browse files Browse the repository at this point in the history
Drop unnecessary eglMakeCurrent.
  • Loading branch information
rellla committed Jun 20, 2016
1 parent 3b8718d commit 2259084
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions openglosd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,8 @@ bool cOglOutputFb::Init(void) {
}

void cOglOutputFb::BindWrite(void) {
#ifdef USE_GLES2
eglReleaseContext();
#endif
glVDPAUMapSurfacesNV(1, &surface);
#ifdef USE_GLES2
eglAcquireContext();
GL_CHECK(glViewport(0, 0, width, height));
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, fb));
#else
Expand All @@ -807,12 +803,9 @@ void cOglOutputFb::BindWrite(void) {

void cOglOutputFb::Unbind(void) {
#ifdef USE_GLES2
eglReleaseContext();
GL_CHECK(glFinish());
#endif
glVDPAUUnmapSurfacesNV(1, &surface);
#ifdef USE_GLES2
eglAcquireContext();
#endif
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0));
}

Expand Down
4 changes: 2 additions & 2 deletions openglosd.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ class cOglCmdDropImage : public cOglCmd {
/******************************************************************************
* cOglThread
******************************************************************************/
#define OGL_MAX_OSDIMAGES 256
#define OGL_CMDQUEUE_SIZE 100
#define OGL_MAX_OSDIMAGES 512
#define OGL_CMDQUEUE_SIZE 200

class cOglThread : public cThread {
private:
Expand Down

0 comments on commit 2259084

Please sign in to comment.