49 #include "DeferredShading.hh"
56 QString DeferredShading::checkOpenGL() {
58 QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
59 if ( !flags.testFlag(QGLFormat::OpenGL_Version_3_2) )
60 return QString(
"Insufficient OpenGL Version! OpenGL 3.2 or higher required");
63 QString glExtensions = QString((
const char*)glGetString(GL_EXTENSIONS));
65 if ( !glExtensions.contains(
"GL_ARB_vertex_buffer_object") )
66 missing +=
"GL_ARB_vertex_buffer_object extension missing\n";
69 if ( !glExtensions.contains(
"GL_ARB_vertex_program") )
70 missing +=
"GL_ARB_vertex_program extension missing\n";
83 QMenu* menu =
new QMenu(
"DeferredShading Renderer Options");
86 QActionGroup* modeGroup =
new QActionGroup(
this );
87 modeGroup->setExclusive(
true );
89 QAction * action =
new QAction(
"0x MSAA" , modeGroup );
90 action->setCheckable(
true );
91 action->setChecked(
true);
93 action =
new QAction(
"2x MSAA" , modeGroup );
94 action->setCheckable(
true );
96 action =
new QAction(
"4x MSAA" , modeGroup );
97 action->setCheckable(
true );
99 action =
new QAction(
"8x MSAA" , modeGroup );
100 action->setCheckable(
true );
103 menu->addActions(modeGroup->actions());
105 connect(modeGroup,SIGNAL(triggered( QAction * )),
this,SLOT(slotMSAASelection( QAction * )));
107 return menu->menuAction();
QAction * optionsAction()
Return options menu.