openage icon indicating copy to clipboard operation
openage copied to clipboard

OpenGL bindless textures

Open heinezen opened this issue 2 years ago • 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 https://github.com/SFTtech/openage/issues/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.

heinezen avatar Sep 17 '23 14:09 heinezen