• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

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


Commit MetaInfo

Revision81deac5a8c8755438b802087dec1735a2b04a269 (tree)
Time2018-05-12 00:14:21
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[Qt][GLES] Fix compilation errors with Angle OpenGL ES dll.

Change Summary

Incremental Difference

--- a/source/src/qt/gui/gles2/ntsc_pass2.glsl
+++ b/source/src/qt/gui/gles2/ntsc_pass2.glsl
@@ -86,10 +86,11 @@ void main() {
8686 vec3 tmpv;
8787 vec2 addr_p = fix_coord + vec2(pos_offset, 0);
8888 vec2 addr_n = fix_coord - vec2(pos_offset, 0);
89- for (i = ibegin ; i < TAPS; i++) {
89+
90+ for(int ii = 1; ii < TAPS; ii++) {
9091 pix_p = texture2D(a_texture, addr_p).xyz;
9192 pix_n = texture2D(a_texture, addr_n).xyz;
92- pix_p = (pix_n + pix_p) * vec3(luma_filter[i], chroma_filter[i], chroma_filter[i]);
93+ pix_p = (pix_n + pix_p) * vec3(luma_filter[ii], chroma_filter[ii], chroma_filter[ii]);
9394 signal = signal + pix_p;
9495 addr_p = addr_p - delta;
9596 addr_n = addr_n + delta;
@@ -104,7 +105,7 @@ void main() {
104105 //vec3 rgb = yiq2rgb(signal);
105106 #ifdef GAMMA_CORRECTION
106107 vec3 gamma = vec3(CRT_GAMMA / DISPLAY_GAMMA);
107- rgb = pow(rgb, gamma.rgb);
108+ rgb = pow(abs(rgb), gamma.rgb);
108109 #endif
109110 vec4 pixel = vec4(rgb, 1.0);
110111 pixel = pixel * vec4(0.8, 1.8, 1.4, 1.0);
--- a/source/src/qt/gui/gles2/qt_glutil_gles_2.cpp
+++ b/source/src/qt/gui/gles2/qt_glutil_gles_2.cpp
@@ -314,11 +314,12 @@ void GLDraw_ES_2::initLocalGLObjects(void)
314314 main_pass->getVertexBuffer(),
315315 vertexFormat, 4);
316316 }
317-
317+#if 0
318318 initPackedGLObject(&std_pass,
319319 using_flags->get_screen_width(), using_flags->get_screen_height(),
320320 ":/gles2/vertex_shader.glsl" , ":/gles2/chromakey_fragment_shader.glsl",
321321 "Standard Shader");
322+#endif
322323 initPackedGLObject(&led_pass,
323324 10, 10,
324325 ":/gles2/led_vertex_shader.glsl" , ":/gles2/led_fragment_shader.glsl",
@@ -671,7 +672,7 @@ void GLDraw_ES_2::uploadMainTexture(QImage *p, bool use_chromakey)
671672 } else
672673 #endif
673674 {
674-#if 1
675+#if 0
675676 renderToTmpFrameBuffer_nPass(uVramTextureID->textureId(),
676677 screen_texture_width,
677678 screen_texture_height,
@@ -1310,13 +1311,13 @@ void GLDraw_ES_2::do_set_texture_size(QImage *p, int w, int h)
13101311
13111312 p_wid->makeCurrent();
13121313 {
1314+#if 0
13131315 set_texture_vertex((float)w / iw, (float)h / ih);
13141316 setNormalVAO(std_pass->getShader(), std_pass->getVAO(),
13151317 std_pass->getVertexBuffer(),
13161318 vertexTmpTexture, 4);
1319+#endif
13171320 //set_texture_vertex(p, p_wid->width(), p_wid->height(), w, h);
1318-
1319-#if 1
13201321 set_texture_vertex((float)w / iw, (float)h / ih);
13211322 setNormalVAO(ntsc_pass1->getShader(), ntsc_pass1->getVAO(),
13221323 ntsc_pass1->getVertexBuffer(),
@@ -1326,7 +1327,6 @@ void GLDraw_ES_2::do_set_texture_size(QImage *p, int w, int h)
13261327 setNormalVAO(ntsc_pass2->getShader(), ntsc_pass2->getVAO(),
13271328 ntsc_pass2->getVertexBuffer(),
13281329 vertexTmpTexture, 4);
1329-#endif
13301330
13311331 }
13321332 if(p != NULL) {
Show on old repository browser