OpenGL formats and endians

Sage
Posts: 1,482
Joined: 2002.09
Post: #1
When specifying image data in OpenGL, how does endian ordering affect the pixel packing? Does using GL_BYTE vs. a pre packed format like GL_UNSIGNED_INT_8_8_8_8 change the way the pixels are unpacked?

What's the easiest way to make texture loading cross platform? I was planning on using SDL_image, but is there something better? If loading is slow, that's not such a big deal, but uploading to texture memory needs to be fast. There will be a lot of dynamic uploading.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
yes, RGBA/UNSIGNED_BYTE is treated quite differently from RGBA/UNSIGNED_INT_8_8_8_8. The former is independent of endianness, the latter is not.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  File formats qwsed 10 8,424 Dec 18, 2010 10:49 AM
Last Post: AnotherJake
  internal formats. What are they good for? WhatMeWorry 2 3,540 Jan 9, 2007 11:58 PM
Last Post: arekkusu
  Tex Internal Formats - Clarification Jones 2 2,970 Nov 17, 2006 10:25 PM
Last Post: Jones
  3D Model Formats Joseph Duchesne 3 3,263 Feb 27, 2006 01:30 PM
Last Post: akb825
  sound file formats in OpenAL unknown 7 7,448 Nov 6, 2005 12:50 AM
Last Post: Skorche