Localise OpenGL code similar to D3D11.