Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL 3.2: Cache compiled shaders?

Is there any way to cache compiled shader programs using OpenGL 3.2?

I've looked at ARB_get_program_binary but found my driver does not support it.

I'd like to be as compatible with older cards as possible so switching to OpenGL 4 is not a good solution.

I'm working with Qt5.1 and using QOpenGLFunctions_3_2_Core to access OpenGL functions.

like image 966
Jay Avatar asked Dec 04 '25 13:12

Jay


1 Answers

Besides ARB_get_program_binary, there is no OpenGL functionality to query/cache compiled program objects.

Note that some drivers do cache program binaries by themself, like NVidia's proprietary Linux drivers which use the ~/.nv/GLCache directory to store the cached objects. I'm not sure if other drivers do also have such a cache, but I find it quite likely.

like image 188
derhass Avatar answered Dec 07 '25 13:12

derhass



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!