mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-12 02:01:29 -10:00
In D3D red is general processing (and generic graphics), green is 2D rendering, dark blue is 3D unlit, light blue is HT&L renders and yellow is the presentation of the frame to D3D. OGL is all red for now. Use compile flag TIMERBAR_ON with code lib to activate it. Also updated some more D3D device stuff that might get a bit more speed out of some cards.
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/*
|
|
* Code created by Thomas Whittaker (RT) for a Freespace 2 source code project
|
|
*
|
|
* You may not sell or otherwise commercially exploit the source or things you
|
|
* created based on the source.
|
|
*
|
|
*/
|
|
|
|
#ifndef _TIMERBAR_HEADER_
|
|
#define _TIMERBAR_HEADER_
|
|
|
|
const int MAX_NUM_TIMERBARS = 20;
|
|
|
|
// These functions should never be used directly, always use macros below
|
|
void timerbar_start_frame();
|
|
void timerbar_end_frame();
|
|
void timerbar_set_draw_func(void (*new_draw_func_ptr)(int colour, float x, float y, float w, float h));
|
|
|
|
void timerbar_push(int value);
|
|
void timerbar_pop();
|
|
|
|
// This function shouldnt not be used any more or it will break push and pop calls
|
|
void timerbar_switch_type(int num);
|
|
|
|
// Only show timer bars if in debug mode in windows unless TIMERBAR_ON compile flag is set
|
|
#if defined(TIMERBAR_ON)
|
|
|
|
#define TIMERBAR_SET_DRAW_FUNC(f) timerbar_set_draw_func(f);
|
|
#define TIMERBAR_START_FRAME() timerbar_start_frame();
|
|
#define TIMERBAR_END_FRAME() timerbar_end_frame();
|
|
#define TIMERBAR_SWITCH_TYPE(n) timerbar_switch_type(n);
|
|
|
|
#define TIMERBAR_PUSH(v) timerbar_push(v);
|
|
#define TIMERBAR_POP() timerbar_pop();
|
|
|
|
#else
|
|
|
|
#define TIMERBAR_SET_DRAW_FUNC(f) ;
|
|
#define TIMERBAR_START_FRAME() ;
|
|
#define TIMERBAR_END_FRAME() ;
|
|
#define TIMERBAR_SWITCH_TYPE(n) ;
|
|
|
|
#define TIMERBAR_PUSH(v) ;
|
|
#define TIMERBAR_POP() ;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|