Repository navigation
Commit 666b730
authored
Desktop OpenGL 4.6: fall back to the newest available version (Windows / Linux) (#8580)
* Desktop OpenGL 4.6: fall back to the newest available version
Requesting a GL version the driver can't create (e.g. 4.6 on a driver
that tops out at 4.5, Mesa llvmpipe, or macOS's 4.1) made
glfwCreateWindow fail and the app exit with "couldn't create GLFW
window".
ofAppGLFWWindow now retries 4.6 -> 4.5 -> ... -> 3.2 (only versions below
the request) and logs a warning with the version it used. The window
settings are updated, so ofGLProgrammableRenderer is set up with the
context's real version and shaders get the matching #version (e.g. 450
instead of 460). GLFW errors from the retries are silenced; the first
failure is still logged.
Requests the driver can satisfy are unchanged.
* Only report the GLFW context error if no fallback version works1 parent 6fe7474 commit 666b730
1 file changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
239 | 279 | | |
240 | 280 | | |
241 | 281 | | |
| |||
252 | 292 | | |
253 | 293 | | |
254 | 294 | | |
255 | | - | |
| 295 | + | |
256 | 296 | | |
257 | 297 | | |
258 | 298 | | |
259 | 299 | | |
260 | 300 | | |
261 | | - | |
| 301 | + | |
262 | 302 | | |
263 | 303 | | |
264 | 304 | | |
| |||
0 commit comments