LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.03k stars 135 forks source link

Primitive restart index not working on Mac OpenGL #72

Closed beldenfox closed 2 years ago

beldenfox commented 2 years ago

The code that sets up the fixed primitive restart index (GLStateManager::SetPrimitiveRestartIndex) only sets the index if the ARB_compatibility extension is present even though glPrimitiveRestartIndex is a core feature of OpenGL 3.1 and up.

LukasBanana commented 2 years ago

This should be fixed with commit 0543649. I enabled the GL_ARB_compatibility extension by default for Mac, but haven't committed that change until now. I also enable the GL state GL_PRIMITIVE_RESTARTonly when an index buffer is bound, as this was causing a triangle soup when the non-indexed Draw commands were used on Mac.