Jump to content
  • Advertisement

Archived

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

Uttar

2 Dynamic VB cost + Texture Coord problem

This topic is 5931 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

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

Share this post


Link to post
Share on other sites
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

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!