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

Method populateOpenGLRenderers

Engine/Settings.cpp:397–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397void
398Settings::populateOpenGLRenderers(const std::list<OpenGLRendererInfo>& renderers)
399{
400 if ( renderers.empty() ) {
401 _availableOpenGLRenderers->setSecret(true);
402 _nOpenGLContexts->setSecret(true);
403 _enableOpenGL->setSecret(true);
404 return;
405 }
406
407 _nOpenGLContexts->setSecret(false);
408 _enableOpenGL->setSecret(false);
409
410 std::vector<ChoiceOption> entries( renderers.size() );
411 int i = 0;
412 for (std::list<OpenGLRendererInfo>::const_iterator it = renderers.begin(); it != renderers.end(); ++it, ++i) {
413 std::string option = it->vendorName + ' ' + it->rendererName + ' ' + it->glVersionString;
414 entries[i] = ChoiceOption(option);
415 }
416 _availableOpenGLRenderers->populateChoices(entries);
417 _availableOpenGLRenderers->setSecret(renderers.size() == 1);
418}
419
420bool
421Settings::isOpenGLRenderingEnabled() const

Callers 1

loadInternalMethod · 0.80

Calls 7

ChoiceOptionFunction · 0.85
emptyMethod · 0.80
populateChoicesMethod · 0.80
setSecretMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected