Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GL_BGRA+GL_UNSIGNED_INT_8_8_8_8_REV != GL_RGBA+GL_UNSIGNED_BYTE



Logically no, they should not be the same.

BGRA when reversed (with is what the _REV means) gives you ARGB, which is clearly not RGBA.

The article you quoted doesn't seem to imply that they are equivalent. It simply states that the {GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV} combination is better for performance than {GL_RGBA, GL_UNSIGNED_BYTE} on many cards. If they were equivalent, the driver would/should be able to figure this out and do it seamlessly for you. But they are not, thus switching to this would actually require you to change your texture data.

Hope this helps!
Daniel


Jocelyn Houle wrote:
A little while ago, I stumbled upon this thread:
  http://lists.apple.com/archives/Mac-opengl/2007/Jul/msg00015.html

which reported that the Mac OpenGL Programming Guide:

http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_performance/chapter_13_section_2.html#//apple_ref/doc/uid/TP40001987-CH213-SW23


suggested using: GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV

instead of:
  GL_RGBA, GL_UNSIGNED_BYTE

to avoid needless swizzling on many cards.


I made that modification, and things seemed to work fine in Tiger.


But I recently noticed that I am having issues with such textures in Leopard (MBP w/x1600), and switching to GL_RGBA & GL_UNSIGNED_BYTE seems to fix it for me.


Should the two pairs of enums give exactly the same result (which would indicate a bug in Leopard, or at least, a difference in behavior)?

Do I need to combine these with a separate bit-setting somewhere?
(I read something related to GL_UNPACK_CLIENT_STORAGE_APPLE, but I'm not sure I understand exactly if/how it plays into this, yet)



Any help appreciated... _______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


--
Daniel Koch -+- Graphics Technology Lead -+- TransGaming Technologies
 email@hidden  +1 613.244.1111 x352  www.transgaming.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >GL_BGRA+GL_UNSIGNED_INT_8_8_8_8_REV != GL_RGBA+GL_UNSIGNED_BYTE (From: Jocelyn Houle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.