Commit 1076fb58 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Merge branch 'master' of roosevelt.informatik.rwth-aachen.de:OpenFlipper-Free/OpenFlipper-Free

parents ecd0fd4c c226967f
......@@ -45,6 +45,8 @@ set BUILD_PLATFORM=VS2013
del *.exe
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
......@@ -58,6 +60,11 @@ run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
cd ..
cd Build
dir
......
......@@ -45,6 +45,8 @@ set BUILD_PLATFORM=VS2015
del *.exe
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
......@@ -58,6 +60,11 @@ run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
cd ..
cd Build
dir
......
......@@ -45,6 +45,8 @@ set BUILD_PLATFORM=VS2015
del *.exe
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
......@@ -58,6 +60,11 @@ run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
cd ..
cd Build
dir
......
#!/bin/bash
if [ ! -d build-release ]; then
mkdir build-release
fi
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=FALSE ../
make doc >> Doxygen-warning.log 2> Doxygen-error.log
# Copy to webserver
scp -r -P 2222 Build/share/OpenFlipper/Doc/DeveloperHTML/* hudson@web4-info8:OpenFlipper-Free-Daily/Doc/Free/Developer
scp -r -P 2222 Build/share/OpenFlipper/Doc/UserHTML/* hudson@web4-info8:OpenFlipper-Free-Daily/Doc/Free/User
......@@ -90,7 +90,7 @@ DrawMeshT<Mesh>::DrawMeshT(Mesh& _mesh)
invVertexMap_(0),
offsetPos_(0), offsetNormal_(20), offsetTexc_(12), offsetColor_(32),
textureIndexPropertyName_("Not Set"),
perFaceTextureCoordinatePropertyName_("Not Set"),
perFaceTextureCoordinatePropertyName_("h:texcoords2D"),
updateFullVBO_(true),
updatePerEdgeBuffers_(1),
updatePerHalfedgeBuffers_(1)
......
......@@ -162,6 +162,11 @@ void RenderObject::setupShaderGenFromDrawmode( const SceneGraph::DrawModes::Draw
if (_props->flatShaded())
shaderDesc.shadeMode = SG_SHADE_FLAT;
if (_props->normalSource() == SceneGraph::DrawModes::NORMAL_PER_FACE)
shaderDesc.vertexNormalInterpolator = "flat";
else
shaderDesc.vertexNormalInterpolator.clear();
if (_props->primitive() == SceneGraph::DrawModes::PRIMITIVE_WIREFRAME ||
_props->primitive() == SceneGraph::DrawModes::PRIMITIVE_HIDDENLINE ||
_props->primitive() == SceneGraph::DrawModes::PRIMITIVE_EDGE ||
......
......@@ -178,11 +178,10 @@ void ShaderGenerator::initVertexShaderIO(const ShaderGenDesc* _desc, const Defau
addInput("vec4", keywords.vs_inputColor);
if (_iodesc->passNormalVS_)
addOutput("vec3", keywords.vs_outputNormalVS);
addStringToList("vec3 " + keywords.vs_outputNormalVS, &outputs_, _desc->vertexNormalInterpolator + " out ", ";");
if (_iodesc->passNormalOS_)
addOutput("vec3", keywords.vs_outputNormalOS);
addStringToList("vec3 " + keywords.vs_outputNormalOS, &outputs_, _desc->vertexNormalInterpolator + " out ", ";");
// vertex color output
......
......@@ -170,6 +170,9 @@ public:
/// interpolation qualifier for input vertex colors: "flat", "smooth", "noperspective"
QString vertexColorsInterpolator;
/// interpolation qualifier for vertex shader normal outputs: "flat", "smooth", "noperspective"
QString vertexNormalInterpolator;
// color material for input vertex colors: GL_EMISSION, GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_AMBIENT_AND_DIFFUSE
// Usage of vertex colors in lighting function, as diffuse, emission, ambient color .. see glColorMaterial()
// default: GL_AMBIENT_AND_DIFFUSE
......@@ -309,6 +312,9 @@ public:
if (shaderMods != _rhs.shaderMods)
return false;
if (vertexNormalInterpolator != _rhs.vertexNormalInterpolator)
return false;
if (numLights)
return memcmp(lightTypes, _rhs.lightTypes, numLights * sizeof(ShaderGenLightType)) == 0;
......
......@@ -678,7 +678,7 @@ void initializeDefaultDrawModes( void )
SOLID_FACES_COLORED. setDrawModeProperties(DrawModeProperties(PRIMITIVE_POLYGON, LIGHTSTAGE_UNLIT, NORMAL_NONE, COLOR_PER_FACE));
SOLID_POINTS_COLORED. setDrawModeProperties(DrawModeProperties(PRIMITIVE_POLYGON, LIGHTSTAGE_UNLIT, NORMAL_NONE, COLOR_PER_VERTEX));
SOLID_POINTS_COLORED_SHADED.setDrawModeProperties(DrawModeProperties(PRIMITIVE_POLYGON, LIGHTSTAGE_SMOOTH, NORMAL_PER_FACE, COLOR_PER_VERTEX));
SOLID_POINTS_COLORED_SHADED.setDrawModeProperties(DrawModeProperties(PRIMITIVE_POLYGON, LIGHTSTAGE_SMOOTH, NORMAL_PER_VERTEX, COLOR_PER_VERTEX));
SOLID_ENV_MAPPED. setDrawModeProperties(DrawModeProperties(PRIMITIVE_POLYGON, LIGHTSTAGE_UNLIT, NORMAL_NONE, COLOR_NONE, TEXCOORD_PER_VERTEX, true));
......
......@@ -94,7 +94,6 @@ MeshNodeT(Mesh& _mesh,
updateAnyPicking_(true),
anyPickingBaseIndex_(0),
perFaceTextureIndexAvailable_(false),
perFaceTextureCoordsAvailable_(false),
textureMap_(0),
draw_with_offset_(false)
{
......@@ -162,6 +161,8 @@ availableDrawModes() const {
drawModes |= DrawModes::HALFEDGES_COLORED;
}
bool enableTexturedFaces = drawMesh_->perFaceTextureCoordinateAvailable() != 0;
if (mesh_.has_face_colors()) {
drawModes |= DrawModes::SOLID_FACES_COLORED;
......@@ -171,7 +172,7 @@ availableDrawModes() const {
if (mesh().has_vertex_normals()) {
drawModes |= DrawModes::SOLID_FACES_COLORED_SMOOTH_SHADED;
if (perFaceTextureCoordsAvailable_)
if (enableTexturedFaces)
drawModes |= DrawModes::SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED;
}
}
......@@ -183,7 +184,7 @@ availableDrawModes() const {
drawModes |= DrawModes::SOLID_TEXTURED_SHADED;
}
if ( perFaceTextureCoordsAvailable_ ) {
if ( enableTexturedFaces ) {
drawModes |= DrawModes::SOLID_2DTEXTURED_FACE;
if (mesh_.has_face_normals())
......@@ -772,6 +773,11 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
if (props->flatShaded())
ro.shaderDesc.shadeMode = SG_SHADE_FLAT;
if (props->normalSource() == DrawModes::NORMAL_PER_FACE)
ro.shaderDesc.vertexNormalInterpolator = "flat";
else
ro.shaderDesc.vertexNormalInterpolator.clear();
// handle 'special' primitives (wireframe, hiddenline, primitives in sysmem buffers)..
if (props->primitive() == DrawModes::PRIMITIVE_WIREFRAME)
......@@ -1674,10 +1680,7 @@ template<class Mesh>
void
MeshNodeT<Mesh>::
setHalfedgeTextcoordPropertyName( std::string _halfedgeTextcoordPropertyName ){
drawMesh_->setPerFaceTextureCoordinatePropertyName(_halfedgeTextcoordPropertyName);
perFaceTextureCoordsAvailable_ = drawMesh_->perFaceTextureCoordinateAvailable() != 0;
}
......
......@@ -497,9 +497,6 @@ private:
/// This flag indicates if we have a per Face texture index property
bool perFaceTextureIndexAvailable_;
/// This flag indicates if we have a per Face texture coordinate property
bool perFaceTextureCoordsAvailable_;
/// Mapping of mesh face texture indices to gltexture id ( has to be provided externally )
std::map< int, GLuint>* textureMap_;
......
OpenMesh @ 46c87795
Subproject commit 44c1de1bdc304985ae2b7847b7d5f72f7179398c
Subproject commit 46c877951bdc71339ff3b6b5aed7cda4851f4a28
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