One of the most important issue in many applications that use 3D graphics
is Performances.
This API makes it extremely easy to time any function (not just STATE's functions)
using two macros.
Here is an example of how to do it.
STATE_START_TAKING_TIME("2d point to 3D"); The text that is given here will appear in the log file profiling summary
any_function_that_you_would_like_to_time(...); calling the function that we want to time
STATE_STOP_TAKING_TIME();
Note that the result of the profiling will be written automatically
to the log file (look for the file log.log in your executable working directory)
Note also that these macros will only work in C++, when writing in C
do this instead:
static int time_id=-1;
time_id=STATE_profiler_start_measuring(time_id,"some text");
any_function_that_you_would_like_to_time(...); calling the function that we want to time (you can any function not just functions of STATE)
STATE_profiler_end_measuring(time_id);
1. STATE_profiler_start_measuring
2. STATE_profiler_end_measuring
|