• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

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


Commit MetaInfo

Revision2de26546d6af6d4bb241e785d6dbae0f5e69ac94 (tree)
Time2018-12-13 22:22:24
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[Draw][Qt][OpenGL] Abondon depth test.

Change Summary

Incremental Difference

--- a/source/src/qt/gui/gl2/qt_glutil_gl2_0.cpp
+++ b/source/src/qt/gui/gl2/qt_glutil_gl2_0.cpp
@@ -874,6 +874,7 @@ void GLDraw_2_0::drawMain(QOpenGLShaderProgram *prg,
874874 prg->enableAttributeArray(vertex_loc);
875875 prg->enableAttributeArray(texcoord_loc);
876876
877+ extfunc_2->glDisable(GL_DEPTH_TEST);
877878 extfunc_2->glEnableClientState(GL_VERTEX_ARRAY);
878879 extfunc_2->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
879880 extfunc_2->glColor3f(1.0f, 1.0f, 1.0f);
@@ -895,6 +896,7 @@ void GLDraw_2_0::drawMain(QOpenGLShaderProgram *prg,
895896
896897 { // Fallback
897898 int i;
899+ extfunc_2->glDisable(GL_DEPTH_TEST);
898900 extfunc_2->glBegin(GL_POLYGON);
899901 for(i = 0; i < 4; i++) {
900902 extfunc_2->glTexCoord2f(vertex_data[i].s, vertex_data[i].t);
@@ -1053,6 +1055,7 @@ void GLDraw_2_0::paintGL(void)
10531055 extfunc_2->glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0, 1.0);
10541056
10551057 extfunc_2->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1058+ //extfunc_2->glDisable(GL_DEPTH_TEST);
10561059 extfunc_2->glEnable(GL_DEPTH_TEST);
10571060 extfunc_2->glDisable(GL_BLEND);
10581061 if(using_flags->is_use_one_board_computer() || using_flags->is_use_bitmap()) {
--- a/source/src/qt/gui/gl3/qt_glutil_gl3_0.cpp
+++ b/source/src/qt/gui/gl3/qt_glutil_gl3_0.cpp
@@ -1237,7 +1237,8 @@ void GLDraw_3_0::paintGL(void)
12371237 extfunc->glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0, 1.0);
12381238
12391239 extfunc->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1240- extfunc->glEnable(GL_DEPTH_TEST);
1240+ //extfunc->glEnable(GL_DEPTH_TEST);
1241+ extfunc->glDisable(GL_DEPTH_TEST);
12411242 extfunc->glDisable(GL_BLEND);
12421243 if(using_flags->is_use_one_board_computer() || using_flags->is_use_bitmap()) {
12431244 extfunc->glEnable(GL_BLEND);
--- a/source/src/qt/gui/gl4_3/fragment_shader.glsl
+++ b/source/src/qt/gui/gl4_3/fragment_shader.glsl
@@ -6,6 +6,5 @@ out uvec4 opixel;
66 uniform usampler2D a_texture;
77 void main ()
88 {
9- uvec4 pixel = texture(a_texture, v_texcoord);
10- opixel = pixel;
9+ opixel = texture(a_texture, v_texcoord);
1110 }
Show on old repository browser