On Thu, Dec 4, 2008 at 3:55 PM, David Given <[EMAIL PROTECTED]> wrote:
> Mathias Agopian wrote:
> [...]
>> The notion of "high" byte and "low" byte in a 24-bits frame buffer is
>> a little odd. Since these are not 32 bits or 16 bits numbers, I'm not
>> sure what you mean.
>
> People typically use the same order that the equivalent 32-bit format
> would be. So the first byte, red, is the LSB and the last byte, blue, is
> the MSB.
>
>> I stand by what I said, android supports RGB, in that order. One byte
>> of red, one byte of green, followed by one byte of blue. R,G,B... btw,
>> this order happens to be OpenGL's GL_RGB internal format for textures.
>
> Just to make life more complicated, if you look at a GL_RGB pixel in a
> word, what you usually see is:
>
> <- MSB                    LSB ->
> 00000000bbbbbbbbggggggggrrrrrrrr
>

I don't understand what "looking at a GL_RGB pixel in a word" means. A
word has 32 bits, GL_RGB has 24. What you see in the word depends on
how you read that word in the first place. you could have done an
aligned access at the address of where R is (in which case you'd have
the next pixel's R in the top byte and not zeros), or you could have
done an unaligned access at the address just before, or you could have
read all components one byte at a time and merge them back together...
etc...

> ...which causes a lot of people to refer to this as BGR. Just to make
> life even *more* confusing, the same school of thought will happily
> refer to the exact same format as RGB if they're on a big-endian system.
>
> Which is why it's always really useful to follow Mathias' lead and use
> the GL_ names. They're at least well-defined!

Agreed :-)
Also, as I pointed out before, the change that was made to the source
code to "make it work", breaks GL_RGB.


Mathias


>
> --
> ┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
> │
> │ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽"⊂M),(V⊝"M),(V,⌽V)⌽"(V,V←1⎺1)⊝"⊂M)'
> │ --- Conway's Game Of Life, in one line of APL
>
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to