Tex Internal Formats - Clarification

Jones
Unregistered
 
Post: #1
The 'internalformat' argument for the glTexImage*D commands can take many items besides 1,2,3 and 4.

Some constants like GL_RGB8, or GL_ALPHA8 can also be passed as values.

I've just got a little question or two about them:

GL_RGB8 means an image with three channels, each channel receiving 8bits (the image is 24bit). GL_ALPHA8 means one channel (alpha only) with 8bits for this channel, correct (the image would be 8bit)?

What I'm wondering is, does GL_RGB4 mean three channels each with 4bits of data? This would mean the image was... 12 bits per pixel? Blink (16bit with 4 wasted bits?)

I've been told it's better to pass the constants because it's more future-proof. Just wondering if I should send 16bit images to OpenGL as GL_RGB4.

Thanks!
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
Quote this message in a reply
Jones
Unregistered
 
Post: #3
DoG Wrote:http://www.opengl.org/resources/code/sam...ode51.html

'nuff said.

Awsome man! That's getting a bookmark! Grin

Thanks a ton. Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  File formats qwsed 10 8,749 Dec 18, 2010 10:49 AM
Last Post: AnotherJake
  internal formats. What are they good for? WhatMeWorry 2 3,627 Jan 9, 2007 11:58 PM
Last Post: arekkusu
  SDL_GL_DEPTH_SIZE clarification... sealfin 2 4,696 Oct 25, 2006 03:51 AM
Last Post: sealfin
  3D Model Formats Joseph Duchesne 3 3,370 Feb 27, 2006 01:30 PM
Last Post: akb825
  sound file formats in OpenAL unknown 7 7,818 Nov 6, 2005 12:50 AM
Last Post: Skorche