Flipping textures horizontally

Started by
11 comments, last by Programmer16 18 years, 10 months ago
Quote:Original post by load_bitmap_file
Quote:Original post by Programmer16
Ok, you do all of that when it can be easily done with 3 lines? But congrats on finding a solution!


Ah, but less lines != "better". All the math going on here ought to be significantly faster than setting the sampler state for each and every Sprite that needs to be flipped, thanks to uber assembly optimiziation. Besides, I couldn't get the 3 line way to work for whatever reason. [wink]


Yeah, I thought about that after I posted (and I'm too busy working on my engine to edit it.)
Advertisement
Quicktip would be to just design your own quad/sprite-engine or download one, there are great tutorials on how to do them, and really it isn't hard, and it will give you more features than you could ever dream of. (and easily flipping them)

Ok, I agree it takes time as everything, but if you have time, it is really great experience and will allow you to add a lot of effects to your game. (e.g. such as flipping without any hacks)


Quote:Original post by Syranide
Quicktip would be to just design your own quad/sprite-engine or download one, there are great tutorials on how to do them, and really it isn't hard, and it will give you more features than you could ever dream of. (and easily flipping them)

Ok, I agree it takes time as everything, but if you have time, it is really great experience and will allow you to add a lot of effects to your game. (e.g. such as flipping without any hacks)


While I agree with you, if you make you're own then you have to implement batching, texture sorting, etc. While with the ID3DXSprite interface you get all of that plus some.

But, I'm still going to make my own :D

Edit: And neither way would be considered a hack, his uses legitimate math and mine uses teture mirroring.

Edit 2: Also, if you're still interested, here is a list of the speed of DX function calls (thanks to good ol' Circlesoft) Here

This topic is closed to new replies.

Advertisement