3

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.

4

1 回答 1

4

此外ARB_get_program_binary,没有 OpenGL 功能来查询/缓存已编译的程序对象。

请注意,某些驱动程序自己会缓存程序二进制文件,例如 NVidia 的专有 Linux 驱动程序,它使用~/.nv/GLCache目录来存储缓存的对象。我不确定其他驱动程序是否也有这样的缓存,但我觉得很有可能。

于 2013-10-29T20:35:03.120 回答