Re: Regarding purple haze on screen



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.

.



Relevant Pages

  • Re: Regarding purple haze on screen
    ... reordering of bytes from a glReadPixels bitmap. ... works on PPC architecture or not. ... where bitmapRep is a NSBitmapImageRep. ... I wish I could remember the changes I made to support Intel, ...
    (comp.sys.mac.programmer.help)
  • [opensuse] PPC Factory
    ... I know that there isn't anymore support for the ppc architecture, ... was promised that the ppc factory version will be still deployed. ... Try to boot from the 11.1 net ppc added the factory repo, ...
    (SuSE)