I try to create rendering system that supports DirectX and OpenGL. I am trying to create class for constant buffer, but DirectX constant buffers and OpenGL uniform buffers have different memory organisation rules. Is there any way to to achieve the compatibility between DirectX and std140 from OpenGL?
Or probably will it be better to choose a other way to create abstraction of constant buffers for shaders? And how developers solve problem of passing data to shaders effectively in serious engines?