On Feb 15, 10:47 pm, Richard Jones <[email protected]> wrote:
> On 16/02/2010, at 2:55 PM, Mike Wyatt wrote:
>
> > I'm seeing a weird issue with drawing sprites and PyLepton particles. I
> > just added some Lepton particles to my Pyglet project. It sort of works,
> > but all the particles are rendered as colored quads with no texturing.
>
> > I attached a test script that is just a modification of Lepton's smoke
> > sample with the addition of a single sprite batch. You should be able to
> > see the smoke rendered as quads when the script first runs. Press any key
> > to toggle the sprite rendering. After turning the sprite rendering off,
> > the smoke is suddenly rendered correctly. Interestingly, the smoke still
> > looks good even when you toggle sprite rendering back on.
>
> > I'm sure I simply need to set some GL state before rendering the particles,
> > but nothing I've tried has worked. Enabling blending, texturing, or
> > lighting, changing blend or shade modes, or disabling depth test didn't
> > have any effect.
>
> I had to wrap my Lepton code in:
>
> glPushAttrib(GL_COLOR_BUFFER_BIT)
> glEnable(GL_BLEND)
> glBlendFunc(GL_SRC_ALPHA, GL_ONE)
> group.draw()
> glPopAttrib()
>
> where "group" is the ParticleGroup instance.
>
> Richard
That didn't have any effect in the test script. I also tried
disabling the client state settings, even though the glPopClientAttrib
as in Casey's stack trace should have done that, but that also didn't
make a difference.
glDisableClientState(GL_VERTEX_ARRAY)
glDisableClientState(GL_COLOR_ARRAY)
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
--
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.