Thank you for posting this. On Pyglet 1.2 and wxPython 2.8.12.1 I needed to 
add a line to make the GLPanel work.  Not sure if this is the correct way 
but it got things running for me...

Sorry to revive an old thread but the thread is one of the first results 
asking google how to combine wxPython and pyglet.

def OnInitGL(self):
        '''Initialize OpenGL for use in the window.'''
        # create a pyglet context for this panel

        if self.GLinitialized:
            return

        self.pygletcontext = gl.Context(gl.current_context)
       * self.pygletcontext.canvas = self
*
        self.pygletcontext.set_current()

        # normal gl init
        gl.glEnable(gl.GL_BLEND)
        gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
        gl.glEnable(gl.GL_TEXTURE_2D)
        gl.glShadeModel(gl.GL_SMOOTH)
        gl.glClearColor(1, 1, 1, 1)*
*
        # create objects to draw
        self.create_objects()

-- 
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 http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to