opengl - is switching glPixelStorei a slow operation? -


i have lots of different formats rbg, rbga , alpha , loading textures requires changing gl_unpack_alignment between 1 , 4. worth caching? having variable "alignment" , calling glpixelstorei if state differs vs calling glpixelstorei time.

same idea texture switching.

well, let's consider this.

every time change gl_pack_alignment, call gltexsubimage. function will, at best, provoke dma operation client memory opengl's internal texture memory. if you're not using pbos, means function have copy client memory internal storage dma. , if using pbos, you're going have copy operation memory.

do think changing state of pack alignment mean anything performance-wise next operations you're doing right after? think computing bitmap of glyph or uploading bitmap data texture faster changing piece of state?

don't worry it.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -