EFileTahi-A
Contributor
As you all know, when using a texture in Direct3D we must inform the texture's size when using it as a sprite in a form of a rectangle.
What I need to know is how can I retrieve the picture's size which is being assigned to the texture object so that I can create the apropriate rectangle to display the correct texture aspect ratio. Like, if I load a 32x32 picture into a texture object I also need to inform the Sprite.Draw command that the texture is a 32x32 image.
Pseucode:
tks for any possible help on this one
What I need to know is how can I retrieve the picture's size which is being assigned to the texture object so that I can create the apropriate rectangle to display the correct texture aspect ratio. Like, if I load a 32x32 picture into a texture object I also need to inform the Sprite.Draw command that the texture is a 32x32 image.
Pseucode:
Code:
//Check the apropriate texture size to use
if the original image's size which was loaded into the current texture is 32x32
sprite.draw(texture with size 32x32)
else if image size is 128x128
sprite.draw(texture with size 128x128)
(...)
tks for any possible help on this one