• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revision645dd2b85c85dfd0cb6e4247287c041fc33b9abc (tree)
Time2018-05-10 05:44:45
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[Draw][Qt] .

Change Summary

Incremental Difference

--- a/source/src/qt/gui/draw_thread.cpp
+++ b/source/src/qt/gui/draw_thread.cpp
@@ -36,6 +36,7 @@ DrawThreadClass::DrawThreadClass(OSD *o, CSP_Logger *logger,QObject *parent) : Q
3636 do_change_refresh_rate(screen->refreshRate());
3737 connect(screen, SIGNAL(refreshRateChanged(qreal)), this, SLOT(do_change_refresh_rate(qreal)));
3838 connect(this, SIGNAL(sig_update_screen(bitmap_t *)), glv, SLOT(update_screen(bitmap_t *)), Qt::QueuedConnection);
39+
3940 connect(this, SIGNAL(sig_update_osd()), glv, SLOT(update_osd()), Qt::QueuedConnection);
4041 connect(this, SIGNAL(sig_push_frames_to_avio(int, int, int)), glv->extfunc, SLOT(paintGL_OffScreen(int, int, int)));
4142 //connect(this, SIGNAL(sig_call_draw_screen()), p_osd, SLOT(draw_screen()));
@@ -115,9 +116,9 @@ void DrawThreadClass::doWork(const QString &param)
115116 }
116117 if(wait_count <= 0.0f) {
117118 wait_count = wait_count + _rate;
118- } else if(wait_count < 7.0) {
119- msleep(10);
120- wait_count = wait_count + _rate - 7.0;
119+ } else if(wait_count < 8.0) {
120+ msleep(8);
121+ wait_count = wait_count + _rate - 8.0;
121122 } else {
122123 wait_factor = (int)wait_count;
123124 msleep(wait_factor);
--- a/source/src/qt/gui/draw_thread.h
+++ b/source/src/qt/gui/draw_thread.h
@@ -44,6 +44,7 @@ class DLL_PREFIX DrawThreadClass : public QThread {
4444 int draw_frames;
4545 bool bRunThread;
4646 bool bDrawReq;
47+ bool bRenderComplete;
4748 bitmap_t *draw_screen_buffer;
4849 CSP_Logger *csp_logger;
4950 int ncount;
--- a/source/src/qt/gui/gles2/qt_glutil_gles_2.cpp
+++ b/source/src/qt/gui/gles2/qt_glutil_gles_2.cpp
@@ -268,6 +268,7 @@ void GLDraw_ES_2::initLocalGLObjects(void)
268268 main_pass->getVertexBuffer(),
269269 vertexFormat, 4);
270270 }
271+
271272 initPackedGLObject(&std_pass,
272273 using_flags->get_screen_width(), using_flags->get_screen_height(),
273274 ":/gles2/vertex_shader.glsl" , ":/gles2/chromakey_fragment_shader.glsl",
@@ -347,6 +348,7 @@ void GLDraw_ES_2::initLocalGLObjects(void)
347348 vertexBitmap, 4);
348349 }
349350 }
351+
350352 initGridShaders(":/gles2/grids_vertex_shader_fixed.glsl", ":/gles2/grids_vertex_shader.glsl", ":/gles2/grids_fragment_shader.glsl");
351353
352354 initGridVertexObject(&grids_horizonal_buffer, &grids_horizonal_vertex, using_flags->get_real_screen_height() + 3);
@@ -644,7 +646,7 @@ void GLDraw_ES_2::drawScreenTexture(void)
644646 } else {
645647 extfunc->glDisable(GL_BLEND);
646648 }
647-
649+
648650 QVector4D color;
649651 smoosing = using_flags->get_config_ptr()->use_opengl_filters;
650652 if(set_brightness) {
--- a/source/src/qt/gui/qt_glpack.cpp
+++ b/source/src/qt/gui/qt_glpack.cpp
@@ -36,10 +36,12 @@ GLScreenPack::GLScreenPack(int _width, int _height, QObject *parent) : QObject(p
3636 tex_geometry_h = _height;
3737 tex_geometry_x = 0;
3838 tex_geometry_y = 0;
39- //fbo_format.setInternalTextureFormat(GL_RGBA8);
40- fbo_format.setInternalTextureFormat(GL_RGBA32F);
39+ fbo_format.setInternalTextureFormat(GL_RGBA8);
40+ //fbo_format.setInternalTextureFormat(GL_RGBA32F);
4141 fbo_format.setTextureTarget(GL_TEXTURE_2D);
42+
4243 frame_buffer_object = new QOpenGLFramebufferObject(_width, _height, fbo_format);
44+ //frame_buffer_object = new QOpenGLFramebufferObject(_width, _height);
4345 Texture = 0;
4446 }
4547 GLScreenPack::~GLScreenPack()
@@ -75,6 +77,7 @@ bool GLScreenPack::initialize(int total_width, int total_height, const QString &
7577 delete frame_buffer_object;
7678 }
7779 frame_buffer_object = new QOpenGLFramebufferObject(width, height, fbo_format);
80+ //frame_buffer_object = new QOpenGLFramebufferObject(width, height);
7881 tex_geometry_w = width;
7982 tex_geometry_h = height;
8083 }
--- a/source/src/qt/gui/qt_glutil.cpp
+++ b/source/src/qt/gui/qt_glutil.cpp
@@ -227,6 +227,7 @@ QString GLDrawClass::logGLString(bool getExtensions)
227227 } else { // OpenGL
228228 s.append(QString::fromUtf8("\nUsing OpenGL. "));
229229 }
230+
230231 glGetString = (const GLubyte *(*)(GLenum))glContext->getProcAddress(QByteArray("glGetString"));
231232 if(glGetString != NULL) {
232233 s.append(QString::fromUtf8("\nSupported OpenGL Vendor: "));
@@ -242,6 +243,7 @@ QString GLDrawClass::logGLString(bool getExtensions)
242243 s.append(QString::fromUtf8((const char *)glGetString(GL_EXTENSIONS)));
243244 }
244245 }
246+
245247 return s;
246248 }
247249
Show on old repository browser