Object that contains and can render mesh data.
More...
#include <JMGraphics.h>
|
|
| Mesh (JMGraphics *Parent) |
|
void | display () |
| | Renders the mesh using the parent graphics object.
|
| void | process () |
|
JMGraphics::Mesh * | clone () const |
|
| Mesh (const Mesh &)=delete |
|
Mesh & | operator= (const Mesh &)=delete |
|
| Mesh (Mesh &&)=default |
|
Mesh & | operator= (Mesh &&)=default |
|
void | writeData (std::ostream &stream) |
| | Writes all vertex and index data to a stream. Stream must be set up correctly for binary writing.
|
|
void | readData (std::istream &stream) |
| | Reads all vertex and index data from a stream.
|
|
|
static void | readData (std::istream &stream, std::vector< JMGraphics::Mesh::Vertex > &verts, std::vector< unsigned int > &indices) |
| | Reads all vertex and index data from a stream and stores them in the given vectors.
|
|
|
std::vector< Vertex > | vertices |
|
std::vector< unsigned int > | indices |
|
std::vector< Texture > | textures |
|
std::string | name = "Mesh" |
|
glm::vec4 | wireframeColor = glm::vec4(0.0f, 0.3f, 1.0f, 1.0f) |
|
JMGraphics * | parent = nullptr |
|
bool | renderWireframe = false |
|
bool | renderFaces = true |
|
bool | reProcess = false |
Object that contains and can render mesh data.
◆ process()
| void JMGraphics::Mesh::process |
( |
| ) |
|
Sends the mesh data to the gpu. Must call this after manualy modifying verts if you want it to render correctly. Only call when the parent context or a shared context is current. If not, set the reProcess flag to true and the mesh will be processed the next time display is called.
The documentation for this class was generated from the following file: