Commit 70944b09 authored by Jan Möbius's avatar Jan Möbius

Fixed VS2010 Build error

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9083 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8726327b
......@@ -805,7 +805,7 @@ void ViewControlPlugin::slotSetShader(){
if (shaderList_[index].uniformTypes[u] == "float" ){
shaderWidget_->uniforms->setCurrentCell(u,0);
float value = shaderWidget_->uniforms->currentItem()->text().toFloat();
shader->setUniform(shaderList_[index].uniforms[u].toStdString().c_str(), value);
shader->setUniform(shaderList_[index].uniforms[u].toUtf8(), value);
} else
//vec3 uniforms
if (shaderList_[index].uniformTypes[u] == "vec3" ){
......@@ -813,7 +813,7 @@ void ViewControlPlugin::slotSetShader(){
QStringList vecStr = shaderWidget_->uniforms->currentItem()->text().split(",");
if (vecStr.count() == 3){
ACG::Vec3f value( vecStr[0].toFloat(), vecStr[1].toFloat(), vecStr[2].toFloat() );
shader->setUniform(shaderList_[index].uniforms[u].toStdString().c_str(), value);
shader->setUniform(shaderList_[index].uniforms[u].toUtf8(), value);
}
}else
std::cerr << "Error: handling of uniformType '" << shaderList_[index].uniformTypes[u].toStdString() << "' not yet implemented" << std::endl;
......@@ -1015,14 +1015,14 @@ void ViewControlPlugin::setUniform(int _objID, ACG::SceneGraph::DrawModes::DrawM
//float uniforms
if (shaderList_[i].uniformTypes[u] == "float" )
shader->setUniform(shaderList_[i].uniforms[u].toStdString().c_str(), _value.toFloat() );
shader->setUniform(shaderList_[i].uniforms[u].toUtf8(), _value.toFloat() );
//vec3 uniforms
else if (shaderList_[i].uniformTypes[u] == "vec3" ){
QStringList vecStr = _value.split(",");
if (vecStr.count() == 3){
ACG::Vec3f value( vecStr[0].toFloat(), vecStr[1].toFloat(), vecStr[2].toFloat() );
shader->setUniform(shaderList_[i].uniforms[u].toStdString().c_str(), value);
shader->setUniform(shaderList_[i].uniforms[u].toUtf8(), value);
}
}else
std::cerr << "Error: handling of uniformType '" << shaderList_[i].uniformTypes[u].toStdString() << "' not yet implemented" << std::endl;
......
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