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.
... Richards withgui seemed a similar to the imgui style, but
different. Similar in that it avoids classes, and seems quite clear.
#withgui style
with gui.button('press me!'):
def on_click(*args):
print 'hello, world!'
#imgui style
if button(16, 16, "press me!"):
print 'hello, world!'
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---