nie wiem, czy dobrze sformułuję pytanie, ale w jaki sposób drukować sprity obrócone o wektor? ;d
Wersja do druku
nie wiem, czy dobrze sformułuję pytanie, ale w jaki sposób drukować sprity obrócone o wektor? ;d
nie mam zielonego pojęcia, ale może znajdziesz coś tutaj: http://cpp0x.pl/kursy/Kurs-SDL-C++/T...-sprite-ach/97
niestety to same podstawy, chodzi mi o to, zeby np. czarny prostokąt wydrukować pod jakimś kątem, tak o:
http://i58.tinypic.com/2rzar0g.png
(wiem, ze to nie do konca prostokąt XD)
?Cytuj:
With SDL you have a few choices.
Rotate all your sprites in advance (pre-render all possible rotations) and render them like you would any other sprite. This approach is fast, but uses more memory and more sprites. As @Nick Wiggle pointed out, RotSprite is a great tool for generating sprite transoformations.
Use something like SDL_gfx to do real-time rotation/zooming. (Not recommended, very slow)
Use SDL in OpenGL mode and render your sprites to primitives, applying rotation to the primitives.
Option 3 is probably your best bet because you gain all of the advantages of using OpenGL. It's really up to you how to want to do it. It's also a possibility that you can load your sprites, perform all rotation calculations with SDL_gfx and then save the rotated versions to a SDL_Surface in memory.