sandyrepope
28-03-2008, 02:54
In the script I'm working on there is a torus and some spheres. Is it possible to use a texture with the torus and not with the spheres. I've tried but all I get so far is an all or nothing. It either uses the texture for everything or nothing.
Thanks
Sandy
Here's a fully commented example sandy. :)
Edit
Script updated
Petr Schreiber
28-03-2008, 09:26
Thanks Matthew,
really nice sample!
To avoid possible confusions, I added an alias for TBGL_UseTexture.
For example on line:
tbgl_usetexture 1 : tbgl_bindtexture 1 ' -- Turn on texture
... someone could think that "1" reffers to the same object in both commands, so I recommend to use something like that instead:
tbgl_useTexturing %TRUE
tbgl_bindTexture 1
I think it is more "educational" syntax.
I know when I started TBGL the choice of TBGL_UseTexture function name was not one of the wise decisions :), so that alias ( tbgl_UseTexturing ) is hopefully more clear.
Thanks,
Petr
Petr Schreiber
28-03-2008, 18:24
Thanks a lot Matthew,
I know I am terrible with correcting scripts of others,
but it is for good thing ;D
Petr