reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofVboMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofMesh.h"
4#include "ofVbo.h"
5
6class ofVboMesh: public ofMesh{
7public:
8 using ofMesh::draw;
9 ofVboMesh();
10 ofVboMesh(const ofMesh & mom);
11 void operator=(const ofMesh & mom);
12 virtual ~ofVboMesh();
13 void setUsage(int usage);
14
15 void enableColors();
16 void enableTextures();
17 void enableNormals();
18 void enableIndices();
19
20 void disableColors();
21 void disableTextures();
22 void disableNormals();
23 void disableIndices();
24
25 virtual bool usingColors() const;
26 virtual bool usingTextures() const;
27 virtual bool usingNormals() const;
28 virtual bool usingIndices() const;
29
30 void draw(ofPolyRenderMode drawMode) const;
31 void drawInstanced(ofPolyRenderMode drawMode, int primCount) const;
32
33 ofVbo & getVbo();
34 const ofVbo & getVbo() const;
35
36private:
37 void updateVbo();
38 void unloadVbo();
39 ofVbo vbo;
40 int usage;
41 std::size_t vboNumVerts;
42 std::size_t vboNumIndices;
43 std::size_t vboNumNormals;
44 std::size_t vboNumTexCoords;
45 std::size_t vboNumColors;
46};
void draw() const
This draws the mesh using its primitive type, meaning that if you set them up to be triangles,...
Definition ofMesh.inl:951
Definition ofVbo.h:21
Definition ofVboMesh.h:6
virtual bool usingNormals() const
Definition ofVboMesh.cpp:88
void drawInstanced(ofPolyRenderMode drawMode, int primCount) const
Definition ofVboMesh.cpp:106
virtual bool usingTextures() const
Definition ofVboMesh.cpp:84
void enableIndices()
Enable mesh indices. Use disableIndices() to turn indices off. Indices are enabled by default when th...
Definition ofVboMesh.cpp:60
void disableNormals()
Disable mesh normals. Use enableNormals() to turn normals back on.
Definition ofVboMesh.cpp:72
void enableNormals()
Enable mesh normals. Use disableNormals() to turn normals off. Normals are enabled by default when th...
Definition ofVboMesh.cpp:56
void disableIndices()
Disable mesh indices. Use enableIndices() to turn indices back on.
Definition ofVboMesh.cpp:76
void enableTextures()
Enable mesh textures. Use disableTextures() to turn textures off. Textures are enabled by default whe...
Definition ofVboMesh.cpp:52
void disableColors()
Disable mesh colors. Use enableColors() to turn colors back on.
Definition ofVboMesh.cpp:64
void enableColors()
Enable mesh colors. Use disableColors() to turn colors off. Colors are enabled by default when they a...
Definition ofVboMesh.cpp:48
ofVbo & getVbo()
Definition ofVboMesh.cpp:96
void setUsage(int usage)
Definition ofVboMesh.cpp:44
void disableTextures()
Disable mesh textures. Use enableTextures() to turn textures back on.
Definition ofVboMesh.cpp:68
virtual ~ofVboMesh()
Definition ofVboMesh.cpp:38
void operator=(const ofMesh &mom)
Definition ofVboMesh.cpp:28
virtual bool usingColors() const
Definition ofVboMesh.cpp:80
ofVboMesh()
Definition ofVboMesh.cpp:8
virtual bool usingIndices() const
Definition ofVboMesh.cpp:92
ofPolyRenderMode
Definition ofGraphicsConstants.h:13