2009/8/3 Richard Tew <[email protected]>:
> If anyone can help me with the following error, it would be
> appreciated.  Really, for now, I'd just like to be able to set
> arbitrary pixels to arbitrary colours so I can render something, so
> alternatively pointers to existing example code to do that would be
> welcomed.
>
> The following code:
>
>  import array
>  data = array.array('B', (0 for x in xrange(w.width * w.height * 3)))
>
>  mapImage = pyglet.image.create(w.width, w.height)
>  mapImage.set_data('RGB', w.width * 3, data)

Try:

mapImage.set_data('RGB', w.width * 3, data.tostring())

-- 
Mikael Lind
http://elemel.se/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to