Needs to be another row "supports withgui API" :)
Richard
(really, there'll be a release soon, I promise!)
On Aug 17, 2:39 pm, Tristam MacDonald <swiftco...@gmail.com> wrote:I didn't see it at: http://darkcoda.googlecode.com/svn/simplui/
> simplui does have a setuptools/easy_install package as of yesterday.
>
> On 17/08/2009, at 8:43 PM, Florian Bösch wrote:
>> I've tested three GUI packages I could find and rated them in an
>> overview matrix, tell me when you think its incorrect.
>>
>> http://codeflow.org/state_of_pyglet_guis.html
>
> Needs to be another row "supports withgui API" :)
http://www.mechanicalcat.net/richard/log/Python/Something_I_m_working_on.6
Only label & button done at this time.
Richard
yeah, the display is tied to the rendering of the gui elements.
On Aug 18, 11:14 am, Florian Bösch <pya...@gmail.com> wrote:
> On Aug 18, 11:36 am, René Dudfield <ren...@gmail.com> 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.
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.
Where it becomes completely hairy is how to implement layouts. Layouts
with inner-restrictions are still fairly doable, you just have to
commit to draw your stuff in exactly the right order as the layout can
use it (though luck if you don't happen to keep your data in exactly
the same order as the GUI). Layout with outer constraints, where you
might need to figure out offsets/sizes based on how elements push you
around left/right/top/down are virtually impossible to do.
Though I have a question about batched GUI rendering. It's my
understanding that for instance nvidia drivers reorder the primitives
in a vertex-list pretty much at random.
I too have heard that maintaining vertex ordering is not a requirement
of OpenGL, but I haven't seen the relevant part of the specification
to be sure, nor have I seen it happen in practice. Incrementing Z for
each primitive in your draw order should be sufficient to maintain
that ordering though, even if the driver does like to reorder things
at the same Z depth.
Alex.
Page 28 of the OpenGL 2.0 spec (the version I happen to have to hand,
I'm sure it's the same in other versions, albeit on a different page)
claims:
The effect of
DrawArrays (mode, first, count);
is the same as the effect of the command sequence
if (mode or count is invalid )
generate appropriate error
else
{
int i;
Begin(mode);
for (i=0; i < count; i++)
ArrayElement(first + i);
End();
}
with one exception: the current edge flag, texture coordinates, color,
color index, and normal coordinates are each indeterminate after the
execution of DrawArrays, if the corresponding array is enabled.
There are similar passages for MultiDrawArrays and DrawElements.
Unfortunately, I can't seem to find anywhere that explicitly states
that primitives within a Begin()/End() block can't be reordered, but
nor can I find anywhere that states that they can. The general feel I
get from the text is that the authors didn't expect this to happen,
but they didn't specify explicitly, as far as I can see.
Of course, just because the spec says so is no guarantee that any
given implementation will play nicely, but it's nice to have the
standard on your side.
Martin
> So then you go the hybrid-immediate route instead. Basically, your
> immediate mode code generates a tree, you update/layout/render the tree
> with a gui.end() call, and the tree is cached till next frame to provide
> coherency.
But this doesn't sound very different from a traditional
tree of widgets.
--
Greg
> The proposed solution
> to this is having a unique ID for each element that you can query out
> of the context to hold the state.
That's pretty ugly. Something I hate with a passion is a
GUI API that requires you to make up unique IDs for widgets.
> Where it becomes completely hairy is how to implement layouts.
That's another thing I was wondering. I much prefer to
write GUI layout code so that it builds things from the
bottom up most of the time. The IMGUI style would seem to
require calculating the layout from the top down.
--
Greg