MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / analyzeContextWGL

Method analyzeContextWGL

Engine/OSGLContext_win.cpp:443–521  ·  view source on GitHub ↗

Analyzes the specified context for possible recreation

Source from the content-addressed store, hash-verified

441// Analyzes the specified context for possible recreation
442//
443bool
444OSGLContext_win::analyzeContextWGL(const FramebufferConfig& pixelFormatAttrs,
445 int major,
446 int minor)
447{
448 bool required = false;
449 OSGLContext_wgl_data* wglInfo = const_cast<OSGLContext_wgl_data*>( appPTR->getWGLData() );
450
451 assert(wglInfo);
452
453 makeContextCurrent(this);
454 if ( !loadWGLExtensions(wglInfo) ) {
455 return false;
456 }
457
458
459/*
460 if (ctxconfig->forward)
461 {
462 if (!_glfw.wgl.ARB_create_context)
463 {
464 _glfwInputError(GLFW_VERSION_UNAVAILABLE,
465 "WGL: A forward compatible OpenGL context requested but WGL_ARB_create_context is unavailable");
466 return _GLFW_RECREATION_IMPOSSIBLE;
467 }
468
469 required = GLFW_TRUE;
470 }
471
472 if (ctxconfig->profile)
473 {
474 if (!_glfw.wgl.ARB_create_context_profile)
475 {
476 _glfwInputError(GLFW_VERSION_UNAVAILABLE,
477 "WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable");
478 return _GLFW_RECREATION_IMPOSSIBLE;
479 }
480
481 required = GLFW_TRUE;
482 }
483
484 if (ctxconfig->release)
485 {
486 if (_glfw.wgl.ARB_context_flush_control)
487 required = GLFW_TRUE;
488 }
489 */
490
491
492 if ( (major != 1) || (minor != 0) ) {
493 if (wglInfo->ARB_create_context) {
494 required = true;
495 }
496 }
497
498 /*if (ctxconfig->debug)
499 {
500 if (_glfw.wgl.ARB_create_context)

Callers

nothing calls this directly

Calls 1

getWGLDataMethod · 0.80

Tested by

no test coverage detected