2 Dynamic VB cost + Texture Coord problem

Started by
0 comments, last by Uttar 21 years, 7 months ago
Hello everyone, I''ve got two questions: 1. What''s the cost of having 2 dynamic VBs and 2 dynamic IBs? By dynamic, i mean that every frame, i discard the contents of all of those and put all new content in it. That means i''m using 4 locks and 4 unlocks. Would it be better to have more vertices and indices in 1 VB and 1 IB? I think it would be, but i''d like to be sure it''s worth the time to make it work. 2. Texture coordinate problem here. I''m currently using a 256x256 texture with 32x32 tiles in it. If i want to access tile at row 1, column 1, i''m using the following tex coords for top left, for both tu and tv: 0.126953125 I''m getting that by doing: 0.125 + 0.001953125 That last number is 1/256/2, so i can have half a texel. However, when i put D3DTEXF_NONE as a Magnification Filter, nothing draws anymore! If i''m not mistaken, that would mean DX got to magnify my texture to fit on my 32x32 polygon, thus meaning it isn''t a perfect texel to pixel mapping. What the heck am i doing wrong here? Thanks for your time. I''m mostly concerned about my 2nd problem, but if you only got a response to my first problem, please post it anyway. It''s better to have a solution than no solution at all Uttar
Advertisement
Ok, just finished changing my two buffers into one.

Sadly, it didn''t increase performance
But since it works just as well, i''m keeping it.

As for the texture coord problem, i still didn''t find any solution...

Can anyone help me please?


Uttar

This topic is closed to new replies.

Advertisement