Skip to main content
GameDev.net gamedev.net
🔒 Locked

Rotating a texture

Started by Jannes Jul 1, 2004 at 9:36 AM 5 replies 1.6k views
Original Post
Jannes
Jannes
Hi, i was wondering if it is possible to rotate a texture without modifying the file or using a rotationmatrix. i just need to rotate it by 0°,90°,180°,270°. Say after loading it from a file. thx alot
xg0blin
xg0blin
I don't know why you wouldn't want to use a rotation matrix, but you don't have to I guess. You could always just modify the texture coordinates.
Jannes
Jannes
hmm

sth i thought about too. But if i use this texture only for a sprite, there arent any texture coords defined. The texture gets assigned to a LPDIRECT3DTEXTURE9 and then is used in the SpriteInterface-Draw function. Think i have to read more about this.
Joeman
Joeman
instead of using sprites, just render a the texture on a quad. Then you can do a lot of cool stuff with it like lighting, rotating, etc.....
Syrillix
Syrillix
if your using the sprite interface to draw the texture then the only way i think you could do is by manipulating the texture matrix.
yes, i know you will have to use a rotation matrix, but really, whats so bad about that?
Get busy livin' or get busy dyin'... - Shawshank RedemptionIf a man is talking in the forest, and no woman is around to hear him, is he still wrong? - UnknownFulcrum
Jannes
Jannes
Its nothing bad about it, except i have to rewrite alot of code :(
Syrillix
Syrillix
yeah, i know what you mean.. that whole writing code business is sooo overrated ;)
Get busy livin' or get busy dyin'... - Shawshank RedemptionIf a man is talking in the forest, and no woman is around to hear him, is he still wrong? - UnknownFulcrum

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.