anthony.liot Posted January 24, 2013 Share Posted January 24, 2013 Hi, I want to use engine.splash.renderSplash(x) inside updated function with yield. Like : engine.splash.renderSplash(50); Yield 1; engine.splash.renderSplash(100); Yield 1; I init the splash In the init function. But it seems doesńt work. It´s possible to do what i want ? Link to comment
frustum Posted January 25, 2013 Share Posted January 25, 2013 engine.splash.setEnabled(1); engine.splash.renderSplash(0); yield 1; engine.splash.renderSplash(50); yield 1; engine.splash.renderSplash(100); yield 1; engine.splash.setEnabled(0); Link to comment
anthony.liot Posted January 25, 2013 Author Share Posted January 25, 2013 It's exactly why i try but unfortunetaly the script execution seems stop after the first yield. May be it's because i m in webgl but not sure. My Unigine.cpp int init() { engine.splash.setSplash("demos/crypt/splashes/world_16x9.png"); systemInit(); stereoInit(0.07f,2.0f); wallInit(60.0f,20.0f); return 1; } /* */ int update() { engine.splash.setEnabled(1); engine.splash.renderSplash(0); engine.materials.load("core/materials/simple/unigine_render.mat"); yield 1; engine.splash.renderSplash(10); engine.materials.load("core/materials/simple/unigine_mesh.mat"); yield 1; engine.splash.renderSplash(20); engine.materials.load("core/materials/simple/unigine_particles.mat"); yield 1; engine.splash.renderSplash(40); engine.materials.load("demos/crypt/crypt.mat"); yield 1; engine.splash.renderSplash(60); engine.properties.load("core/properties/unigine.prop"); yield 1; engine.splash.renderSplash(80); engine.console.run("world_load crypt"); yield 1; engine.splash.renderSplash(100); engine.splash.setEnabled(0); yield 1; systemUpdate(); stereoUpdate(); return 1; } My console log : ..... ---- Interpreter ---- Version: 2.51 Unigine~# show_fps 0 && render_manager_load_textures 1 && render_manager_load_meshes 1 && physics_threaded 0 && pathfind_threaded 0 && render_glow 0 && render_shaders 2 && render_textures 2 && render_parallax 1 && render_deferred 0 && render_force_no_shadows 1 && render_skip_post_materials 1 && render_skip_deferred 1 && render_skip_opacity_ambient 0 && render_skip_opacity_light 0 && render_skip_transparent_ambient 0 && render_skip_transparent_light 0 && render_use_environment 0 && render_use_normalization 0 && render_restart Loading "demos/crypt/unigine.cpp" 1090ms Loading "core/locale/unigine.en" dictionary Loading "Engine" 3090ms Loading "core/materials/simple/unigine_render.mat" 17 materials 116 shaders 67ms Link to comment
Recommended Posts