Currently the graphics API I am using is Vulkan, but I am trying to find a general enough way to represent the following.
In graphics, drawing can be generalized as:
Get vertex buffers and send them to the GPU Get all uniform information (samplers, camera, offsets, light positions) and set them in the relevant shader
call the draw command.
Obviously the above may be needed to be done multiple times for the same geometry for certain effects. But in general, that's the gist of the situation.
I am currently trying to setup a generalized "draw" scheme, in which I would like to just declare the geometry, declare the uniform values, and then just render that geometry with those uniforms.
I was wondering if there is a data structure to organize this already.
i.e, is there an existing scheme for arbitrary draw state declaration?