Horde3D
http://horde3d.org/forums/

How I change the texture?
http://horde3d.org/forums/viewtopic.php?f=2&t=406
Page 1 of 1

Author:  speeder [ 12.07.2008, 19:59 ]
Post subject:  How I change the texture?

Hello! I've got a great idea to make several objects on my game with little effort to the artists...

Create 9 models, 9 colour textures and 9 bump textures, and combine them randomly when creating a new object, the resoult would be 729 combinations...

But I do not want to write 729 material files!

So, after much search on the forum, on the documentation, and asking the guys at IRC (again! PLEASE PEOPLE! JOIN IRC! NOW THERE ARE PEOPLE THERE!!!), I do not found a awnser to this question:

How I change the texture of a node?

Remembering that I would need to to that when I need to load a movie (I will need that too...)

Author:  Volker [ 12.07.2008, 23:31 ]
Post subject:  Re: How I change the texture?

Currently it's only possible to replace the whole material I think. Maybe we should add something like MaterialResParams that would allow querying/changing the texture resource using get/setResourceParami. This would also allow changing the shaders without adding a new material.

Author:  speeder [ 13.07.2008, 00:41 ]
Post subject:  Re: How I change the texture?

So, what is the point of "CreateTexture2D" ?

And how I play videos?

Author:  Volker [ 13.07.2008, 07:54 ]
Post subject:  Re: How I change the texture?

Using createTexture2D you can add a Texture Resource with the specified dimension, e.g. to create a render buffer. You can also update this resource later using updateResourceData. If all your textures are of the same format using this method should be fine. If you have different textures you have to add them separately.

Regarding the video playing: Did you already read this thread?

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/