On Tue, Mar 30, 2010 at 4:09 AM, Dexter Collins <[email protected]> wrote: > 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?
You need to pass a ctypes pointer in, probably made with a ctypes string buffer. However, keep in mind that this is going to be terrible from a performance standpoint - OpenGL is not designed for pixel access in this manner. A better approach would be to use render-to-texture with an FBO, and render points as needed to the texture. -- Tristam MacDonald http://swiftcoder.wordpress.com/ -- 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.
