Re: RGBA or ABGR and textures

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Tue, 30 Apr 1996 01:25:28 -0700


+>---- On Apr 27, 1:14am, gideon wrote:
> Subject: RGBA or ABGR and textures
->From guest++at++holodeck.csd.sgi.com Fri Apr 26 19:00:00 1996
->From: gideon <gideon++at++xs4all.nl>
->Subject: RGBA or ABGR and textures
->To: info-performer++at++sgi.com
->Date: Sat, 27 Apr 1996 01:14:07 +0200 (MET DST)
->X-Mailer: ELM [version 2.4 PL25]
->
->Hi,
->
->I'm trying to download textures from an sgi movie file - using the dmedia
->library. It all seems to work, except for the fact that the packing of
->the pixels is wrong. I've tried a number of things to change the pixel
->packing during transer (like glPixelStorei ...), to no avail.
->Does anyone have a suggestion how to solve this ?
->BTW I'm using Performer 2.0 and OpenGL on a High Impact.

All you should need to do is to set the host memory format token in
glTexImge2d to be GL_ABGR_EXT. On the current IMPACT sw this can
have a 10-20% impact on loading performance of large textures (> 64x64),
but this is a known problem that should be fixed for the next release.

However, I'd say that whenever reasonable, one should opt for RGBA textures
and swap the bytes as they are read in since that is the OpenGL centric way.
Sample code to do the byte-reorder as data is read is in the source
code for the Inventor loader.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:49 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.