Test with render window not drawing in frontbuffer anymore. Only enabled
authorTon Roosendaal <ton@blender.org>
Wed, 8 Mar 2006 12:28:46 +0000 (12:28 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 8 Mar 2006 12:28:46 +0000 (12:28 +0000)
now for OSX though... that's where we can verify if the irregular crashes
will stop (ATI issue, nvidia seems to be OK)

If ATI users for other platforms want to check; just extend the two
#ifdefs I added for frontbuffer drawing. Note; the syntax then becomes

#if defined(__APPLE__) || defined(_YOUR_PLATFORM_)

source/blender/src/renderwin.c

index 7ba9135032773efb0b0a25c932b2142bb64d5dfa..bea32212779d27350487f20bce1d68f79e5cacf9 100644 (file)
@@ -804,15 +804,22 @@ static void renderwin_progress(RenderWin *rw, RenderResult *rr, volatile rcti *r
        glEnable(GL_SCISSOR_TEST);
        glaDefine2DArea(&win_rct);
 
+#ifdef __APPLE__
+#else
        glDrawBuffer(GL_FRONT);
+#endif
        glPixelZoom(rw->zoom, rw->zoom);
        glaDrawPixelsSafe(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, ymax, rr->rectx, 
                                          GL_RGBA, GL_FLOAT, rectf);
        glPixelZoom(1.0, 1.0);
        
+#ifdef __APPLE__
+       window_swap_buffers(render_win->win);
+#else
        /* no glFlush(); here... threads render hates it! */
        glFinish();
        glDrawBuffer(GL_BACK);
+#endif 
 }
 
 
@@ -857,12 +864,19 @@ static void printrenderinfo_cb(RenderStats *rs)
                
                if(render_win->render_text) MEM_freeN(render_win->render_text);
                render_win->render_text= BLI_strdup(str);
+#ifdef __APPLE__
+#else
                glDrawBuffer(GL_FRONT);
+#endif
                renderwin_draw_render_info(render_win);
                
+#ifdef __APPLE__
+               window_swap_buffers(render_win->win);
+#else
                /* no glFlush(); here... threads render hates it! */
                glFinish();
                glDrawBuffer(GL_BACK);
+#endif
        }
 
        /* temporal render debug printing, needed for testing orange renders atm... will be gone soon (or option) */