[GtkGLExt] Recommendations for eliminating visual tearing



I've seen some really nice, smooth, clean OpenGL work under linux, but
at the moment I can't seem to get my app to do the same. I'm using
GTKGlExt(mm) under a 64-bit ubuntu 7.10 install, and continue to get
pretty severe "tearing" as I update my window. 

I know I can set "__GL_SYNC_TO_VBLANK=1", but this feels like an extreme
hack that shouldn't be necessary. So I just wanted to ping other
gtkglext users for some sanity checking: 

0. I should make sure I am acquiring a double-buffered visual. 

1. I should be doing all of my GL calls inside of the on_expose_event()
handler, right? 

2. [inside my expose event handler] I get the gl drawable, call
drawable->gl_begin(), and then do my real "GL" work, correct?

3. at the end of my expose event, I call gldrawable->swap_buffers(), and
then gldrawable->gl_end(). 

4. When my state changes someplace, I get the gtk window and then call
invalidate_rect to invalidate the window. 

I think this is all "correct", as it's been largely cribbed from example
code and my limited understanding of glx. But the results look
suboptimal, and I'm hoping someone with more experience might be able to
point out a crucial missing step. The actual module doing the bulk of
the rendering in this context is at
http://soma.mit.edu/browser/software/streams/trunk/src/streamrenderwin.cc
 for perspective. 


Thanks, 
		...Eric








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]