![]() |
gdk-graphics
1b6d84e044c2c953fd7c9501e628a67e80f4da0d
|
Vertex data representing a 3D graphical object. More...
#include <webgl1es2_model.h>
Public Types | |
enum | Type { Type::Dynamic, Type::Static, Type::Stream } |
Hint to the graphics device about how the vertex data will be used. More... | |
enum | PrimitiveMode { PrimitiveMode::Points, PrimitiveMode::Lines, PrimitiveMode::LineStrip, PrimitiveMode::LineLoop, PrimitiveMode::Triangles, PrimitiveMode::TriangleStrip, PrimitiveMode::TriangleFan } |
Determines the primitive type used at the primitive assembly stage. More... | |
using | attribute_component_data_type = GLfloat |
using | index_data_type = GLushort |
type that must be used for index buffer data | |
![]() | |
enum | UsageHint { Static, Dynamic, Streaming } |
Public Member Functions | |
void | bind (const webgl1es2_shader_program &aShaderProgram) const |
strong association with draw. If draw is on this instance is not called after bind() has not been called before draw, the behaviour will be unintended More... | |
void | draw () const |
invokes pipeline on the data. data must be bound | |
virtual void | update_vertex_data (const UsageHint &, const vertex_data &vertexDataView) override |
replace current data in the vbo and ibo with new data | |
bool | operator== (const webgl1es2_model &) |
equality semantics based on handle values | |
bool | operator!= (const webgl1es2_model &) |
equality semantics based on handle values | |
webgl1es2_model & | operator= (webgl1es2_model &&)=default |
support move semantics | |
webgl1es2_model (webgl1es2_model &&)=default | |
support move semantics | |
webgl1es2_model & | operator= (const webgl1es2_model &other)=delete |
disable copy semantics | |
webgl1es2_model (const webgl1es2_model &)=delete | |
disable copy semantics | |
webgl1es2_model (const UsageHint &aUsage, const vertex_data &aData) | |
Static Public Attributes | |
static const jfc::shared_proxy_ptr< gdk::webgl1es2_model > | Quad |
a quad with format pos3uv2 | |
static const jfc::shared_proxy_ptr< gdk::webgl1es2_model > | Cube |
a cube with format pos3uv2norm3 | |
Vertex data representing a 3D graphical object.
using gdk::webgl1es2_model::attribute_component_data_type = GLfloat |
type that must be used to populate vertex data buffers. All GLES2 attrib types have a float based component type. (float, float vec2, float mat etc)
|
strong |
Determines the primitive type used at the primitive assembly stage.
|
strong |
Hint to the graphics device about how the vertex data will be used.
void gdk::webgl1es2_model::bind | ( | const webgl1es2_shader_program & | aShaderProgram | ) | const |
strong association with draw. If draw is on this instance is not called after bind() has not been called before draw, the behaviour will be unintended
Binds this vertex data to the pipeline, enables attributes on the currently used shaderprogram