I'm working on a project based on BGFX and I'm trying to define with a fragment shader is BGFX is running in OpenGL or DirectX.
gl_FragColor = texture2D(color_tex, UV0);
I need this information to access a texture, as the texture coordinate (UV0) is different between GL and DirectX.
I could create a specific version of the shader for both APIs but there must be a most clever way to handle this. I looked in BGFX documentation but couldn't find anything about this point.
Furthermore, isn't the whole point of BGFX to abstract this kind of APIs differences ?