nanogui: framebuffer endianess


Previous by date: 22 Jan 2008 02:27:30 -0000 How to improve the efficiency of the NanoX draw?, Lazy Fox
Next by date: 22 Jan 2008 02:27:30 -0000 Re: When linking app to server; shared mem?, Greg Haerr
Previous in thread: 22 Jan 2008 02:27:30 -0000 Re: framebuffer endianess, Matthias Fuchs
Next in thread: 22 Jan 2008 02:27:30 -0000 Re: framebuffer endianess, Matthias Fuchs

Subject: Re: [nanogui] framebuffer endianess
From: "Greg Haerr" ####@####.####
Date: 22 Jan 2008 02:27:30 -0000
Message-Id: <0c4701c85c9e$4eec5b40$0300a8c0@RDP>

> You've got a "BIGENDIAN" choice in config-file. Tried that?

That won't affect framebuffer writes, instead it's used to
determine whether to byteswap data read from disk.



> I grep'ed over the complete code and did not find a place where wswap is 
> used
to swap any access to the framebuffer. The swapping macros are only used 
when
handling .bmp images.

The 16bpp driver is src/drivers/fblin16.c.  Write a swap macro
before the word is written to the framebuffer and you should
be on your way.  See the nibble swapping in drivers/fblin4*.c
for ideas.

Regards,

Greg




For further testing I wrote a little tool that maps the framebuffer memory
and runs over every pixel, does a 16bit read, swaps the pixel and writes it 
back.

In the end my colors look as expected. So it's definetely a swapping issue.

Matthias
>
> 


Previous by date: 22 Jan 2008 02:27:30 -0000 How to improve the efficiency of the NanoX draw?, Lazy Fox
Next by date: 22 Jan 2008 02:27:30 -0000 Re: When linking app to server; shared mem?, Greg Haerr
Previous in thread: 22 Jan 2008 02:27:30 -0000 Re: framebuffer endianess, Matthias Fuchs
Next in thread: 22 Jan 2008 02:27:30 -0000 Re: framebuffer endianess, Matthias Fuchs


Powered by ezmlm-browse 0.20.