Page 1 of 1

changing texture at runtime

Posted: Mon Oct 23, 2006 4:39 pm
by sivagiri
Hi all,

I use irrforge-s code: "draw text in texture" to write on the wall/blackboard. And when my user clicks on the right answer I would like to change the texture at runtime.


How can I do this???

sivagiri

try this

Posted: Sat Nov 04, 2006 2:12 pm
by juliusctw
i assume that this texture is a SceneNode

You could go:
Node ->getMaterial(6).Texture1=WhatEver;

Posted: Sat Nov 04, 2006 6:02 pm
by vitek
One way to do it would be to use render-to-texture. Have a look at the tutorial.

You would to render the 'text' to a render target, and then set that render target as the texture for the wall/blackboard.

Another way would be to just draw text using a IGUIStaticText.

Travis