OpenGL formats and endians

Posts: 1,487
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
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 8 12,174 Dec 18, 2010 10:49 AM
Last Post: AnotherJake
  internal formats. What are they good for? WhatMeWorry 2 4,691 Jan 9, 2007 11:58 PM
Last Post: arekkusu
  Tex Internal Formats - Clarification Jones 2 4,302 Nov 17, 2006 10:25 PM
Last Post: Jones
  3D Model Formats Joseph Duchesne 3 4,371 Feb 27, 2006 01:30 PM
Last Post: akb825
  sound file formats in OpenAL unknown 7 11,433 Nov 6, 2005 12:50 AM
Last Post: Skorche