Просмотр исходного кода

Added GLFW_OPENGL_FORWARD_COMPAT for Apple Support (#1445)

Without GLFW_OPENGL_FORWARD_COMPAT, running this as a standalone will yield the error:
```
NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
```
pull/1448/head
Seth Archambault 4 лет назад
committed by GitHub
Родитель
Сommit
d43268b317
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
1 измененных файлов: 4 добавлений и 0 удалений
  1. +4
    -0
      examples/others/rlgl_standalone.c

+ 4
- 0
examples/others/rlgl_standalone.c Просмотреть файл

@ -104,6 +104,10 @@ int main(void)
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
//glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
#if defined(__APPLE__)
glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE );
#endif
GLFWwindow *window = glfwCreateWindow(screenWidth, screenHeight, "rlgl standalone", NULL, NULL);

Загрузка…
Отмена
Сохранить