gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
gdk::webgl1es2_model Class Referencefinal

Vertex data representing a 3D graphical object. More...

#include <webgl1es2_model.h>

Inheritance diagram for gdk::webgl1es2_model:
gdk::model

Public Types

using attribute_component_data_type = GLfloat
 
using index_data_type = GLushort
 type that must be used for index buffer data
 
- Public Types inherited from gdk::model
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_modeloperator= (webgl1es2_model &&)=default
 support move semantics
 
 webgl1es2_model (webgl1es2_model &&)=default
 support move semantics
 
webgl1es2_modeloperator= (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)
 
- Public Member Functions inherited from gdk::model
virtual ~model ()=default
 upload a section of vertex data
 

Static Public Attributes

static const jfc::lazy_ptr< gdk::webgl1es2_modelCube
 a cube with format pos3uv2norm3
 

Detailed Description

Vertex data representing a 3D graphical object.

Member Typedef Documentation

◆ attribute_component_data_type

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)

Member Function Documentation

◆ bind()

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

◆ upload()

virtual void gdk::webgl1es2_model::upload ( const usage_hint & ,
const model_data & vertexDataView )
overridevirtual

replace current data in the vbo and ibo with new data

Implements gdk::model.


The documentation for this class was generated from the following file: