Resource Creation - Goutch/HellbenderEngine GitHub Wiki

In Hellbender, all graphics resources are created via de Resources class.

To create a Mesh, use the following code:

	VertexAttributeInfo binding_infos = VertexAttributeInfo{}; 
	binding_infos.size = sizeof(vec3) + sizeof(vec2);//interleaved position + uvs
	binding_infos.binding = 0;
	binding_infos.flags = VERTEX_ATTRIBUTE_FLAG_NONE;

	MeshInfo mesh_info{};
	mesh_info.attribute_infos = &binding_infos;
	mesh_info.attribute_info_count= 1;
	mesh_info.flags = MESH_FLAG_NONE;
	
        Mesh* mesh = Resources::createMesh(mesh_info);