Commit 9841546e authored by Christopher Tenter's avatar Christopher Tenter
Browse files

set default property name for halfedge texcoords

parent 019c1ebd
......@@ -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)
......
......@@ -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())
......@@ -1674,10 +1675,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_;
......
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