glthread: blit OSD manually

to help debugging of framebuffer issues, only blit the openGL
framebuffer after an explicit blit() call
This commit is contained in:
Stefan Seyfried
2013-04-06 12:06:18 +02:00
parent 069bf46578
commit 843e9f395a
3 changed files with 16 additions and 1 deletions

View File

@@ -30,6 +30,9 @@
#endif #endif
#include <driver/framebuffer.h> #include <driver/framebuffer.h>
#ifdef USE_OPENGL
#include "glthread.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
@@ -821,6 +824,10 @@ void CFbAccel::blit()
/* not azbox and not spark -> no blit() needed */ /* not azbox and not spark -> no blit() needed */
void CFbAccel::blit() void CFbAccel::blit()
{ {
#ifdef USE_OPENGL
if (fb->mpGLThreadObj)
fb->mpGLThreadObj->blit();
#endif
} }
#endif #endif

View File

@@ -338,7 +338,12 @@ void GLThreadObj::render() {
} }
// bltDisplayBuffer(); /* decoded video stream */ // bltDisplayBuffer(); /* decoded video stream */
bltOSDBuffer(); /* OSD */ if (mState.blit) {
/* only blit manually after fb->blit(), this helps to find missed blit() calls */
mState.blit = false;
//fprintf(stderr, "blit!\n");
bltOSDBuffer(); /* OSD */
}
glBindTexture(GL_TEXTURE_2D, mState.osdtex); glBindTexture(GL_TEXTURE_2D, mState.osdtex);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

View File

@@ -29,6 +29,7 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include <GL/gl.h> #include <GL/gl.h>
#include "rcinput.h"
//class SWDecoder; //class SWDecoder;
@@ -51,6 +52,7 @@ public:
int getOSDWidth() { return mState.width; } int getOSDWidth() { return mState.width; }
int getOSDHeight() { return mState.height; } int getOSDHeight() { return mState.height; }
void blit() { mState.blit = true; }
void clear(); void clear();
@@ -92,6 +94,7 @@ private:
// GLuint displaytex; /* holds the display texture */ // GLuint displaytex; /* holds the display texture */
// GLuint displaypbo; // GLuint displaypbo;
int go3d; int go3d;
bool blit;
} mState; } mState;
// boost::shared_ptr<SWDecoder>mpSWDecoder; /* our Decoder-Object that runs in its own thread */ // boost::shared_ptr<SWDecoder>mpSWDecoder; /* our Decoder-Object that runs in its own thread */