Comments (7)
It's a side-effect of a workaround for the fact that some drivers don't set the debug bit of the context flags even when a debug context was created. The workaround checks for GL_ARB_debug_output
if the bit isn't set, as that is the only way to tell on those drivers whether a debug context has been created.
I'll see if I can make a better workaround.
from glfw.
Ah.. now it's clear, thanks. Fine, I was only worried about the possible performance penalty of a debug context.
from glfw.
Since you (and therefore GLFW) aren't requesting a debug context, there shouldn't be any penalty. It seems your driver is nice and giving you the option of debug output anyway.
from glfw.
I think you're right. With glfw 2.7.9 and debug context disabled, it's sufficient calling glEnable(GL_DEBUG_OUTPUT) to have all the functionality...
from glfw.
I think the code should be modified to reflect the requested window hint:
So in my opinion, this piece of code (in context.c):
// HACK: This is a workaround for older drivers (pre KHR_debug)
// not setting the debug bit in the context flags for debug
// contexts
window->glDebug = GL_TRUE;
Should be changed to something like this:
window->glDebug = <the value of the GLFW_OPENGL_DEBUG_CONTEXT hint>;
This way, GLFW doesn't report "unexpected" debug contexts. If a developer wants to check for the presence of the extension, that's up to him/her then.
Alternative, only check for the GL_ARB_debug_output extension if the window hint has been set to GL_TRUE.
from glfw.
@georgevanvenrooij The last option was my plan, but apparently I forgot to implement it. I'll fix it in 3.1. Thank you for the reminder.
from glfw.
@georgevanvenrooij Fixed with ae8393c. Thank you!
from glfw.
Related Issues (20)
- glfwCreateWindow reportedly can produce GLFW_NO_WINDOW_CONTEXT but isn't documented to HOT 2
- Multi-monitor resizing window from left or top and then maximizing causes window to maximise to incorrect locations
- different pkgconfig files for static and shared HOT 3
- glfwSetWindowContentScaleCallback does not trigger when you snap to resize on a different DPI Monitor
- Bumblebee/Primusrun does not work on GLFW 3.3.9 HOT 3
- Cursor position cannot be set on some virtual machines, breaking glfwSetCursorPos and GLFW_CURSOR_DISABLED input mode
- Double regfree bug HOT 1
- Remove support for Visual Studio 2012 and earlier
- 3.3.9 Context Creation WGL Error - Windows 11 on Parallels for Mac VM HOT 2
- OpenCL Interoperability HOT 2
- glfwPollEvents() is very slow on Raspberry Pi Zero 2W HOT 6
- Please merge this PR [# 2130] to add IME support for each platform HOT 1
- [feature / suggestion] glfwSetMonitorCallback triggering on arrange displays change
- GLFW 3.3.x MacOS Crashes with Ogre3D 14 and CEF Off Screen Renderer HOT 1
- How to get 1:1 ratio of window size to frame buffer size? HOT 2
- `glfwGetWindowContentScale` can't detect the display scale factor change at runtime.
- [suggestion] glfwGetWindowRect & glfwGetMonitorRect to get position and dimensions at once HOT 1
- Keyboard Non-US Slash Bar key inconsistent across platforms HOT 1
- Issues with gamepad support HOT 1
- Error when mouse is over window corner on macOS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glfw.