putpixel with pyglet
Posted
by
pts
on Stack Overflow
See other posts from Stack Overflow
or by pts
Published on 2010-12-25T22:51:26Z
Indexed on
2010/12/25
22:54 UTC
Read the original article
Hit count: 606
I'm new to pyglet. I'd like to change a pixel from black to white at each on_draw
iteration. So after 1000 iterations, there should be exactly 1000 white pixels in the window. However, I'd like to avoid calling 1000 draw operations in on_draw
for that. So I'd like to create an image, do an RGB putpixel on the image, and blit the image to the screen. How can I do that? The pyglet documentation, the examples and the source code aren't too helpful on this.
© Stack Overflow or respective owner