Advertisement Jump to content
Sign in to follow this  
slyprid

[.net] Texture size for tilemaps in Direct3D

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

I was wondering if there is a standard max size for a texture on the majority of the video cards out there. I noticed my GeForce supports up to 4096x4096, but my ATI card only supports up to 2048x2048. I was wondering if it would be feasible to stay with 2048x2048 textures for tilemaps, or go with 1024x1024? The only reason I was going with larger tilemaps is that I can group all my tiles together in one texture and not have to worry about batching. Thanks for your time. Slyprid

Share this post


Link to post
Share on other sites
Advertisement
You could even check the max size runtime and split (or combine) the textures as fitting...

Cheers

Share this post


Link to post
Share on other sites
How would you go about checking the max size of a video card? Was looking for this the other day, but to no avail.

Share this post


Link to post
Share on other sites
You use the Device.Caps.MaxTextureHeight and Device.Caps.MaxTextureWidth:

int adapterOrdinal = Manager.Adapters.Default.Adapter;
caps = Manager.GetDeviceCaps(adapterOrdinal, DeviceType.Hardware);
int maxTextureHeight = caps.MaxTextureHeight;

Cheers

BTW: Assuming that you are using DirectX (Language = C# but is more or less the same in C++)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!