Re: Regarding purple haze on screen
- From: gamiravi.d@xxxxxxxxx
- Date: Wed, 11 Jul 2007 23:50:04 -0700
On Jul 12, 7:39 am, Heath Raftery <hraft...@xxxxxxxxxxxxx> wrote:
gamirav...@xxxxxxxxx wrote:
I am trying to capture screen using openGL.
I am using this function to read frame buffer.
glReadPixels(0, 0, width, height,
GL_BGRA,
GL_UNSIGNED_INT_8_8_8_8,
GetPixBaseAddr(pixmap));
I am getting purple/Pink haze while only on Intel machine.
I can't judge the thing why it's happening. Can anybody help
me on this?Ravi.
Definitely a byte ordering thing (endian issue). Experiment with
GL_UNSIGNED_INT_8_8_8_8_REV instead, and also search on
"swizzleBitmap" to find code that deals with the necessary
reordering of bytes from a glReadPixels bitmap.
AFAIK, my screen capture code currently handles PPC and Intel, but
there is nothing explicit about changing behaviour on either
architecture in there. From memory, the difference is handled by
the GL setup and the swizzling. I use 8_8_8_8_REV instead of
8_8_8_8 instead, too.
--
*--------------------------------------------------------*
| ^Nothing is foolproof to a sufficiently talented fool^ |
| Heath Raftery, HRSoftWorks _\|/_ |
*______________________________________m_('.')_m_________*
Thanks For ur Reply.
It works fine with 8_8_8_8_REV. but i am not sure that whether it will
works on PPC architecture or not.
if you haven't any problem can u give the format for glReadPixels that
u used.
i.e argument of that function
glReadPixels(....,....,.....,.....,.........,.......,........);
so i can verify also for PPC.
Thanks & Regards,
Ravi.
.
- Follow-Ups:
- Re: Regarding purple haze on screen
- From: Heath Raftery
- Re: Regarding purple haze on screen
- References:
- Regarding purple haze on screen
- From: gamiravi . d
- Re: Regarding purple haze on screen
- From: Heath Raftery
- Regarding purple haze on screen
- Prev by Date: API IsWindowActive
- Next by Date: Re: API IsWindowActive
- Previous by thread: Re: Regarding purple haze on screen
- Next by thread: Re: Regarding purple haze on screen
- Index(es):
Relevant Pages
|