Archived

This topic is now archived and is closed to further replies.

shakazed

Do I have to settexture all the time?

Recommended Posts

hello

it depends. say u have one polygon that uses one texture. and thats all that ever happens (i know a game would never be like this just bare with me)
so u have this one polygon being draw every frame. and no other polygons. this poly uses one texture only. so u can set this texture ONCE and that texture will be pasted onto the poly as long as u do not set another texture. when u set another texture then that texture will be the active one for that redering pass. and it will stay active as long as u dont set it to null or u dont set another texture.

so to render many polygons that use differnet textures u should arrange them into groups organized into what textures they use. it would be like this:-

set texture1
render all polygons that use texture1
set texture2
render all polygons that use tecture2


that will minimize the number of times u have to set textures in a single pass.

but if every poly used the same texture then u could have soemthing like this

void init()
{
set texture1;
}

init() would be called once at the start of teh program

then

render polygons.

that way all your polygons would use the texture you set at the beginnig, and they will keep on using that texture until u set another one.

please excuse the mess my reply is in

goodbye






Al Fareed
MY HQ

[edited by - alfmga on August 13, 2002 6:43:58 AM]

Share this post


Link to post
Share on other sites