i tried taking screenshots using the method from the manual (which is a little outdated -
SDL_CreateRGBSurface didn’t have the alpha parameter then) - anyway, the method
works, except that the image turns out to be upside down. I tried glPixelStorei with the
GL_PACK_LSB_FIRST flag in an attempt to correct things, but that didn’t help …
any ideas?--------------------------------------------------------------
Christian Zander ** N?ckersberg 76 ** 45257 Essen ** Germany
email: mbox at minion.de ** www: www.minion.de ** icq#: 5322926
GL_PACK_LSB_FIRST flag in an attempt to correct things, but that didn’t help
OpenGL (as any math dude) puts the origin in the lower left corner as
opposed to the upper left one every graphics programmer assumes (it also
assumes 1.0 to be fully opaque…). There are some GL commands that
switch this behaviour (glViewport might help but I am not sure).
In article <38C41660.BF5CBF50 at grafzahl.de>, Jonas wrote:
OpenGL (as any math dude) puts the origin in the lower left corner as
opposed to the upper left one every graphics programmer assumes (it also
assumes 1.0 to be fully opaque…). There are some GL commands that
switch this behaviour (glViewport might help but I am not sure).
Yes, I know that, and that’s why i tried modifying that behaviour with glPixelStorei, but
that function doesn’t really do what i need it to …--------------------------------------------------------------
Christian Zander ** N?ckersberg 76 ** 45257 Essen ** Germany
email: mbox at minion.de ** www: www.minion.de ** icq#: 5322926
Yes, I know that, and that’s why i tried modifying that behaviour with glPixelStorei, but
that function doesn’t really do what i need it to …
Aye, I’ve always just flipped my images manually, for
instance during texture loading. If you figure out how
to flip em with glPixelStorei, I’d like to know about it.
JW–
// John Watson
// Software Engineer – STScI Archive Team
switch this behaviour (glViewport might help but I am not sure).
glOrtho() will allow you to do the mapping.
m.On Mon, Mar 06, 2000 at 09:34:40PM +0100, Jonas wrote:
–
Programmer "I wrote a song about dental floss,
Loki Entertainment Software but did anyone’s teeth get cleaner?" http://lokigames.com/~briareos/ - Frank Zappa, re: the PMRC
i tried taking screenshots using the method from the manual (which is a
little outdated -
SDL_CreateRGBSurface didn’t have the alpha parameter then) - anyway, the
method
works, except that the image turns out to be upside down. I tried
glPixelStorei with the
GL_PACK_LSB_FIRST flag in an attempt to correct things, but that didn’t
help …
any ideas?
It’s because of how GL handles its coordinate transforms… the most obvious
kludge is to read the things in with 480 (or so) glReadPixels calls
backwards… I just flip the screenshots.
An update will be made… I have a few other things to correct too while
I’m at it…
Christian Zander ** N?ckersberg 76 ** 45257 Essen ** Germany
Nicholas
Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert
----- Original Message -----
From: phoenix at minion.de (phoenix@minion.de)
To: sdl at lokigames.com
Date: Monday, March 06, 2000 11:58 AM
Subject: [SDL] opengl screenshot
In article <20000306142040.L4617 at namaste.lokigames-lan.com>, Michael Vance
wrote:>> On Mon, Mar 06, 2000 at 09:34:40PM +0100, Jonas wrote:
switch this behaviour (glViewport might help but I am not sure).
glOrtho() will allow you to do the mapping.
He he, thanks - that’s what I love about the internet - people who know their
business are just a click away
Isn’t he great? Michael’s just my special hero.
On a more relevant technical note, just remember to only convert the matrix
during the screenshot and to restore it… Michael’s not very clear on this.
Otherwise, all hell will break loose and you will be stuck trying to figure out
what’s going on.