#pragma once
#include "vg/vg_io.h"
+
+#ifndef C0_STOPGAP
#include "vg/vg_async.h"
#include "vg/vg_tex.h"
+#endif
#include "vg/vg_msg.h"
#include "vg/vg_string.h"
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "model.h"
-#include "render.h"
+#include "shader_props.h"
static void mdl_load_fatal_corrupt( mdl_context *mdl )
{
if( arr->item_count )
{
u32 size = stride*arr->item_count;
- ptr->data = vg_linear_alloc( lin_alloc, vg_align8(size) );
+ ptr->data = lin_alloc? vg_linear_alloc( lin_alloc, vg_align8(size) ):
+ malloc( size );
mdl_load_array_file_buffer( mdl, arr, ptr->data, stride );
}
else
mdl_array_ptr data;
_mdl_load_array( mdl, &data, "shader_data", vg_mem.scratch, 1 );
+ if( !lin_alloc )
+ return 1;
+
for( u32 i=0; i<mdl_arrcount(&mdl->materials); i ++ )
{
mdl_material *mat = mdl_arritm( &mdl->materials, i );
* ----------------------------------------------------------------------------
*/
+#ifndef C0_STOPGAP
static void mesh_upload( glmesh *mesh,
mdl_vert *verts, u32 vert_count,
u32 *indices, u32 indice_count )
{
mesh_drawn( sm->indice_start, sm->indice_count );
}
+#endif
mdl_mesh *mdl_find_mesh( mdl_context *mdl, const char *name )
{
return mdl_arritm( &mdl->submeshs, mesh->submesh_start );
}
+#ifndef C0_STOPGAP
struct payload_glmesh_load
{
mdl_vert *verts;
VG_TEX2D_CLAMP|VG_TEX2D_NEAREST, &tex->glname );
}
}
+#endif