/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Init OSLib: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int initOSLib(){ oslInit(0); oslInitGfx(OSL_PF_8888, 1); //16M Colors //oslInitGfx(OSL_PF_5650, 1); //65K Colors oslInitAudio(); oslSetQuitOnLoadFailure(1); oslSetKeyAutorepeatInit(40); oslSetKeyAutorepeatInterval(10); oslSetFrameskip(1); oslSetMaxFrameskip(4); return 0; }
/* call-seq: frameskip(min, max) Sets how many frames can be skipped. By default, your program is running at 60 FPS. */ VALUE Graphics_frameskip(VALUE self, VALUE min, VALUE max) { oslSetFrameskip(FIX2INT(min)); oslSetMaxFrameskip(FIX2INT(max)); return Qnil; }