I'm doing a small direct3d11 project for "fun". I know d3d11 quite well but not really any opengl. My program is designed for d3d11 but I would like it to be easy to port to opengl at some point so I'm trying to keep to abstractions that are somewhat portable. The concepts of vertex buffer, index buffers, vertex shaders, pixel shaders, and some form of input layout structures all seem to map pretty well.
But what about constant buffers? all of the examples I see of opengl shaders have code getting "pointers" to named variables in the shader and setting them whereas my code for d3d11 just creates a big c++ struct and copies it into a constant buffer. This then maps directly to a cbuffer in the shader.
Does the same concept exist in opengl? I've been unable to find it with any quick searches. Or do I have to set named variables only?