I could figure that much out, but I couldn't quite understand how to do this with Texture.__init__ like my example showed.
On Sun, Jan 10, 2010 at 11:23 PM, evil.phillip <[email protected]>wrote: > The following works for me. Note that the first argument to > blit_to_texture is a texture target like GL_TEXTURE_2D, and is not a > Texture object. Also the fifth argument is the data format and should > not be 0. > > > from pyglet.gl import * > > window = pyglet.window.Window() > > image = pyglet.image.load('kitten.jpg') > texture = pyglet.image.Texture.create(image.width, image.height, > GL_RGBA) > image.blit_to_texture(texture.target, 0, 0, 0, GL_RGBA) > > @window.event > def on_draw(): > window.clear() > texture.blit(0, 0) > pyglet.app.run() > > -- > 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]<pyglet-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/pyglet-users?hl=en. > > > >--
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.
