hx3d
1
2D/3D Simple Game Framework
|
Base geometry. Must be inherited. More...
#include <base_geometry.hpp>
Public Member Functions | |
void | addAttribute (std::string name, Attribute attribute) |
Add an attribute. More... | |
void | setAttribute (std::string name, std::vector< float > values) |
Set an attribute with values. More... | |
AttributeArrayBuffer & | getAttribute (std::string name) |
Get an attribute array buffer. More... | |
void | setIndices (std::vector< GLushort > values) |
Set the indices. More... | |
IndexArrayBuffer & | getIndices () |
Get the index array buffer. More... | |
void | setFaceCulling (Culling culling) |
Set the culling type. More... | |
void | uploadAll () |
Upload all the buffers to the GPU. | |
virtual void | draw (Ptr< Shader > shader)=0 |
Draw the geometry. More... | |
Protected Attributes | |
std::map< std::string, AttributeArrayBuffer > | _attributes |
Attributes map. | |
IndexArrayBuffer | _indices |
Index array buffer. | |
Culling | _cullingType |
Current culling. | |
Base geometry. Must be inherited.
Definition at line 54 of file base_geometry.hpp.
void hx3d::graphics::geom::BaseGeometry::addAttribute | ( | std::string | name, |
Attribute | attribute | ||
) |
Add an attribute.
name | Name |
attribute | Attribute definition |
Definition at line 34 of file base_geometry.cpp.
AttributeArrayBuffer & hx3d::graphics::geom::BaseGeometry::getAttribute | ( | std::string | name | ) |
Get an attribute array buffer.
name | Name |
Definition at line 42 of file base_geometry.cpp.
IndexArrayBuffer & hx3d::graphics::geom::BaseGeometry::getIndices | ( | ) |
Get the index array buffer.
Definition at line 50 of file base_geometry.cpp.
void hx3d::graphics::geom::BaseGeometry::setAttribute | ( | std::string | name, |
std::vector< float > | values | ||
) |
Set an attribute with values.
name | Name |
values | Values |
Definition at line 38 of file base_geometry.cpp.
void hx3d::graphics::geom::BaseGeometry::setFaceCulling | ( | Culling | culling | ) |
Set the culling type.
culling | Culling type |
Definition at line 54 of file base_geometry.cpp.
void hx3d::graphics::geom::BaseGeometry::setIndices | ( | std::vector< GLushort > | values | ) |