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

Dont create strip mapping as its not needed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8524 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2bd14e1d
......@@ -513,6 +513,7 @@ draw_faces(FaceMode _mode) {
}
} else {
std::cerr << "Draw Full per face buffer" << std::endl;
// We need per face attributes so we have to use seperate vertices per face
glDrawArrays(GL_TRIANGLES, 0, stripProcessor_.perFaceVertexBufferSize() );
......@@ -772,11 +773,12 @@ enable_arrays(unsigned int _arrays) {
// For this version we load the colors directly not from vbo
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glTexCoordPointer( stripProcessor_.perFacePerVertexTextureCoordBuffer() );
std::cerr << "Bound Texture Coordinate Array" << std::endl;
glEnableClientState(GL_TEXTURE_COORD_ARRAY );
}
} else if (enabled_arrays_ & PER_FACE_TEXCOORD_ARRAY) {
// Disable Texture Coordinate array
std::cerr << "UnBound Texture Coordinate Array" << std::endl;
enabled_arrays_ &= ~PER_FACE_TEXCOORD_ARRAY;
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
......
......@@ -816,7 +816,9 @@ updatePerFaceBuffers() {
perFaceTextureCoordArray_.clear();
textureRenderData_.clear();
textureRenderData_.reserve( strips_.size() );
if ( perFaceTextureIndexAvailable )
textureRenderData_.reserve( strips_.size() );
// Process all strips
for ( unsigned int i = 0 ; i < strips_.size() ; ++i ) {
......@@ -825,8 +827,6 @@ updatePerFaceBuffers() {
// Or store a simple strip info with texture 0
if ( perFaceTextureIndexAvailable() ) {
textureRenderData_.push_back( TextureRenderInfo(strips_[i].textureIndex , strips_[ i ].indexArray.size() -2 ,bufferIndex) );
} else {
textureRenderData_.push_back( TextureRenderInfo(0 , strips_[ i ].indexArray.size() -2 ,bufferIndex) ) ;
}
// The order of the vertices in the strip is alternating so we have to alter the directions as well
......@@ -866,7 +866,7 @@ updatePerFaceBuffers() {
for ( ; fhe_it ; ++fhe_it ) {
typename Mesh::VertexHandle cvh = mesh_.to_vertex_handle(fhe_it);
Vec2f texcoord = mesh_.property(perFaceTextureCoordinateProperty_,fhe_it);
std::cerr << "Added texcoord " << texcoord << std::endl;
if ( mesh_.vertex_handle( strips_[ i ].indexArray[ stripIndex - 2 ] ) == cvh ) {
perFaceTextureCoordArray_[ bufferIndex + 0 ] = texcoord;
......
Supports Markdown
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