SFTtech/openage

OpenGL bindless textures

Opened this issue · 0 comments

We could use bindless textures in the renderer for texture drawing. The advantages of bindless textures are that they can be accessed as an index from the shader rather than having to be (re-)bound before every draw call. Bindless textures also allows using more textures per shader which is interesting for batch rendering (see #1536).

The implementation could be trivial. We just have to upload the texture to the GPU once and get a texture handle ID from OpenGL. The ID can then be passed as a uniform or using a buffer.

A problem with bindless texture support is that it is only available as an OpenGL extension and might not be available on all plattforms (e.g. macOS). Therefore, bindless textures should always stay an optional feature.