[visionegg] Re: Texture stimulus question

Jonathan ! wrote:

Hi Andrew,

I would like to know what is the way to change the texture of a textureStimulus once it as been created.

All the example in the demo pass the texture at the instanciation. But if I have to pass None and apply a texture later I dont see how to do it. For now, I always see the default white texture.

I have created subclass of TextureStimulus and I what to create the texture depending on the parameters pass to the constructor. So I would like to create the texture in the __init__ of the new class and apply the texture. I've tried self._reload_texture() and things like that, but it doesnt work.

Do you have a idea?

Have you looked at the source code to the demos dynamic_image and image_sequence_fast? These should show you how... Bascially, use the put_sub_image() method of the texture object.
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: