Commit 83c366f9 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed bug in materialdialog

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5770 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b8bf6ef0
......@@ -112,8 +112,8 @@ QtMaterialDialog::QtMaterialDialog( QWidget * _parent,
ui_.backfaceCulling->setChecked( backfaceCulling_ );
ui_.alphaTest->setChecked( alphaTest_ );
ui_.alpha->setValue((int) alphaValue_ * 100.0f );
ui_.blending->setChecked( blending_ );
ui_.colorMaterial->setChecked( colorMaterial_ );
ui_.blending->setChecked( blending_ );
for (int i=0; i < ui_.blendParam1->count(); i++)
if ( ui_.blendParam1->itemText(i) == paramToStr(blendParam1_) )
......@@ -195,6 +195,8 @@ QtMaterialDialog::QtMaterialDialog( QWidget * _parent,
this, SLOT( changeActive(bool) ) );
connect( ui_.blendingActive, SIGNAL( toggled(bool) ),
this, SLOT( changeActive(bool) ) );
connect( ui_.backfaceCullingActive, SIGNAL( toggled(bool) ),
this, SLOT( changeActive(bool) ) );
connect( ui_.colorMaterialActive, SIGNAL( toggled(bool) ),
this, SLOT( changeActive(bool) ) );
......
......@@ -373,6 +373,10 @@
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" colspan="2" >
<widget class="QCheckBox" name="backfaceCulling" >
<property name="toolTip" >
<string>This checkbox controls if faces where only the
back is visible should be rendered.</string>
</property>
<property name="layoutDirection" >
<enum>Qt::LeftToRight</enum>
</property>
......
......@@ -169,10 +169,11 @@ void MaterialNode::enter(GLState& _state, unsigned int _drawmode )
{
backface_culling_backup_ = glIsEnabled(GL_CULL_FACE);
if (backface_culling_)
if ( backface_culling_ )
glEnable( GL_CULL_FACE );
else
glDisable( GL_CULL_FACE );
}
if ( ( applyProperties_ & ColorMaterial ) && ( (_drawmode & DrawModes::SOLID_FACES_COLORED_FLAT_SHADED) ||
......
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