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.05k stars 139 forks source link

Mac OpenGL requires fragment shader #71

Closed beldenfox closed 3 years ago

beldenfox commented 3 years ago

The Mac implementation of OpenGL requires a fragment shader even when rendering is only updating depth/shadow or stencil information. This is a violation of the OpenGL spec, the fragment shader should be optional in these cases. This affects the Shadow Mapping, Volume Rendering, and Stencil Buffer examples.

The work-around is to provide a fragment shader that consists of just a main() function that does nothing.

I don't know if LLGL should just document this quirk or provide a fragment shader internally to provide a consistent API across platforms.

LukasBanana commented 3 years ago

If this is a bug in macOS, LLGL should probably just provide a dummy fragment shader like you mentioned as workaround.

LukasBanana commented 3 years ago

Thanks for pointing out that issue. This should be fixed with commit f75ca5f.