git-svn-id: svn://db.shs.com.ru/libs@663 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
#define GLMESH_H
|
||||
|
||||
#include <chunkstream.h>
|
||||
#include "glbuffer.h"
|
||||
#include "glshaders_types.h"
|
||||
#include "glvertexobject.h"
|
||||
|
||||
|
||||
class Mesh
|
||||
@@ -51,7 +50,7 @@ public:
|
||||
int verticesCount() const {return vertices_.size();}
|
||||
int trianglesCount() const {return triangles_.size();}
|
||||
int linesCount() const {return lines_.size();}
|
||||
bool isInit() const {return vao != 0;}
|
||||
bool isInit() const {return vao.isInit();}
|
||||
bool isEmpty() const {return vertices_.isEmpty();}
|
||||
uint hash() const;
|
||||
|
||||
@@ -76,14 +75,9 @@ public:
|
||||
|
||||
Box3D boundingBox() const;
|
||||
|
||||
static void prepareDrawGeom(QOpenGLExtraFunctions * f);
|
||||
static void prepareDrawObj (QOpenGLExtraFunctions * f);
|
||||
static void prepareDrawSel (QOpenGLExtraFunctions * f);
|
||||
|
||||
private:
|
||||
void calculateNormals();
|
||||
void calculateTangents();
|
||||
void loadBuffer(QOpenGLExtraFunctions * f, Buffer & buf, const void * data, int size);
|
||||
|
||||
QVector<QVector3D> vertices_, normals_, tangents_, bitangents_;
|
||||
QVector<QVector2D> texcoords_;
|
||||
@@ -91,8 +85,9 @@ private:
|
||||
QVector< Vector2i> lines_;
|
||||
|
||||
QVector<QGLEngineShaders::Vertex> data_;
|
||||
GLenum vao, geom_type;
|
||||
Buffer buffer_geom, buffer_ind, buffer_obj, buffer_sel;
|
||||
GLenum geom_type;
|
||||
Buffer buffer_geom, buffer_ind;
|
||||
VertexObject vao;
|
||||
mutable uint hash_;
|
||||
mutable bool hash_changed;
|
||||
int vert_count;
|
||||
|
||||
Reference in New Issue
Block a user