3#ifndef GDK_GFX_WEB1GLES2_MODEL_H
4#define GDK_GFX_WEB1GLES2_MODEL_H
7#include <gdk/webgl1es2_shader_program.h>
8#include <jfc/lazy_ptr.h>
9#include <jfc/unique_handle.h>
14#include <unordered_map>
57 static const jfc::lazy_ptr<gdk::webgl1es2_model>
Cube;
62 size_t buffer_handle_index;
67 GLsizei m_IndexCount = 0;
68 GLsizei m_VertexCount = 0;
70 std::optional<jfc::unique_handle<GLuint>> m_IndexBufferHandle;
71 std::vector<jfc::unique_handle<GLuint>> m_VertexBufferHandles;
73 GLenum m_PrimitiveMode;
75 std::unordered_map<std::string, attribute> m_Attributes;
vertex data stored in system memory.
Definition model_data.h:22
usage_hint
Definition model.h:12
webgl1es2_model(webgl1es2_model &&)=default
support move semantics
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 cal...
static const jfc::lazy_ptr< gdk::webgl1es2_model > Cube
a cube with format pos3uv2norm3
Definition webgl1es2_model.h:57
webgl1es2_model & operator=(const webgl1es2_model &other)=delete
disable copy semantics
void draw() const
invokes pipeline on the data. data must be bound
webgl1es2_model & operator=(webgl1es2_model &&)=default
support move semantics
GLushort index_data_type
type that must be used for index buffer data
Definition webgl1es2_model.h:28
GLfloat attribute_component_data_type
Definition webgl1es2_model.h:25
webgl1es2_model(const webgl1es2_model &)=delete
disable copy semantics
virtual void upload(const usage_hint &, const model_data &vertexDataView) override
replace current data in the vbo and ibo with new data
Specifies drawing behaviours at the two programmable stages in the OpenGL ES 2.0/WebGL 1....
Definition webgl1es2_shader_program.h:23