mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 03:23:52 +00:00
Fix for MacOS OGL 4.1 support
Workaround: MacOS does not have access to glClipControl. Because the lower range of the 32F buffer is not available using this workaround, the improvements to depth behavior from depth reversal will be limited on MacOS. Behavior is equivalent to reversed depth on a 24UINT buffer; Better than stock, but not dramatically.
This commit is contained in:
parent
75625dc679
commit
c64c2212ad
1 changed files with 5 additions and 0 deletions
|
|
@ -191,7 +191,12 @@ void GFXGLDevice::initGLState()
|
|||
glGenVertexArrays(1, &vao);
|
||||
glBindVertexArray(vao);
|
||||
|
||||
// MacOS uses OGL 4.1. This workaround is functional, but will not provide the improvied depth performance.
|
||||
#if defined(__MACOSX__)
|
||||
glDepthRangef(0.0, 1.0);
|
||||
#else
|
||||
glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
|
||||
#endif
|
||||
//enable sRGB
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue