mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-12 16:38:41 +00:00
impl. normal vector rendering. working
This commit is contained in:
parent
2149c82b63
commit
39714d68a8
|
|
@ -51,6 +51,19 @@ void update_timing_stat_end(uint32 stat, const char* function)
|
||||||
debug_container->perf_stats[stat].old_tick_count = new_tick_count;
|
debug_container->perf_stats[stat].old_tick_count = new_tick_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void update_timing_stat_end_continued(uint32 stat, const char* function)
|
||||||
|
{
|
||||||
|
uint64 new_tick_count = __rdtsc();
|
||||||
|
|
||||||
|
debug_container->perf_stats[stat].function = function;
|
||||||
|
debug_container->perf_stats[stat].delta_tick = debug_container->perf_stats[stat].delta_tick
|
||||||
|
+ new_tick_count - debug_container->perf_stats[stat].old_tick_count;
|
||||||
|
debug_container->perf_stats[stat].delta_time = debug_container->perf_stats[stat].delta_time
|
||||||
|
+ (double) debug_container->perf_stats[stat].delta_tick / (double) debug_container->performance_count_frequency;
|
||||||
|
debug_container->perf_stats[stat].old_tick_count = new_tick_count;
|
||||||
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void reset_counter(int32 id)
|
void reset_counter(int32 id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,12 +36,17 @@ struct TimingStat {
|
||||||
// These are only needed if we need to delay the overwrite by 1 frame (e.g. ui update)
|
// These are only needed if we need to delay the overwrite by 1 frame (e.g. ui update)
|
||||||
void update_timing_stat_start(uint32, const char*);
|
void update_timing_stat_start(uint32, const char*);
|
||||||
void update_timing_stat_end(uint32, const char*);
|
void update_timing_stat_end(uint32, const char*);
|
||||||
|
void update_timing_stat_end_continued(uint32, const char*);
|
||||||
#define UPDATE_TIMING_STAT_START(stat) update_timing_stat_start(stat, __func__)
|
#define UPDATE_TIMING_STAT_START(stat) update_timing_stat_start(stat, __func__)
|
||||||
#define UPDATE_TIMING_STAT_END(stat) update_timing_stat_end(stat, __func__)
|
#define UPDATE_TIMING_STAT_END(stat) update_timing_stat_end(stat, __func__)
|
||||||
|
#define UPDATE_TIMING_STAT_CONTINUE(stat) update_timing_stat_start(stat, __func__)
|
||||||
|
#define UPDATE_TIMING_STAT_END_CONTINUED(stat) update_timing_stat_end(stat, __func__)
|
||||||
#else
|
#else
|
||||||
#define UPDATE_TIMING_STAT(stat) ((void) 0)
|
#define UPDATE_TIMING_STAT(stat) ((void) 0)
|
||||||
#define UPDATE_TIMING_STAT_START(stat) ((void) 0)
|
#define UPDATE_TIMING_STAT_START(stat) ((void) 0)
|
||||||
#define UPDATE_TIMING_STAT_END(stat) ((void) 0)
|
#define UPDATE_TIMING_STAT_END(stat) ((void) 0)
|
||||||
|
#define UPDATE_TIMING_STAT_CONTINUE(stat) ((void) 0)
|
||||||
|
#define UPDATE_TIMING_STAT_END_CONTINUED(stat) ((void) 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -18,6 +18,11 @@ struct Vertex3D {
|
||||||
v4_f32 color;
|
v4_f32 color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Vertex3DNormal {
|
||||||
|
v3_f32 position;
|
||||||
|
v3_f32 normal;
|
||||||
|
};
|
||||||
|
|
||||||
struct Vertex3DTextureColor {
|
struct Vertex3DTextureColor {
|
||||||
v3_f32 position;
|
v3_f32 position;
|
||||||
v2_f32 tex_coord;
|
v2_f32 tex_coord;
|
||||||
|
|
@ -27,12 +32,12 @@ struct Vertex3DTextureColor {
|
||||||
struct Vertex3DTextureColorIndex {
|
struct Vertex3DTextureColorIndex {
|
||||||
v3_f32 position;
|
v3_f32 position;
|
||||||
v2_f32 tex_coord;
|
v2_f32 tex_coord;
|
||||||
uint32 color;
|
f32 color;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Vertex3DColorIndex {
|
struct Vertex3DColorIndex {
|
||||||
v3_f32 position;
|
v3_f32 position;
|
||||||
uint32 color;
|
f32 color;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Vertex2D {
|
struct Vertex2D {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user