Thank you! It worked. May I ask another question, can I get the position of the mouse at any give time, without any buttons being pressed I mean?
On Oct 11, 2:47 pm, "Alex Holkner" <[EMAIL PROTECTED]> wrote: > On 10/11/08, Noyan Tokgozoglu <[EMAIL PROTECTED]> wrote: > > > tex = pyglet.image.Texture.create(width=640,height=480) > > This creates a TEXTURE_2D texture with dimensions 1024x512, and > returns a region of that texture of dimensions 640x480. > > > glBindTexture(GL_TEXTURE_2D,tex.id) > > glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,0,0, 640, 480, 0) > > Because the target is TEXTURE_2D, the dimensions 640x480 are invalid, > and the result will be undefined. (Most likely your video card is > compensating and swapping TEXTURE_2D for TEXTURE_RECTANGLE; but pyglet > doesn't know this, so the image pitch is incorrect). > > You should use glCopyTexSubImage2D instead of glCopyTexImage2D. Note > that the ColorBufferImage class already does this -- use > pyglet.image.get_buffer_manager().get_color_buffer().get_texture() in > place of your existing code. > > Alex. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
