Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6155fec

Browse filesBrowse files
authored
Add window hint to allow OpenGL 3+ on macOS
How can we detect os and use forwardComp by default only on macOS?
1 parent 7144bbe commit 6155fec
Copy full SHA for 6155fec

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
  • src/main/kotlin/learnOpenGL/common
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎src/main/kotlin/learnOpenGL/common/glfw.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/common/glfw.kt
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ object glfw {
1616
GLFWErrorCallback.createPrint(System.err).set()
1717
if (!glfwInit())
1818
throw IllegalStateException("Unable to initialize GLFW")
19+
20+
/* This window hint is required to use OpenGL 3.1+ on macOS */
21+
windowHint {
22+
forwardComp = true
23+
}
1924
}
2025

2126
fun windowHint(block: windowHint.() -> Unit) = windowHint.block()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.