+
+ /* no-srgb gamma correction fallback */
+ if(!opt.srgb) {
+ glBindTexture(GL_TEXTURE_2D, post_fbtex[0].id);
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, win_width, win_height);
+
+ glUseProgram(sdr_gamma);
+ overlay_tex(post_fbtex, 1.0);
+ }
+
+ {
+ static long frames, prev_upd, fps;
+ long dt;
+
+ frames++;
+
+ dt = time_msec - prev_upd;
+ if(dt >= 750) {
+ fps = ((frames * 1000 << 8) + 128) / dt;
+ frames = 0;
+ prev_upd = time_msec;
+ }
+
+ print_text(win_width - 80, 20, 1.0, 0.8, 0.1, "fps: %ld.%ld", fps >> 8, ((fps & 0xff) * 10) >> 8);
+ }
+
+ draw_osd();