# Class: pgraph

profiling graph. If render.drawpgraph is enabled sampling is done per frame and rendered as line graph at the end.

## Methods:

### Method overview:

- addsample
- color
- draw
- drawmax
- drawpos
- drawsize
- endtimesample
- getl2d
- getl3d
- getparticle
- getphysics
- getrender
- getthink
- getuser0
- getuser1
- getuser2
- getuser3
- getvistest
- renderfinish
- starttimesample
- stipple

addsample (pgraph,float sample)
  returns: ()
  adds a sample to the cached values.
color (pgraph,[float r,g,b])
  returns: ([float r,g,b])
  returns or sets color of the pgraph
draw ([pgraph],[boolean])
  returns: ([boolean])
  draw pgraph individually or all, also enables time sampling.
drawmax ([pgraph],[float])
  returns: ([float])
  returns or sets maximum value,individually or for all. (default is 16.667 for 60 fps as internal graphs sample in milliseconds). When drawing the values are scaled and clamped accordingly.
drawpos ([float x,y,z])
  returns: ([float x,y,z])
  returns or sets position of the pgraphs
drawsize ([float x,y])
  returns: ([float x,y])
  returns or sets size of the pgraphs
endtimesample (pgraph)
  returns: ()
  ends the time sample and adds it to graph.
getl2d ()
  returns: (pgraph)
  l2d pgraph is subpart of render pgraph
getl3d ()
  returns: (pgraph)
  l3d pgraph is subpart of render pgraph)
getparticle ()
  returns: (pgraph)
  particle pgraph is subpart of render pgraph.
getphysics ()
  returns: (pgraph)
  ode simulation pgraph.
getrender ()
  returns: (pgraph)
  rendering pgraph without full accurate driver time (unless pgraph.renderfinish is set)
getthink ()
  returns: (pgraph)
  think pgraph (lua mostly).
getuser0 ()
  returns: (pgraph)
  user pgraph, the only ones you should be adding samples to
getuser1 ()
  returns: (pgraph)
  user pgraph, the only ones you should be adding samples to
getuser2 ()
  returns: (pgraph)
  user pgraph, the only ones you should be adding samples to
getuser3 ()
  returns: (pgraph)
  user pgraph, the only ones you should be adding samples to
getvistest ()
  returns: (pgraph)
  vistest frame pgraph
renderfinish ([boolean])
  returns: ([boolean])
  renderpgraph will show full rendering time, it will wait until all rendering commands are executed by driver. This will reduce performance greatly as it kills all parallelism.
starttimesample (pgraph)
  returns: ()
  starts a time sample. (in milliseconds)
stipple (pgraph,[float r,g,b])
  returns: ([float r,g,b])
  returns or sets if stippling should be used