Class: system

system information and settings

Methods:

Method overview:


autoscreenshot ([boolean],[boolean tga])
returns: ([boolean])
makes a screenshot at end of every frame.
currenttime ()
returns: (float seconds)
returns time
drivelabel (string drive)
returns: ([string name])
returns drivelabel or nil if not succesful
drivelist ()
returns: (string drive, ...)
returns available drives on windows
drivesizes (string drive)
returns: ([float freetocaller,totalbytes,freebytes])
returns information on drive sizes or nil if not succesful
drivetype (string drive)
returns: (string type)
returns type for given drive. A trailing backslash is required. Returns either 'unkown', 'removable', 'norootdir', 'fixed', 'cdrom', 'ramdisk' or 'remote' (network)
exit ()
returns: ()
closes application
getmillis ()
returns: (float millis)
returns time in milliseconds, time is taken from motherboard high precision timer. Useful for profiling
maxfps ([int])
returns: ([int])
gets or sets if fps of the app should be capped, 0 is uncapped, minimum will be 15.
nosound ([boolean])
returns: ([boolean])
sets/gets if sound is disabled. Affects system only during startup.
osinfo ()
returns: (string)
returns information about OS
processframe ([float timediff])
returns: ()
allows manuall processing of frames. timediff is in milliseconds, if not passed we will compute from the last time this function was called. this will run all internal thinks except the lua think. You should never start this unless you want to do frame processing from this time on for the rest of the runtime. Ideally this function is part of a loop which you start right in your initialisation script. Using this kind of setup will not return the same results as the automatic think and maxfps will show no effect. For one the performance graphs will not measure the luathink correctly, as well as ode. Also the order of the thinkcycle is slightly different. Be aware that you must run swapbuffers yourself to see the result of rendering. A good order of your think would be: processframe,your changes, swapbuffers. This would be close to the internal order, just that swapbuffers is called differently, but still would allow some cpu/gpu parallelism. Internally the order of a think in automatic mode is in one frame: render, luathink, sound, actors/scenenodes,swapbuffers.
Compared to the manual mode of this function: sound,actors/scenenodes,render
projectpath ([string])
returns: ([string])
gets or sets used projectpath.
refcount ()
returns: (int refcount)
returns current number of references in the system. There's (currently) a limit of 65000 references. Although Luxinia is using the garbage collection system of Lua, it permanent data outside of Lua can be created which results in memory leaks if this is not managed.
screenshot (string,[int scaling],[int quality])
returns: ()
writes an jpg or tga image file in the screenshot folder, depending on the suffix of the string (.jpg or .tga - case sensitive!). The scaling should be a number >=0 and <=3 and tells luxinia the scaling factor of the screenshot. 0 means full resolution, 3 means 1/8th of the resolution. The scaling is done with a simple and fast but lowquality pixelresize. The quality integer describes the quality of the jpg compression: lower means less quality but smaller filesize. Note: Smaller files can be flushed much faster to the HD, so if you want to do a little imagesequence, you may prefer a lower resolution mode with low quality.
screenshotquality ([int])
returns: ([int])
quality of jpg screenshots (0-100).
sleep (int millis)
returns: ()
trys to sleep for given time. The sleeptime will be subtracted from the next thinktime difference
swapbuffers ()
returns: ()
should only be used in manual frame processing. swaps backbuffer, which we normally render to, and front buffer, which is what you see.
time ()
returns: (int milisecs, float frametimediff, float avgdiff)
returns time in milliseconds since start and precise difference since the last frame, plus average of last 8 frames
version ()
returns: (string version,string data,string time)
returns luxinia version, builddate and buildtime.
vidinfo ()
returns: ()
prints info on renderer