* [Caml-list] rgba/bgra in LablGL
@ 2012-02-29 20:50 Vu Ngoc San
2012-02-29 21:07 ` malc
0 siblings, 1 reply; 3+ messages in thread
From: Vu Ngoc San @ 2012-02-29 20:50 UTC (permalink / raw)
To: caml-list
Hi
My app uses LablGL (with ocamlSDL), in linux.
when I ported it to mac OS, I noticed that when loading images and
displaying them as textures, the Red and Blue bytes were swapped.
The OpenGL doc says that one can specify RGBA or BGRA when loading textures.
However LablGL only has `rgba.
Hence I patched lablGL to add the `bgra <--> GL_BGRA tag, and it works
as expected.
Can this be included in the official lablGL ? Or is there a reason not to ?
San
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] rgba/bgra in LablGL
2012-02-29 20:50 [Caml-list] rgba/bgra in LablGL Vu Ngoc San
@ 2012-02-29 21:07 ` malc
2012-03-01 3:10 ` Jacques Garrigue
0 siblings, 1 reply; 3+ messages in thread
From: malc @ 2012-02-29 21:07 UTC (permalink / raw)
To: Vu Ngoc San; +Cc: caml-list
On Wed, 29 Feb 2012, Vu Ngoc San wrote:
> Hi
>
> My app uses LablGL (with ocamlSDL), in linux.
>
> when I ported it to mac OS, I noticed that when loading images and displaying
> them as textures, the Red and Blue bytes were swapped.
>
> The OpenGL doc says that one can specify RGBA or BGRA when loading textures.
> However LablGL only has `rgba.
>
> Hence I patched lablGL to add the `bgra <--> GL_BGRA tag, and it works as
> expected.
>
> Can this be included in the official lablGL ? Or is there a reason not to ?
>
Well, one reason might be that GL_BGRA is an extension (GL_EXT_bgra), in
practice there's no harm in adding it.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] rgba/bgra in LablGL
2012-02-29 21:07 ` malc
@ 2012-03-01 3:10 ` Jacques Garrigue
0 siblings, 0 replies; 3+ messages in thread
From: Jacques Garrigue @ 2012-03-01 3:10 UTC (permalink / raw)
To: Vu Ngoc San; +Cc: OCaML List Mailing
On 2012/03/01, at 6:07, malc wrote:
> On Wed, 29 Feb 2012, Vu Ngoc San wrote:
>
>> Hi
>>
>> My app uses LablGL (with ocamlSDL), in linux.
>>
>> when I ported it to mac OS, I noticed that when loading images and displaying
>> them as textures, the Red and Blue bytes were swapped.
>>
>> The OpenGL doc says that one can specify RGBA or BGRA when loading textures.
>> However LablGL only has `rgba.
>>
>> Hence I patched lablGL to add the `bgra <--> GL_BGRA tag, and it works as
>> expected.
>>
>> Can this be included in the official lablGL ? Or is there a reason not to ?
>>
>
> Well, one reason might be that GL_BGRA is an extension (GL_EXT_bgra), in
> practice there's no harm in adding it.
LablGL already supports numerous extensions (which are mostly standard),
so this is no concern.
Please just send me your patch, and I'll include it.
I should make a new release soon...
Jacques Garrigue
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-01 3:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 20:50 [Caml-list] rgba/bgra in LablGL Vu Ngoc San
2012-02-29 21:07 ` malc
2012-03-01 3:10 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox