http://groups.google.com/group/pyglet-users/browse_thread/thread/3e9b5d96f98fd66b/1b82c05c22096e96?hl=en&lnk=gst&q=batch+group#1b82c05c22096e96
After a day of reading through previous pyglet-users posts I just found this topic about zero-length vertex lists from 11/2008. Any estimate on when Pyglet 1.2, Alex? =) I will try the trunk version. But developing against pre-release builds is, in my humble opinion, not always a good choice.
Gumm
On Wed, Oct 27, 2010 at 6:51 AM, B W <stabbin...@gmail.com> wrote:
Does anyone even have a personal opinion on, or have good/bad experiences with using graphics.Group to wrap vertex lists in a batch for turning GL states on/off, or insert nested rotations, translations, etc.? What works well, what doesn't?
I'm wondering what the Pyglet designer(s) envisioned; because these are fundamentally necessary actions, even for something as simple as a moon orbiting a planet.
And what is the intent of the generic vertex list attributes? Can I use them like I did in the block demo?
On Wed, Oct 27, 2010 at 10:24 AM, B W <stabbin...@gmail.com> wrote:
http://groups.google.com/group/pyglet-users/browse_thread/thread/3e9b5d96f98fd66b/1b82c05c22096e96?hl=en&lnk=gst&q=batch+group#1b82c05c22096e96
After a day of reading through previous pyglet-users posts I just found this topic about zero-length vertex lists from 11/2008. Any estimate on when Pyglet 1.2, Alex? =) I will try the trunk version. But developing against pre-release builds is, in my humble opinion, not always a good choice.
Gumm
I was fairly sure that this fix had made it into versions 1.1.4 (the current stable version) - if it was committed to trunk in all the way back in Nov 2008, then it definitely should have been.
Have you actually tried to use a zero-length vertex list?
On Wed, Oct 27, 2010 at 6:51 AM, B W <stabbin...@gmail.com> wrote:
Does anyone even have a personal opinion on, or have good/bad experiences with using graphics.Group to wrap vertex lists in a batch for turning GL states on/off, or insert nested rotations, translations, etc.? What works well, what doesn't?
I'm wondering what the Pyglet designer(s) envisioned; because these are fundamentally necessary actions, even for something as simple as a moon orbiting a planet.
This kind of "hierarchical management" was very popular in graphics engines, a long time ago. Since then, most people have reallised that many things are better managed outside of the graphics engine. To go with your example, a moon orbiting a planet is better dealt with as a physics problem than a graphics problem.
And what is the intent of the generic vertex list attributes? Can I use them like I did in the block demo?
Generic vertex list attributes are designed to support shaders. If you aren't using shaders, you can safely ignore them (but you probably should be using shaders...)
So what's the upshot: are people really only using graphics.OrderedGroup to sequence their batches, and wrapping the batch calls in immediate mode glEnable/glDisable/glPushMatrix/glPopMatrix calls in on_draw()?
So if you plan to distribute your application, be prepared for those issues.
One way to get good portability, and still take advantage of newer
OpenGL features, is to make everything work against the OpenGL ES
feature set, which is a sort of lowest common denominator. Then layer
on shaders and whatnot in a way that they can degrade gracefully when
they aren't available or fully implemented. That may be more
complicated overall than just using shaders for everything, but it can
be implemented in stages.
-Casey
> --
> You received this message because you are subscribed to the Google Groups "pyglet-users" group.
> To post to this group, send email to pyglet...@googlegroups.com.
> To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
>
>
One thing to bear in mind with shaders is that they will greatly
diminish portability.
Many portable graphics chipsets in the wild have
little or no support for them.
And, like programming for the browser
in javascript, there are very annoying bugs that vary from chipset to
chipset.
Also, some implementations of shaders are done in software
(e.g., older MacBooks/iBooks) thus performance can vary a lot.
One way to get good portability, and still take advantage of newer
OpenGL features, is to make everything work against the OpenGL ES
feature set, which is a sort of lowest common denominator. Then layer
on shaders and whatnot in a way that they can degrade gracefully when
they aren't available or fully implemented.
meaning the number of "platforms" that will run your game/app.
>> Many portable graphics chipsets in the wild have
>> little or no support for them.
>
> My experience is that those chipsets have not enough fixed-function power to
> do anything significant with - I ended up at the performance ceiling of my
> Intel chipset even for a moderately complex fixed-function game.
>
> Also worth mentioning that some integrated chipsets (i.e. Intel's X3100
> present in older MacBooks), are actually *faster* using shaders...
fair enough.
>> And, like programming for the browser
>> in javascript, there are very annoying bugs that vary from chipset to
>> chipset.
>
> Most of these are however in low-end Intel integrated chipsets, and very old
> Radeon discrete parts, so raising your minimum spec takes care of those as
> well. On the software side, driver bugs bite fixed-function at least as
> often (and usually more often) as they do shaders.
I agree that raising the minimum platform requirements is a fine
solution. Just wanted to point out that it may be necessary.
>> Also, some implementations of shaders are done in software
>> (e.g., older MacBooks/iBooks) thus performance can vary a lot.
>
> The GMA 950 in the original MacBook and most older netbooks does have
> hardware support for pixel shaders - only vertex shaders are emulated in
> software. Since pixel shaders usually comprise the bulk of the work, this
> isn't actually as bad as it sounds.
>
> However, if you want to get into shaders, you want to use GLSL (preferably
> OpenGL 2+), so that rules out the GMA 950 anyway.
Right, there are lots of GMA 950 machines out there, but as you say
getting any decent measure of performance from them is problematic.
>> One way to get good portability, and still take advantage of newer
>> OpenGL features, is to make everything work against the OpenGL ES
>> feature set, which is a sort of lowest common denominator. Then layer
>> on shaders and whatnot in a way that they can degrade gracefully when
>> they aren't available or fully implemented.
>
> Sadly, it doesn't work like that. OpenGL ES has only been bridged over to
> core OpenGL in the latest versions (effectively versions 4+), and these
> versions are bridged to ES2.0, which has *no* fixed-function support.
>
> ES1.0 does have fixed function support, but it has no shader support and is
> not forward-compatible with ES 2.0.
I guess I was generalizing too much. My point was to start with
things like VBOs and whatnot using fixed-function
texturing and lighting (if necessary). Wholly avoid stuff like
immediate mode and display lists, though I have to admit
that I still like the latter ;^)
What generally sucks about OpenGL support is that many cards/chipsets
claim to support specific versions, yet do not
necessarily fully implement them. Makes the whole thing a lot more
frustrating that it needs to be IMO. But that's what
happens when you channel a standards-committee through a marketing dept.
-Casey
Thanks for this tip - but sadly I have discovered through the OpenGL
Extensions Viewer (http://www.realtech-vr.com/glview/download.html via
the SuperBible site) that my MacBook (GeForce 9400M) doesn't have
support for the minimum of OpenGL 3.2 required by the 5th edition :-(
Apparently I have OpenGL 2.1 fully supported (shading language 1.20)
and *some* features of 2.0, 2.1 and 3.2. Nothing beyond that :-(
I'd still like to investigate this new world of shaders and ditching
the fixed function pipeline, but now I'm not sure it's a good idea.
What sorts of things could I reasonably replace, given the low level
of support I have?
Richard
However, if you want to get into shaders, you want to use GLSL (preferably OpenGL 2+), so that rules out the GMA 950 anyway.
Wow, that came out completely wrong. It should have said I have some
features of 3.0, 3.1 and 3.2.
Apparently this is an OS X issue across the board, not specific to my hardware.
Richard
For what it's worth I've ordered a copy anyway (the Aussie dollar
being so high it's hard to resist impulse buying books like this ;-)
so I'll soon be finding out how practical it is to apply its methods
to 2.1 as well.... altho it'd be really nice if Apple just supported
OpenGL 3 :-)
Richard
I'm assuming this is because my OpenGL 2.1 hardware can't deal with
GLSL uniforms which are arrays - which are introduced for the first
time in this tutorial. I've modified the tutorial source code to use a
bunch of explicitly declared scalar uniforms instead of the array, and
unrolled the loops that iterate on the arrays:
https://bitbucket.org/tartley/tutorials/src/tip/pyopengl/06-multiple-lights.py
This works, but it's considerably slowed my progress.
For the record, I'm working through these pyopengl tutorials right
now. In case anyone else with old hardware is considering it, you
should know:
It's all been plain sailing up until the seventh tutorial, which adds
multiple light sources:
http://pyopengl.sourceforge.net/context/tutorials/shader_7.xhtml
"The GMA 950 in the original MacBook and most older netbooks doesI'm pretty sure you can use GLSL on the GMA 950 on OSX.. but the
have hardware support for pixel shaders - only vertex shaders are emulated
in software. Since pixel shaders usually comprise the bulk of the work,
this isn't actually as bad as it sounds.
However, if you want to get into shaders, you want to use GLSL
(preferably OpenGL 2+), so that rules out the GMA 950 anyway. "
vertex shader will be emulated. It's just windows that only has ARB
shader support.
That's why I hackintoshed this Lenovo X60t
afterall :), but I haven't actually ran in glsl code on it... I'll let
you know. Intel seems to be allergic to opengl on windows, I have so
many more extensions available on the osx extension viewer.
One good
thing about the GMA 950 is it's easy to hackintosh :). Btw anybody
want to buy a hackintosh dell netbook mini10v? I have too many laptops
now with this horrible video card...
--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.