Skip to main content
gamedev.net
🔒 Locked

Buffer question

Started by JSCFaith 1 reply 300+ views
Original Post
JSCFaith
JSCFaith
Hey, Right now, I am working on my first 3Dish engine. It is a tile 3D engine. I have it set up so that every texture has a Index buffer and Vertex buffer associated with it. That way I can draw every polygon with one texture at a time.. Is this a good approach, or will it not work? Thanks in advance...
HanSoL0
HanSoL0
Unfortunately, the SetTexture() function is quite computationally expensive. Depending on how many separate polygons get separate texures, you might run into some performance problems. Just make sure to batch your textures together so that you don''t have any redundant duplicates. Draw all the tiles with tex1, then draw all the tiles with tex2, and so on so that you can minimize the number of SetTexture() calls.

Ryan
JSCFaith
JSCFaith
I think you misunderstood my question, but you still answered it.

Thanks for the reply.

Later, James.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.