![]() |
gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
|
Vertex data representing a 3D graphical object. More...
#include <webgl1es2_model.h>
Public Types | |
using | attribute_component_data_type = GLfloat |
using | index_data_type = GLushort |
type that must be used for index buffer data | |
![]() | |
enum class | usage_hint { dynamic , streaming , upload_once } |
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 | |
void | draw () const |
invokes pipeline on the data. data must be bound | |
virtual void | upload (const usage_hint &, const model_data &vertexDataView) override |
replace current data in the vbo and ibo with new data | |
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 usage_hint &aUsage, const model_data &aData) | |
![]() | |
virtual | ~model ()=default |
upload a section of vertex data | |
Static Public Attributes | |
static const jfc::lazy_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)
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
|
overridevirtual |
replace current data in the vbo and ibo with new data
Implements gdk::model.