How does one rotate a scanned image in openGL?
Great! I'll add all these techniques to my toolbox. Always good to pick everybody's brains
here.
I don't think I've mentioned it before, but I'm writing a map making utility and I want
the ability to translate, scale, and rotate images. I got the first two with glRaster()
and glScale(), but rotation stumped me. I've learned a hell of alot in the last several
days.
Just in case anybody is interested, I was able to port that "twister" code in the above link
and I just got it to work. Not as elegant from an openGL viewpoint (pun intended) but
very educational nonetheless.
I successfully fed it a 3033x3033 pixel tga image. And it took
about 5 seconds to rotate. A 2048x2048 image took about 2 seconds. Granted this was
the anti-aliased non-weighted algorithm, but still it looked pretty darn good. So not fast
enough for a real time game, but not bad for an old 400 Mhz iMac.
P.S. Graphic converter did not like the 3033x3033 image. Photoshop LE, no problemo.
Thanks again all.
here.
I don't think I've mentioned it before, but I'm writing a map making utility and I want
the ability to translate, scale, and rotate images. I got the first two with glRaster()
and glScale(), but rotation stumped me. I've learned a hell of alot in the last several
days.
Just in case anybody is interested, I was able to port that "twister" code in the above link
and I just got it to work. Not as elegant from an openGL viewpoint (pun intended) but
very educational nonetheless.
I successfully fed it a 3033x3033 pixel tga image. And it took
about 5 seconds to rotate. A 2048x2048 image took about 2 seconds. Granted this was
the anti-aliased non-weighted algorithm, but still it looked pretty darn good. So not fast
enough for a real time game, but not bad for an old 400 Mhz iMac.
P.S. Graphic converter did not like the 3033x3033 image. Photoshop LE, no problemo.
Thanks again all.
Meanwhile, the OpenGL Image sample code I linked to rotates a 3k+ image at 100fps here, with bilinear filtering.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Image Textures | mikey | 52 | 19,900 |
Jun 30, 2009 10:42 AM Last Post: AnotherJake |
|
| Cube auto-rotate | sakrist | 2 | 2,621 |
May 5, 2009 03:31 AM Last Post: Ingemar |
|
| Displaying image with OpenGL and DevIL in C? | leRiCl | 13 | 8,208 |
Jan 23, 2007 01:25 PM Last Post: djork |
|
| OpenGL Preferred Image Format (BMP, TIFF, ect) | Justin Brimm | 7 | 4,171 |
Apr 18, 2006 03:28 PM Last Post: arekkusu |
|
| 2D Image Generation & openGL | LWStrike | 2 | 2,886 |
Mar 28, 2006 03:34 PM Last Post: OneSadCookie |
|

