Commit 3d9eddf0 authored by Maire Nicolas's avatar Maire Nicolas

Suppression de la gestion de geometry shader dans l'appli stage_shader (les...

Suppression de la gestion de geometry shader dans l'appli stage_shader (les geometry shaders ne peuvent de toute façon pas être utilisés avec le clipping).
parent d7994bef
......@@ -95,35 +95,14 @@ void StageShader::button_compile()
{
QString st1 = dynamic_cast<Utils::QT::uiDockInterface*>(dockWidget())->vertexEdit->toPlainText();
QString st2 = dynamic_cast<Utils::QT::uiDockInterface*>(dockWidget())->fragmentEdit->toPlainText();
QString st3 = dynamic_cast<Utils::QT::uiDockInterface*>(dockWidget())->geometryEdit->toPlainText();
if (st1.toStdString().length() > 0)
m_shader->reloadVertexShaderFromMemory(st1.toStdString().c_str());
if (st2.toStdString().length() > 0)
m_shader->reloadFragmentShaderFromMemory(st2.toStdString().c_str());
if (st3.toStdString().length() > 0)
m_shader->reloadGeometryShaderFromMemory(st3.toStdString().c_str());
m_shader->reloadVertexShaderFromMemory(st1.toStdString().c_str());
m_shader->reloadFragmentShaderFromMemory(st2.toStdString().c_str());
m_shader->recompile();
updateGLMatrices();
}
/*******************************************************************************
* QT TRICK
*******************************************************************************/
void StageShader::dockWidget_topLevelChanged(bool isFloating)
{
if(isFloating)
{
dockWidget()->setWindowFlags(Qt::Window);
// setWindowFlags calls setParent() when changing the flags for a window, causing the widget to be hidden.
// You must call show() to make the widget visible again
dockWidget()->show();
}
}
/*******************************************************************************
* Init Functions
*******************************************************************************/
......@@ -166,13 +145,10 @@ void StageShader::initGUI()
setCallBack(dock.doubleSpinBox_ColorAttenuationFactor, SIGNAL(valueChanged(double)), SLOT(slot_doubleSpinBox_ColorAttenuationFactor(double)));
setCallBack(&dock, SIGNAL(topLevelChanged(bool)), SLOT(dockWidget_topLevelChanged(bool)));
setCallBack(dock.compileButton, SIGNAL(clicked()), SLOT(button_compile()) );
dock.vertexEdit->setPlainText(QString(m_shader->getVertexShaderSrc()));
dock.fragmentEdit->setPlainText(QString(m_shader->getFragmentShaderSrc()));
dock.geometryEdit->setPlainText(QString(m_shader->getGeometryShaderSrc()));
}
......
......@@ -123,8 +123,6 @@ public slots:
void slot_doubleSpinBox_ColorAttenuationFactor(double c);
void dockWidget_topLevelChanged(bool isFloating);
void button_compile();
};
......
......@@ -398,16 +398,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>Geometry</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_11">
<item row="0" column="0">
<widget class="QTextEdit" name="geometryEdit"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment