Work like a charm ! Than you very much ! I paste here corrected code (just 
some module name correction because no import *)

# coding: utf-8
import pyglet
window = pyglet.window.Window()
vertexes = [(208, 41), (208, 266), (514, 266), (514, 41)]

# Enable blending
pyglet.gl.glEnable(pyglet.gl.GL_BLEND)
pyglet.gl.glBlendFunc(pyglet.gl.GL_SRC_ALPHA, pyglet.gl.
GL_ONE_MINUS_SRC_ALPHA)

# Enable transparency
pyglet.gl.glEnable(pyglet.gl.GL_ALPHA_TEST)
pyglet.gl.glAlphaFunc(pyglet.gl.GL_GREATER, .1)


@window.event
def on_draw():
    window.clear()

    pyglet.gl.glColor4f(0.5, 1.0, 0.2, 0.5)
    pyglet.gl.glBegin(pyglet.gl.GL_QUADS)
    pyglet.gl.glVertex3f(vertexes[0][0], vertexes[0][1], 0)
    pyglet.gl.glVertex3f(vertexes[1][0], vertexes[1][1], 0)
    pyglet.gl.glVertex3f(vertexes[2][0], vertexes[2][1], 0)
    pyglet.gl.glVertex3f(vertexes[3][0], vertexes[3][1], 0)

    pyglet.gl.glEnd()

pyglet.app.run()



-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to