Jump to content
  • Advertisement
Sign in to follow this  
Eric F.

Slower ID3DXSprite:Draw() on non-aligned source rect position/size

This topic is 1240 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'm using DirectX 9 and ID3DXSprite to draw my graphics, and I was wondering if using ID3DXSprite:Draw() with a source rect that is not aligned on a specific boundary, or if the source rect has an odd or unaligned width would slow down the rendering.

 

I know this might have been an issue decades ago, but I am wondering is such issues might be lingering in DirectX 9 or on some video cards.

 

I tried to google that stuff, but I couldn't find anything definitive.

 

Thanks for any tips!

Share this post


Link to post
Share on other sites
Advertisement

I haven't researched this, so take what i say with a pinch of salt, however I would assume this is no longer an issue.

My reasoning for this is that 32 bit colour modes have been standard for quite some time, which ensures every pixel is aligned on a DWORD boundary eliminating the issue.

 

Also, it is the gpu that accesses the graphics ram these days not the cpu directly so I am unsure if the same alignment rules even apply to reads or writes, as these are vector processors dealing in groups of 128 or more bits at once.

 

Let me know if this is useful...

Share this post


Link to post
Share on other sites

I really doubt that it would cause any issues. All it does is draw your sprite as two triangles, and changing the source rectangle just changes the UV's used for those triangles. So it's not using a weird hardware path, or anything like that.

Share this post


Link to post
Share on other sites

Thank you both for the replies.

 

I've been searching a bit more and it does seem like this issue is a thing of the past.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!