|
|
|
|
@ -7,14 +7,14 @@
|
|
|
|
|
bool |
|
|
|
|
loadScene(RenderState* rs) |
|
|
|
|
{ |
|
|
|
|
// TODO: come up with an easy to use interface for loading a model, setting
|
|
|
|
|
// up the buffer to attrib mappings, and initializing a render group
|
|
|
|
|
|
|
|
|
|
// NOTE: load model
|
|
|
|
|
model* tex_cube = getModelByPath(&rs->assets, "../data/textured_cube.gltf"); |
|
|
|
|
if (!tex_cube) return false; |
|
|
|
|
|
|
|
|
|
// NOTE: load new shader, or get one of the defaults
|
|
|
|
|
// NOTE: the default shaders already have their attribute mappings created
|
|
|
|
|
// in initRenderState, but if you use a custom shader, you will need to
|
|
|
|
|
// create a GLBufferToAttribMapping manually
|
|
|
|
|
shader_program* s_default = getShaderByName("default", rs->gl_ctx); |
|
|
|
|
if (!s_default) return false; |
|
|
|
|
|
|
|
|
|
|