Skip to content

How to upload multiple textures to a shader? #120

Answered by LukasBanana
st0rmbtw asked this question in Q&A
Discussion options

You must be logged in to vote

The idea for this was to use BindingDescriptor::arraySize but this is only half implemented and the documentation also only mentions Vulkan. What you can do is to declare 32 binding descriptors for textures and another 32 for samplers because in LLGL, you have to bind textures and samplers separately to the same binding slot for GL. If you want to take advantage of binding multiple resources at once (like the glBindTextures function) you can declare those resources in a resource heap, i.e. heapBindings instead of bindings field in your pipeline layout. So in your case, this could look something like this:

const std::uint32_t yourStartBindingSlot = 0;
const std::uint32_t textureSamplerCoun…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@st0rmbtw
Comment options

@LukasBanana
Comment options

@st0rmbtw
Comment options

@LukasBanana
Comment options

Answer selected by LukasBanana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants