projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clear color works
[demo]
/
src
/
mesh.h
diff --git
a/src/mesh.h
b/src/mesh.h
index
36a79cd
..
84cbbcb
100644
(file)
--- a/
src/mesh.h
+++ b/
src/mesh.h
@@
-15,21
+15,25
@@
enum {
};
class Mesh {
};
class Mesh {
-private:
- // call before draw in gl
- virtual void update_vertex_data() = 0;
+protected:
+ bool vdata_valid;
+
public:
std::vector<uint16_t> indices;
std::vector<Vec3> vertices;
std::vector<Vec3> normals;
public:
std::vector<uint16_t> indices;
std::vector<Vec3> vertices;
std::vector<Vec3> normals;
- std::vector<Vec3> tangents;
std::vector<Vec2> tex_coords;
std::vector<Vec2> tex_coords;
- std::string name;
- unsigned int which_mask;
+ std::string name;
Mesh();
virtual ~Mesh() = 0;
Mesh();
virtual ~Mesh() = 0;
+
+ virtual void draw() const = 0;
+ virtual void draw_normals(float scale) const = 0;
+ virtual void update_vertex_data() = 0;
+ virtual void transform(const Mat4 &mat);
+ virtual void invalidate();
};
#endif // MESH_H_
\ No newline at end of file
};
#endif // MESH_H_
\ No newline at end of file