aboutsummaryrefslogtreecommitdiff
path: root/src/core/window.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
committerhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
commita34c49f103c8950a57687ea3d866c244d95b4414 (patch)
treeff268f4a7f52769a252443d6f2822c9814e3bb1c /src/core/window.cpp
parent06398a7a176e123506de6e8851866a8bec0b3427 (diff)
[docs]: added a few comments cause i wont be able to read this in a week's time
Diffstat (limited to 'src/core/window.cpp')
-rw-r--r--src/core/window.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/window.cpp b/src/core/window.cpp
index dd5882c..085d7bc 100644
--- a/src/core/window.cpp
+++ b/src/core/window.cpp
@@ -39,16 +39,16 @@ namespace Donut
if (RendererAPI::get_api() == RendererAPI::API::Vulkan)
{
- // Vulkan manages presentation itself; GLFW must not create a GL context.
+ // Vulkan does its own presentation, so GLFW must NOT sneak in a GL context.
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
}
else
{
#ifdef __APPLE__
- // macOS only exposes OpenGL up to 4.1 Core Profile, and requires a
- // forward-compatible core-profile context for any modern (>= 3.3)
- // shader to compile. Without these hints GLFW hands back a legacy
- // 2.1 context and every GLSL shader in the project fails to build.
+ // macOS caps OpenGL at 4.1 Core Profile and demands a forward-compat
+ // core-profile context for anything modern (>= 3.3) to even compile.
+ // skip these hints and GLFW hands you a dusty 2.1 context and every
+ // single shader in the project refuses to build. so, we ask nicely:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);