///initialize_game()
/*Define all things of creation*/
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_normal();
vertex_format_add_texcoord();
global.format_simple = vertex_format_end();
var buffer = buffer_load_obj("mushi_1.obj");
//global.cube = vertex_create_buffer_from_buffer(buffer,global.format_simple);
global.texture = sprite_add("texture.png",0,0,0,0,0);
global.cube = vertex_create_buffer();
vertex_begin(global.cube,global.format_simple);
vertex_position_3d(global.cube,-10,10,-10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,1,1);
vertex_position_3d(global.cube,10,10,-10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,1,1);
vertex_position_3d(global.cube,-10,10,10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,1,1);
vertex_position_3d(global.cube,-10,-10,-10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,0,0);
vertex_position_3d(global.cube,10,-10,-10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,0,0);
vertex_position_3d(global.cube,-10,-10,10);
vertex_normal(global.cube,0,1,0);
vertex_texcoord(global.cube,0,0);
vertex_end(global.cube);
vertex_freeze(global.cube);
global.system_camera = camera_create();
view_camera[0] = global.system_camera;
view_visible[0] = 1;
view_wport[0] = room_width;
view_hport[0] = room_height;
global.matrix_projection = matrix_build_projection_perspective_fov(45,room_width/room_height,0,3200);
global.matrix_lookat = matrix_build_lookat(0,200,40,0,0,0,0,1,0);
camera_set_proj_mat(global.system_camera,global.matrix_projection);
camera_set_view_mat(global.system_camera,global.matrix_lookat);
gpu_set_cullmode(cull_noculling);
gpu_set_ztestenable(false);
gpu_set_zwriteenable(true);
gpu_set_zfunc(cmpfunc_greaterequal);
layer_create(0,"system");
instance_create_layer(0,0,"system",system_engine);