I have a sprite to which I want to apply a dissolve effect wherein random pixels will gradually fade to transparent. Here's the snippet of code I'm having trouble with... in theory it should take a single pixel of the given image and turn it red:
glBindTexture(GL_TEXTURE_2D, texture_id); glTexSubImage2D( GL_TEXTURE_2D, 0, 3, 3, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, (1, 0, 0, 1) ) But it gives me the error: ctypes.ArgumentError: argument 9: <type 'exceptions.TypeError'>: wrong type Obviously the last argument I'm passing to glTexSubImage2D is incorrect. How do I correctly tell the glTexSubImage2D method that I want the specified pixel to be red? And how do I get the original color of that pixel in the first place for the purpose of making it slightly more transparent? Best regards, Dex -- 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.
