|
class | DrawObject |
| This class provides functionality for efficient, subsequent drawing of a mesh. The buffers of the mesh will be bound once this class is instantiated. More...
|
|
|
enum class | DrawMode {
NotSpecified = 0
, Points
, Lines
, LineStrip
,
LineLoop
, LinesAdjacency
, LineStripAdjacency
, Triangles
,
TriangleStrip
, TriangleFan
, TrianglesAdjacency
, TriangleStripAdjacency
,
NumberOfDrawModes
} |
|
|
| MeshDrawerGL (const Mesh *mesh) |
|
| MeshDrawerGL (const MeshDrawerGL &rhs)=default |
|
| MeshDrawerGL (MeshDrawerGL &&other)=default |
|
MeshDrawerGL & | operator= (const MeshDrawerGL &other)=default |
|
MeshDrawerGL & | operator= (MeshDrawerGL &&rhs)=default |
|
DrawObject | getDrawObject () const |
|
virtual void | draw () override |
| draws the mesh using its mesh info. If index buffers are present, the mesh will be rendered with glDrawElements() using those index buffers and the associated draw modes. Otherwise, the entire mesh is rendered using glDrawArrays with the default draw mode returned by Mesh::getDefaultMeshInfo().
|
|
virtual void | draw (DrawMode drawMode) |
| draws the mesh with the specified draw mode. If index buffers are present, the mesh will be rendered with glDrawElements() using those index buffers. Otherwise, the entire mesh is rendered using glDrawArrays.
|
|
virtual const Mesh * | getMesh () const override |
|
|
static DrawObject | getDrawObject (const Mesh *mesh) |
|
static DrawMode | getDrawMode (DrawType, ConnectivityType) |
|
static DrawMode | getDrawMode (Mesh::MeshInfo meshInfo) |
|
static GLenum | getGLDrawMode (DrawMode) |
|
static GLenum | getGLDrawMode (Mesh::MeshInfo meshInfo) |
|
◆ canDraw()
virtual bool inviwo::MeshDrawerGL::canDraw |
( |
const Mesh * | geom | ) |
const |
|
inlineoverrideprotectedvirtual |
Determine if the renderer can render geometry.
- Parameters
-
- Returns
- Return true if able to render the Geometry, otherwise false.
Implements inviwo::MeshDrawer.
◆ create()
virtual MeshDrawer * inviwo::MeshDrawerGL::create |
( |
const Mesh * | geom | ) |
const |
|
inlineoverrideprotectedvirtual |
Return a new object of the derived class.
- Note
- The MeshDrawer does not take ownership of the Geometry.
- Parameters
-
geom | The geometry to render. This will always be of a type that canDraw return true for. |
- Returns
- A new renderer.
Implements inviwo::MeshDrawer.
◆ draw() [1/2]
virtual void inviwo::MeshDrawerGL::draw |
( |
| ) |
|
|
overridevirtual |
draws the mesh using its mesh info. If index buffers are present, the mesh will be rendered with glDrawElements() using those index buffers and the associated draw modes. Otherwise, the entire mesh is rendered using glDrawArrays with the default draw mode returned by Mesh::getDefaultMeshInfo().
- See also
- Mesh, Mesh::MeshInfo
Implements inviwo::MeshDrawer.
◆ draw() [2/2]
virtual void inviwo::MeshDrawerGL::draw |
( |
DrawMode | drawMode | ) |
|
|
virtual |
draws the mesh with the specified draw mode. If index buffers are present, the mesh will be rendered with glDrawElements() using those index buffers. Otherwise, the entire mesh is rendered using glDrawArrays.
- See also
- Mesh, DrawMode
- Parameters
-
drawMode | draw mode used to render the mesh |
◆ getMesh()
virtual const Mesh * inviwo::MeshDrawerGL::getMesh |
( |
| ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: