+static void draw_scene()
+{
+ if(!opt.vr) {
+ set_render_target(rtarg);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ }
+
+ draw_backdrop();
+ draw_fs();
+
+ if(!opt.vr) {
+ set_render_target(0);
+
+ glPushAttrib(GL_ENABLE_BIT);
+ glDisable(GL_DEPTH_TEST);
+
+ glUseProgram(post_sdr);
+ set_uniform_matrix4(post_sdr, "texmat", rtarg->get_texture_matrix()[0]);
+
+ bind_texture(rtarg->get_texture());
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0, 0);
+ glVertex2f(-1, -1);
+ glTexCoord2f(1, 0);
+ glVertex2f(1, -1);
+ glTexCoord2f(1, 1);
+ glVertex2f(1, 1);
+ glTexCoord2f(0, 1);
+ glVertex2f(-1, 1);
+ glEnd();
+
+ bind_texture(0);
+ glUseProgram(0);
+
+ glPopAttrib();
+ }
+}
+