On Tue, Aug 18, 2009 at 6:46 AM, René Dudfield <[email protected]> wrote:
> > On Aug 18, 11:14 am, Florian Bösch <[email protected]> wrote: > > On Aug 18, 11:36 am, René Dudfield <[email protected]> wrote:> anyone > read about immediate mode guis? (imagine immediate mode > > > graphics VS retained mode graphics) > > > > It's an intriguing concept, but it has one major drawback. Input > > sampling/processing and FPS are coupled inseparably. I daresay with > > mice and keyboards and standard flat GUI applications (that do nothing > > else), that's not a big problem. However, if you take into account > > tablets, mice, 3d controllers, etc., they generate *huge* amounts of > > events quickly at high sample rates, and to worsen things, often these > > events need to go into physics simulations that need them more > > frequently then you draw. > > yeah, the display is tied to the rendering of the gui elements. > > However the event processing is not. You can store all events up to > each frame, and then only look at the events you care about each > frame. Your handle_events method for the imgui can run at a separate > frequency to the graphics display. This would set up the structures > where you imgui calls can inspect the previous frames events if they > need to. > A bigger problem in my mind, is the performance (much more of a problem in python/pyglet than in C). Because the GUI structure/layout can change at any time, and one maintains no state about previous frames, you pretty much have to redraw the entire GUI every frame, and you can't really utilise batching. I wrote a small immediate-mode GUI toolkit for pyglet a while ago (not publicly available at the moment, sorry), and the lack of batching was the difference between 80 fps and simplui's 500+ fps. Now, immediate-mode GUIs were intended for much lighter setups than simplui - i.e. just a handful of widgets for an in-game menu, and in that context they work fairly well, because the performance isn't too bad for that number of widgets. -- Tristam MacDonald http://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
