Bläddra i källkod

core: Don't use GLFW_TRANSPARENT_FRAMEBUFFER with older GLFWs

PLATFORM_WEB is not the only platform that doesn't define
GLFW_TRANSPARENT_FRAMEBUFFER, it's also recent enough that it's not
included in the most recent GLFW 3.2.1 release, so this error can creep
up when using USE_EXTERNAL_GLFW.
pull/608/head
Ahmad Fatoum 6 år sedan
förälder
incheckning
4d209d45aa
Ingen känd nyckel hittad för denna signaturen i databasen GPG-nyckel ID: C3EAC3DE9321D59B
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. +3
    -3
      src/core.c

+ 3
- 3
src/core.c Visa fil

@ -1915,14 +1915,14 @@ static bool InitGraphicsDevice(int width, int height)
if (configFlags & FLAG_WINDOW_UNDECORATED) glfwWindowHint(GLFW_DECORATED, GL_FALSE); // Border and buttons on Window if (configFlags & FLAG_WINDOW_UNDECORATED) glfwWindowHint(GLFW_DECORATED, GL_FALSE); // Border and buttons on Window
else glfwWindowHint(GLFW_DECORATED, GL_TRUE); // Decorated window else glfwWindowHint(GLFW_DECORATED, GL_TRUE); // Decorated window
#if !defined(PLATFORM_WEB) // FLAG_WINDOW_TRANSPARENT not supported on HTML5
// FLAG_WINDOW_TRANSPARENT not supported on HTML5 and not included in any released GLFW version yet
#if defined(GLFW_TRANSPARENT_FRAMEBUFFER)
if (configFlags & FLAG_WINDOW_TRANSPARENT) glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); // Transparent framebuffer if (configFlags & FLAG_WINDOW_TRANSPARENT) glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); // Transparent framebuffer
else glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE); // Opaque framebuffer else glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE); // Opaque framebuffer
#endif #endif
if (configFlags & FLAG_MSAA_4X_HINT) glfwWindowHint(GLFW_SAMPLES, 4); // Tries to enable multisampling x4 (MSAA), default is 0 if (configFlags & FLAG_MSAA_4X_HINT) glfwWindowHint(GLFW_SAMPLES, 4); // Tries to enable multisampling x4 (MSAA), default is 0
// NOTE: When asking for an OpenGL context version, most drivers provide highest supported version // NOTE: When asking for an OpenGL context version, most drivers provide highest supported version
// with forward compatibility to older OpenGL versions. // with forward compatibility to older OpenGL versions.
// For example, if using OpenGL 1.1, driver can provide a 4.3 context forward compatible. // For example, if using OpenGL 1.1, driver can provide a 4.3 context forward compatible.

Laddar…
Avbryt
Spara