Skip to content
This repository was archived by the owner on Mar 2, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tango_gl/include/tango-gl/drawable_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class DrawableObject : public Transform {
const std::vector<GLushort>& indices);
void SetVertices(const std::vector<GLfloat>& vertices,
const std::vector<GLfloat>& normals);
void SetVertices(const std::vector<GLfloat>& vertices,
const std::vector<GLfloat>& normals,
const std::vector<GLushort>& indices);
virtual void Render(const glm::mat4& projection_mat,
const glm::mat4& view_mat) const = 0;

Expand Down
8 changes: 8 additions & 0 deletions tango_gl/src/drawable_object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,12 @@ void DrawableObject::SetVertices(const std::vector<GLfloat>& vertices,
vertices_ = vertices;
normals_ = normals;
}

void DrawableObject::SetVertices(const std::vector<GLfloat>& vertices,
const std::vector<GLfloat>& normals,
const std::vector<GLushort>& indices) {
vertices_ = vertices;
normals_ = normals;
indices_ = indices;
}
} // namespace tango_gl