Jump to content
  • Advertisement


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


Do I have to settexture all the time?

This topic is 5971 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


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


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


Al Fareed

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!