Add OpenGL Core Profile requirement

This commit is contained in:
JeremyStar™ 2024-07-21 21:17:24 +02:00
parent 8b09290c81
commit 9d3397888d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 3 additions and 1 deletions

View file

@ -184,9 +184,10 @@ public final class OpenGlSubsystem implements ApiMainClass {
/** {@inheritDoc} */
@Override
public boolean isCompatible() {
// Set required version
// Set required version and profile
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Create test window
long window = glfwCreateWindow(0, 0, "sos!engine OpenGL API compatibility test", MemoryUtil.NULL, MemoryUtil.NULL);

View file

@ -71,6 +71,7 @@ public class Window extends de.staropensource.sosengine.graphics.classes.Window
// Set required version and profile
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Create window
long identifier = glfwCreateWindow(getSize().getX(), getSize().getY(), getTitle(), MemoryUtil.NULL, MemoryUtil.NULL);