Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / help with statistic() command

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 27th May 2010 02:33
can someone provide some more info on this command in the DBP help there is stated that if you use statistic(1) you will get number of polygons in render data what are the other values except one? I tried them but i have no idea what they return.

If anyone wants to join my team and help me with development of my sci-fi fps game, please send me an e-mail.
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th May 2010 05:30
I'm pretty sure the help file also gives descriptions for other values. Check the code example.

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 27th May 2010 13:03
I can't find any description for other values I checked code examples earlier.

If anyone wants to join my team and help me with development of my sci-fi fps game, please send me an e-mail.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th May 2010 13:13
From the help file....

Quote: "STATISTIC
This command will return an internal statistic from the engine.

Syntax

Return Integer=STATISTIC(Statistic Code)

Parameters

Statistic Code

Integer
Providing a value of one as the parameter will cause the command to return data from within the engine, such as the current number of polygons used to render the scene. A complete list of available codes can be found in the example below

Returns

This command will return an internal statistic from the engine

Description

Providing a value of one as the parameter will cause the command to return the current number of polygons used to render the scene.

Example Code

make object sphere 1,100 : color object 1,rgb(0,32,0)
do
set cursor 0,0
print "NOTE: Area Box refers to STATIC OBJECTS universe sub-divisions"
print
print "Polygons in screen:";statistic(1)
print "Stencil buffer available:";statistic(2)
print "Current Universe Area Box:";statistic(3)
print "Total Number Of Universe Area Boxes:";statistic(4)
print "Number of DrawPrimitive Calls:";statistic(5)
print "Polygons from Current Area Box:";statistic(6)
print "DrawPrimitive Calls from Current Area Box:";statistic(7)
print "Polygons tested for collision:";statistic(8)
print "Volumes tested for collision:";statistic(9)
loop"


Look at the print commands at the bottom...

My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-25 17:05:33
Your offset time is: 2026-07-25 17:05:33