FLTK logo

Re: [fltk.general] Re: Redraw OpenGL window at 60 fps (Vsync On)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: Redraw OpenGL window at 60 fps (Vsync On) imm Oct 12, 2020  
 
On Sat, 10 Oct 2020 at 11:25, Manolo wrote:
>
> #include <FL/Fl_Gl_Window.H>
> #include <FL/Fl.H>
>
> Fl_Gl_Window *my_gl_window = ....
> my_gl_window->show();
> while (1) {
>   Fl::wait(1./60); // that would give 60 redraws per second
>   my_gl_window->redraw();
>   }
>

I think, if I were doing it like this, I might look at using the
Fl::add_timeout() mechanism to trigger the redraw of the GL window
(though I'm certain Manolo knows that!)

-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/CAGFM6dY%2BcxemgPvFPU3DUh%2BmX0g%3DiVkOk60ctZt%3DRB9-1y4AAA%40mail.gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.