[GtkGLExt] Best Practices and multiple expose events



Hello, I'm a newcomer to using OpenGL and am looking for a best practices of
sorts of things that should/should not be done for speed reasons.   My code is
targeted to run mainly on slower older hardware that may not have HW accel.

I am currently using gtkglext in MegaTunix (megasquirt.sf.net)
http://enterpriserp.com/~dandruczyk/ms/v0.3.5/3d-spark-table.png

The OpenGL code was contributed by a user, so I'm not up on the best ways to
fix the issues it currently has.

1. I get expose events when the focus switches between multiple open windows.
but none of the windows were obscured, so there's no reason to have an expose
event.  (bug maybe?)

2. Is it better to have the majority of the OpenGL redraw work done in the
configure_event handler or the expose_event handler or someplace else?

3. the way my app works,  I only need to move around a dot over the map (see
picture above) about 20 times/sec, but I don't really want to redraw anything
else.  As it currently is it ends up redrawing EVERYTHING  20times/sec which
makes it painfully slow on non-HW accelerated boxes (like my crappy 366 dell
laptop). (It's fast on HW accel, but most users of this app will be using
slower/less-capable hardware) Anyone know how was to rework the code so that it
doesn't have to redraw everything? (as 99.5% of it NEVER changes except when
moving the camera angle, which only happens if the user directs it)


Thanks for any insights....


=====
Dave J. Andruczyk


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



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