Screenshot bug - image is skewed diagonally in FSAA.
by Orion Elenzil · in Torque Game Engine · 06/13/2006 (4:53 pm) · 8 replies
Hi all -
this doesn't happen on all system
but it does on my otherwise pretty solid ATI Radeon X850 when in 32-bit color mode. 16-bit works fine.
when i create a screenshot using the internal torque function,
i get an image which is skewed and diagonal.
i've tried PNG, JPEG, and various window sizes.
(Not trying fullscreen)
see screenshot.
i'm wondering if maybe it's part of FSAA (full screen anti-aliasing) which seem to be hardwired "off" in 16-bits.
.. you're probably asking, well, orion, why don't *you try turning it off in 32-bits before posting to the forums, then.* which i have to admit is a reasonable question and one i'm not prepared to argue against at this time. brb. aha! it's totally the FSAA.. changing post title.
so, my question remains, anyone got a fix for messed up screenshots w/ FSAA ? I'm running OpenGL.

this doesn't happen on all system
but it does on my otherwise pretty solid ATI Radeon X850 when in 32-bit color mode. 16-bit works fine.
when i create a screenshot using the internal torque function,
i get an image which is skewed and diagonal.
i've tried PNG, JPEG, and various window sizes.
(Not trying fullscreen)
see screenshot.
i'm wondering if maybe it's part of FSAA (full screen anti-aliasing) which seem to be hardwired "off" in 16-bits.
.. you're probably asking, well, orion, why don't *you try turning it off in 32-bits before posting to the forums, then.* which i have to admit is a reasonable question and one i'm not prepared to argue against at this time. brb. aha! it's totally the FSAA.. changing post title.
so, my question remains, anyone got a fix for messed up screenshots w/ FSAA ? I'm running OpenGL.

About the author
#2
06/15/2006 (10:58 am)
I see something similar with my 9600. I think it's just an ATI driver issue.
#3
06/15/2006 (12:37 pm)
Does it come up the same trying to screengrab with something like FRAPS?
#4
paul - yes, i forgot to mention: i haven't tried fraps,
but windows's own screenshot (alt-printscreen) works fine.
.. as does fraps. those both capture the whole window including border, of course.
06/15/2006 (2:29 pm)
Thanks for the replies, guys.paul - yes, i forgot to mention: i haven't tried fraps,
but windows's own screenshot (alt-printscreen) works fine.
.. as does fraps. those both capture the whole window including border, of course.
#5
it was a dissagreement between the captured buffer and the saved buffer.
off by one pixel.
I dont think FSAA is doing the same thing. but you never know?
verify that the captured buffer dim is appropriate for the save buffer.
06/15/2006 (3:52 pm)
I had this exact bug in my application once.it was a dissagreement between the captured buffer and the saved buffer.
off by one pixel.
I dont think FSAA is doing the same thing. but you never know?
verify that the captured buffer dim is appropriate for the save buffer.
#7
ie,
change this:
glReadBuffer(GL_FRONT);
to this:
glReadBuffer(GL_BACK);
08/24/2006 (2:54 pm)
On one machine this was easily fixed by reading from the back buffer instead of the front.ie,
change this:
glReadBuffer(GL_FRONT);
to this:
glReadBuffer(GL_BACK);
#8
if your screenshot extent is not a multiple of four,
you'll probably crash sometime after glReadPixels().
i was able to fix this (again, on one machine) by preceding that call with
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
08/24/2006 (4:47 pm)
Another screenshot note -if your screenshot extent is not a multiple of four,
you'll probably crash sometime after glReadPixels().
i was able to fix this (again, on one machine) by preceding that call with
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
Associate Orion Elenzil
Real Life Plus
since it looks like it's grabbing some garbage bits on the left edge, i may try adapting it to only save out a subregion of the window.