|
@@ -1884,31 +1884,28 @@ static bool InitGraphicsDevice(int width, int height)
|
|
|
displayHeight = screenHeight;
|
|
|
#endif // defined(PLATFORM_WEB)
|
|
|
|
|
|
- glfwDefaultWindowHints(); // Set default windows hints
|
|
|
+ glfwDefaultWindowHints(); // Set default windows hints:
|
|
|
+ //glfwWindowHint(GLFW_RED_BITS, 8); // Framebuffer red color component bits
|
|
|
+ //glfwWindowHint(GLFW_GREEN_BITS, 8); // Framebuffer green color component bits
|
|
|
+ //glfwWindowHint(GLFW_BLUE_BITS, 8); // Framebuffer blue color component bits
|
|
|
+ //glfwWindowHint(GLFW_ALPHA_BITS, 8); // Framebuffer alpha color component bits
|
|
|
+ //glfwWindowHint(GLFW_DEPTH_BITS, 24); // Depthbuffer bits
|
|
|
+ //glfwWindowHint(GLFW_REFRESH_RATE, 0); // Refresh rate for fullscreen window
|
|
|
+ //glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API); // OpenGL API to use. Alternative: GLFW_OPENGL_ES_API
|
|
|
+ //glfwWindowHint(GLFW_AUX_BUFFERS, 0); // Number of auxiliar buffers
|
|
|
|
|
|
// Check some Window creation flags
|
|
|
- if (configFlags & FLAG_WINDOW_RESIZABLE) glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); // Resizable window
|
|
|
+ if (configFlags & FLAG_WINDOW_RESIZABLE) glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); // Resizable window
|
|
|
else glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Avoid window being resizable
|
|
|
|
|
|
- if (configFlags & FLAG_WINDOW_DECORATED) glfwWindowHint(GLFW_DECORATED, GL_TRUE); // 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
|
|
|
|
|
|
- if (configFlags & FLAG_WINDOW_TRANSPARENT)
|
|
|
- {
|
|
|
- // TODO: Enable transparent window (not ready yet on GLFW 3.2)
|
|
|
- }
|
|
|
+ if (configFlags & FLAG_WINDOW_TRANSPARENT) glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); // Transparent framebuffer
|
|
|
+ else glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE); // Opaque framebuffer
|
|
|
|
|
|
- if (configFlags & FLAG_MSAA_4X_HINT)
|
|
|
- {
|
|
|
- glfwWindowHint(GLFW_SAMPLES, 4); // Enables multisampling x4 (MSAA), default is 0
|
|
|
- TraceLog(LOG_INFO, "Trying to enable MSAA x4");
|
|
|
- }
|
|
|
+ if (configFlags & FLAG_MSAA_4X_HINT) glfwWindowHint(GLFW_SAMPLES, 4); // Tries to enable multisampling x4 (MSAA), default is 0
|
|
|
|
|
|
- //glfwWindowHint(GLFW_RED_BITS, 8); // Framebuffer red color component bits
|
|
|
- //glfwWindowHint(GLFW_DEPTH_BITS, 16); // Depthbuffer bits (24 by default)
|
|
|
- //glfwWindowHint(GLFW_REFRESH_RATE, 0); // Refresh rate for fullscreen window
|
|
|
- //glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API); // Default OpenGL API to use. Alternative: GLFW_OPENGL_ES_API
|
|
|
- //glfwWindowHint(GLFW_AUX_BUFFERS, 0); // Number of auxiliar buffers
|
|
|
-
|
|
|
// NOTE: When asking for an OpenGL context version, most drivers provide highest supported version
|
|
|
// with forward compatibility to older OpenGL versions.
|
|
|
// For example, if using OpenGL 1.1, driver can provide a 4.3 context forward compatible.
|
|
@@ -1926,11 +1923,11 @@ static bool InitGraphicsDevice(int width, int height)
|
|
|
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Profiles Hint: Only 3.3 and above!
|
|
|
// Other values: GLFW_OPENGL_ANY_PROFILE, GLFW_OPENGL_COMPAT_PROFILE
|
|
|
#if defined(__APPLE__)
|
|
|
- glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // OSX Requires
|
|
|
+ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // OSX Requires fordward compatibility
|
|
|
#else
|
|
|
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE); // Fordward Compatibility Hint: Only 3.3 and above!
|
|
|
#endif
|
|
|
- //glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
|
|
|
+ //glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); // Request OpenGL DEBUG context
|
|
|
}
|
|
|
|
|
|
if (fullscreen)
|