I''m using an FXGLViewer and I want to manually control when it updates. Right now, it updates a number of times a second - which uses a lot of my CPU processor time just to redraw the same image over and over. Does anyone know how to stop this from occurring? Thanks in advance!! -- View this message in context: http://www.nabble.com/Autorefresh-of-FXGLViewer-tp18410371p18410371.html Sent from the FXRuby Users mailing list archive at Nabble.com.
Em S?b, 2008-07-12 ?s 13:36 -0700, tomg313 escreveu:> I''m using an FXGLViewer and I want to manually control when it updates. > Right now, it updates a number of times a second - which uses a lot of my > CPU processor time just to redraw the same image over and over. Does anyone > know how to stop this from occurring? Thanks in advance!!Have you already tried to handle their SEL_PAINT message? Try to dump message data to the console. type and code may help you to find the origins of repaintings. Hope this help. Regards, -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I ------ contatos: email: angico at angico.org skype: angico00 ------
On Sat, Jul 12, 2008 at 3:36 PM, tomg313 <tgolden at ball.com> wrote:> I''m using an FXGLViewer and I want to manually control when it updates. > Right now, it updates a number of times a second - which uses a lot of my > CPU processor time just to redraw the same image over and over. Does anyone > know how to stop this from occurring?The FXGLViewer shouldn''t be automatically updating itself like you''re describing. Do you see the same behavior with the glviewer.rb example program that comes with FXRuby? If not, are you maybe doing something in your application code (perhaps with a chore or timer) that might be causing it to repeatedly update?
I found my issue - I''m an idiot :) Well, besides that, I was updating the glviewer light within one of my objects. So when update() is called, the light for the viewer changes, which causes update to be called again... and so on... Thanks for the help! Lyle Johnson-4 wrote:> > On Sat, Jul 12, 2008 at 3:36 PM, tomg313 <tgolden at ball.com> wrote: > >> I''m using an FXGLViewer and I want to manually control when it updates. >> Right now, it updates a number of times a second - which uses a lot of my >> CPU processor time just to redraw the same image over and over. Does >> anyone >> know how to stop this from occurring? > > The FXGLViewer shouldn''t be automatically updating itself like you''re > describing. Do you see the same behavior with the glviewer.rb example > program that comes with FXRuby? If not, are you maybe doing something > in your application code (perhaps with a chore or timer) that might be > causing it to repeatedly update? > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > >-- View this message in context: http://www.nabble.com/Autorefresh-of-FXGLViewer-tp18410371p18467039.html Sent from the FXRuby Users mailing list archive at Nabble.com.
On Tue, Jul 15, 2008 at 9:45 AM, tomg313 <tgolden at ball.com> wrote:> I found my issue - I''m an idiot :) Well, besides that, I was updating the > glviewer light within one of my objects. So when update() is called, the > light for the viewer changes, which causes update to be called again... and > so on... Thanks for the help!Glad you got that figured out! Let us know if you run into any more snags.