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

Hopefully final switch to drawmsh

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11717 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9df1e6ec
This diff is collapsed.
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#include "BaseNode.hh" #include "BaseNode.hh"
#include <vector> #include <vector>
#include <ACG/Scenegraph/StripProcessorT.hh> #include <ACG/GL/DrawMesh.hh>
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
...@@ -159,13 +159,7 @@ public: ...@@ -159,13 +159,7 @@ public:
// void update_strips(); // void update_strips();
private: private:
StripProcessorT<Mesh> stripProcessor_; DrawMeshT<Mesh>* drawMesh_;
std::vector<unsigned int> tris_; // tri list
std::vector<unsigned int> vertRemap_; // vertex remapping
GLuint indexBuffer_;
bool indexBufferInitialized_;
/** @} */ /** @} */
...@@ -192,24 +186,6 @@ private: ...@@ -192,24 +186,6 @@ private:
/** @} */ /** @} */
//===========================================================================
/** @name Vertex Buffer
* @{ */
//===========================================================================
private:
/// Vertex buffer
GLuint vertexBuffer_;
/// Vertex buffer initialization flag
bool vertexBufferInitialized_;
/// Internal buffer used when rendering non float vertex coordinates
std::vector< ACG::Vec3f > vertices_;
/** @} */
//=========================================================================== //===========================================================================
/** @name Normal Buffer /** @name Normal Buffer
* @{ */ * @{ */
...@@ -226,15 +202,6 @@ private: ...@@ -226,15 +202,6 @@ private:
/// Flag if normals should be used /// Flag if normals should be used
bool enableNormals_; bool enableNormals_;
/// Normal buffer
GLuint normalVertexBuffer_;
/// normal buffer initialization flag
bool normalVertexBufferInitialized_;
/// Internal buffer used when rendering non float normals
std::vector< ACG::Vec3f > normals_;
/** @} */ /** @} */
...@@ -252,49 +219,9 @@ public: ...@@ -252,49 +219,9 @@ public:
private: private:
bool enableColors_; bool enableColors_;
/// color buffer
GLuint colorVertexbuffer_;
/// normal buffer initialization flag
bool colorVertexBufferInitialized_;
/// Internal buffer used when rendering non Vec4f colors
std::vector< ACG::Vec4f > colors_;
/** @} */ /** @} */
//===========================================================================
/** @name Texcoord buffer
* @{ */
//===========================================================================
public:
/// Returns if the per vertex Texture coordinates array is currently activated
bool texCoordEnabled() { return enableTexCoords_; };
/// Enable or disable the use of the per vertex Texture coordinates array
void enableTexCoords(bool _enable) { enableTexCoords_ = _enable; };
private:
bool enableTexCoords_;
/** @} */
//===========================================================================
/** @name Line buffer
* @{ */
//===========================================================================
private:
/// Vector storing vertices for rendering all edges in the mesh
std::vector< unsigned int > lineIndices_;
/// Index buffer for lines
GLuint lineIndexBuffer_;
/// lineIndexBuffer initialization flag
bool lineIndexBufferInitialized_;
//=========================================================================== //===========================================================================
/** @name Array control functions /** @name Array control functions
* @{ */ * @{ */
...@@ -315,20 +242,10 @@ private: ...@@ -315,20 +242,10 @@ private:
enum ArrayType enum ArrayType
{ {
NONE = 0, NONE = 0,
VERTEX_ARRAY = 1, PER_EDGE_VERTEX_ARRAY = 1,
NORMAL_VERTEX_ARRAY = 2, PER_EDGE_COLOR_ARRAY = 2,
COLOR_VERTEX_ARRAY = 4, PER_HALFEDGE_VERTEX_ARRAY = 4,
TEXCOORD_VERTEX_ARRAY = 8, PER_HALFEDGE_COLOR_ARRAY = 8
LINE_INDEX_ARRAY = 16,
PER_EDGE_VERTEX_ARRAY = 32,
PER_EDGE_COLOR_ARRAY = 64,
PER_FACE_VERTEX_ARRAY = 128,
PER_FACE_NORMAL_ARRAY = 256,
PER_FACE_PER_VERTEX_NORMAL_ARRAY = 512,
PER_FACE_COLOR_ARRAY = 1024,
PER_FACE_TEXCOORD_ARRAY = 2048,
PER_HALFEDGE_VERTEX_ARRAY = 4096,
PER_HALFEDGE_COLOR_ARRAY = 8192
}; };
/// which arrays are currently enabled? /// which arrays are currently enabled?
...@@ -354,8 +271,6 @@ public: ...@@ -354,8 +271,6 @@ public:
ACG::SceneGraph::DrawModes::DrawMode availableDrawModes() const; ACG::SceneGraph::DrawModes::DrawMode availableDrawModes() const;
private: private:
// types
enum FaceMode { PER_VERTEX, PER_FACE };
/** \brief draws all vertices of the mesh /** \brief draws all vertices of the mesh
* *
...@@ -376,7 +291,7 @@ private: ...@@ -376,7 +291,7 @@ private:
/** \brief draws all faces of the mesh /** \brief draws all faces of the mesh
* *
*/ */
void draw_faces(FaceMode _mode); void draw_faces();
private: private:
......
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