![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Core/GL/FixedFunctionPipeline.h>
Utility struct to build a VertexBuffer to be used with FixedFunctionPipeline in a type-safe fashion. More...
Utility struct to build a VertexBuffer to be used with FixedFunctionPipeline in a type-safe fashion.
You can either fill a VertexBuffer with the data using assign() or create a new one using createBuffer(). This interface also provides an implicit conversion to std::unique_ptr<VertexBuffer> to minimize code overhead.
Public Member Functions | |
| template<typename T> | |
| VertexData< PosT, TexCoordT, T > | useColors (const std::vector< T > &colors) const |
| Add per-vertex colors to the vertex data. | |
| template<typename T> | |
| VertexData< PosT, T, ColorT > | useTexCoords (const std::vector< T > &texCoords) const |
| Add per-vertex texture coordinates to the vertex data. | |
| void | assign (VertexBuffer &buffer) const |
| Assign the previously specified vertex data to the given buffer. | |
| std::unique_ptr< VertexBuffer > | createBuffer () const |
| Create a new GlVertexBuffer and fill it with the previously provided vertex data. | |
| operator std::unique_ptr< VertexBuffer > () const | |
| Implicit conversion to a std::unique_ptr<GL::VertexBuffer>. | |
Public Attributes | |
| const std::vector< PosT > * | m_vertices |
| Pointer to vertex position data, must not be 0. | |
| const std::vector< TexCoordT > * | m_texCoords |
| Pointer to vertex texture coordinate data, points to detail::emptyBuffer if not specified. | |
| const std::vector< ColorT > * | m_colors |
| Pointer to vertex color data, points to detail::emptyBuffer if not specified. | |
| VertexData< PosT, TexCoordT, T > ImFusion::GL::FixedFunctionPipeline::VertexData< PosT, TexCoordT, ColorT >::useColors | ( | const std::vector< T > & | colors | ) | const |
Add per-vertex colors to the vertex data.
The number of colors must match the number of vertex positions.
| VertexData< PosT, T, ColorT > ImFusion::GL::FixedFunctionPipeline::VertexData< PosT, TexCoordT, ColorT >::useTexCoords | ( | const std::vector< T > & | texCoords | ) | const |
Add per-vertex texture coordinates to the vertex data.
The number of colors must match the number of vertex positions.
| void ImFusion::GL::FixedFunctionPipeline::VertexData< PosT, TexCoordT, ColorT >::assign | ( | VertexBuffer & | buffer | ) | const |
Assign the previously specified vertex data to the given buffer.
| std::unique_ptr< VertexBuffer > ImFusion::GL::FixedFunctionPipeline::VertexData< PosT, TexCoordT, ColorT >::createBuffer | ( | ) | const |
Create a new GlVertexBuffer and fill it with the previously provided vertex data.