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: Performance hit with GL_TEXTURE_RECTANGLE_EXT & S3TC textures



Hi Jon,

I believe you'll have to precompress the textures. When you upload an uncompressed texture to a ST3C opengl texture the driver needs to compress it and it take a lot of time. You can either use a program to compress your textures offline and store them in ST3C format so that the driver will only have to copy the data in VRAM, or you can upload uncompressed textures and then force their use in a hidden first frame to insure that they are correctly compressed by the driver, then all the other frames shouldn't have any compression penalty.

Hope this helps,

Sebastien


Jonathan del Strother wrote:

I'm using S3TC textures, loaded with glCompressedTexImage2D. Ideally, I'll like to load them to the GL_TEXTURE_RECTANGLE_EXT target - a number of my other textures are rectangular, so it simplifies things if I can assume everything I'm drawing is rectangular...

However, I'm seeing a big performance hit the first time each S3TC rect. texture is drawn to the screen, which doesn't seem to exist if I use GL_TEXTURE_2D textures. According to Shark, a lot of time is being spent in glgProcessColor, from this call chain:


0.0% 28.7% GLEngine glBegin_Exec
0.0% 28.6% ATIRadeon9700GLDriver gldUpdateDispatch
0.0% 28.0% ATIRadeon9700GLDriver gldPageoffBuffer
0.0% 28.0% ATIRadeon9700GLDriver gldGetTextureLevel
0.0% 28.0% ATIRadeon9700GLDriver gldGetTextureLevel
25.7% 25.7% libGLImage.dylib glgProcessColor (GLDPixelMode const*, GLGOperation const*, unsigned long)




Is there anything that I can do about this, or am I stuck with 2D textures?

Cheers,
Jon



-- Sebastien Metrot Lead Dev. http://www.usbsounds.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: 
 >Performance hit with GL_TEXTURE_RECTANGLE_EXT & S3TC textures (From: Jonathan del Strother <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.