• R/O
  • SSH
  • HTTPS

railsim2: Commit


Commit MetaInfo

Revision7 (tree)
Time2011-09-21 19:25:11
Authorokadu

Log Message

[okadu] 計測コード

Change Summary

Incremental Difference

--- trunk/CSaveFile.cpp (revision 6)
+++ trunk/CSaveFile.cpp (revision 7)
@@ -2,6 +2,7 @@
22 #include "md5.h"
33 #include "RailMap.h"
44 #include "Network.h"
5+#include "CJobTimer.h"
56 #include "CListView.h"
67 #include "CSimpleDialog.h"
78 #include "CRailWay.h"
@@ -451,6 +452,7 @@
451452 void CSaveFile::RenderScene(
452453 int option // 1: renderwarp
453454 ){
455+ TIMER_RAII("CSaveFile::RenderScene()");
454456 InitShadow();
455457 InitRailMap();
456458 CNamedObject::InitAfterRenderList();
@@ -459,10 +461,13 @@
459461 g_Scene->RenderScene();
460462 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_MATERIAL);
461463 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_MATERIAL);
462- CTrainGroup *group = m_GroupList;
463- while(group){
464- group->Render();
465- group = group->Next();
464+ {
465+ TIMER_RAII("train group");
466+ CTrainGroup *group = m_GroupList;
467+ while(group){
468+ group->Render();
469+ group = group->Next();
470+ }
466471 }
467472 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
468473 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
@@ -472,8 +477,11 @@
472477 CNamedObject::AfterRenderAll();
473478 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
474479 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
475- CParticle::RenderAll();
476- CHeadlight::RenderAll();
480+ {
481+ TIMER_RAII("effect");
482+ CParticle::RenderAll();
483+ CHeadlight::RenderAll();
484+ }
477485 g_Scene->RenderAfter();
478486 devResetMatrix();
479487 devSetTexture(0, NULL);
@@ -501,6 +509,7 @@
501509 void CSaveFile::Simulate(
502510 int num // 回数
503511 ){
512+ TIMER_RAII("CSaveFile::Simulate()");
504513 int scale = g_SimulationMode->GetTimeScale();
505514 int speed = num<0 ? g_SimulationMode->GetSimSpeed() : num;
506515 int i;
@@ -514,6 +523,7 @@
514523 speed = g_SimulationMode->GetOldSpeed();
515524 }
516525 for(i = 0; i<speed; i++){
526+ TIMER_RAII("single simulation");
517527 if(g_NetworkInitialized){
518528 if(exceed) ExceedNetworkSyncLimit(m_NetworkSyncCount);
519529 if(m_NetworkSyncCount){
--- trunk/HighTimer.cpp (revision 6)
+++ trunk/HighTimer.cpp (revision 7)
@@ -1,7 +1,8 @@
11 #include <time.h>
22 #include <windows.h>
33
4-LONGLONG g_Freq = 0;
4+LONGLONG g_HighTimerFreq = 0;
5+double g_HighTimer_FromCountToMilliseconds = 0.0;
56
67 /*
78 * 高分解能タイマの初期化
@@ -9,10 +10,12 @@
910 * 戻り値: CPU が対応していれば true を返す
1011 */
1112 bool InitHighTimer(){
12- if(QueryPerformanceFrequency((LARGE_INTEGER *)(&g_Freq))){
13+ if(QueryPerformanceFrequency((LARGE_INTEGER *)(&g_HighTimerFreq))){
14+ g_HighTimer_FromCountToMilliseconds = 1000.0/g_HighTimerFreq;
1315 return true;
1416 }else{
15- g_Freq = 0;
17+ g_HighTimerFreq = 0;
18+ g_HighTimer_FromCountToMilliseconds = 1.0;
1619 return false;
1720 }
1821 }
@@ -20,14 +23,23 @@
2023 /*
2124 * 現在時刻の取得
2225 *
23- * 戻り値: ミリ秒
26+ * 戻り値: 内部カウント値
2427 */
25-double HighTimer(){
26- if(g_Freq){
28+LONGLONG HighTimer(){
29+ if(g_HighTimerFreq){
2730 LONGLONG cnt;
2831 QueryPerformanceCounter((LARGE_INTEGER *)(&cnt));
29- return (double)cnt/g_Freq*1000.0;
32+ return cnt;
3033 }else{
31- return (double)clock(); // 非対応 orz
34+ return clock();
3235 }
3336 }
37+
38+/*
39+ * ミリ秒に変換
40+ *
41+ * 戻り値: ミリ秒
42+ */
43+double FromHighTimerCountToMs(LONGLONG t){
44+ return t*g_HighTimer_FromCountToMilliseconds;
45+}
--- trunk/CJobTimer.h (nonexistent)
+++ trunk/CJobTimer.h (revision 7)
@@ -0,0 +1,87 @@
1+#ifndef CJOBTIMER_H_INCLUDED
2+#define CJOBTIMER_H_INCLUDED
3+
4+#define ENABLE_JOB_TIMER (0)
5+
6+class CTimerObj{
7+public:
8+ struct CTimerData{
9+ public:
10+ LONGLONG m_Start;
11+ LONGLONG m_End;
12+ public:
13+ LONGLONG GetDelta() const{ return m_End-m_Start; }
14+ };
15+
16+ struct CFrameData{
17+ public:
18+ vector<CTimerData> m_Data;
19+ LONGLONG m_Total;
20+ public:
21+ CFrameData(): m_Total(0) {}
22+ };
23+
24+private:
25+ CFrameData m_FrameData[2];
26+ int m_OddFrame;
27+
28+ string m_Name;
29+ int m_FrameCount;
30+ bool m_IsStarted;
31+ int m_InactiveFrames;
32+public:
33+ CTimerObj(const char* name);
34+ void InitFrame();
35+ void Start();
36+ void Stop();
37+ void Update();
38+
39+ const char* GetName() const{ return m_Name.c_str(); }
40+ void SetName(const char* name){ m_Name = name; }
41+ bool IsStarted() const{ return m_IsStarted; }
42+ int GetInactiveFrames() const{ return m_InactiveFrames; }
43+ const CFrameData& GetFrameData(int flip) const{ return m_FrameData[(m_OddFrame+flip)&1]; }
44+};
45+
46+class CTimerRAII{
47+private:
48+ CTimerObj* m_Obj;
49+public:
50+ CTimerRAII(CTimerObj* obj): m_Obj(obj) { m_Obj->Start(); }
51+ ~CTimerRAII() { m_Obj->Stop(); }
52+};
53+#if ENABLE_JOB_TIMER
54+#define TIMER_RAII(name) \
55+ static CTimerObj _timer_obj_##__LINE__(name); \
56+ CTimerRAII _timer_raii_##__LINE__(&_timer_obj_##__LINE__)
57+#else
58+#define TIMER_RAII(name)
59+#endif
60+
61+class CJobTimer{
62+private:
63+ struct CFrameData{
64+ public:
65+ vector<CTimerObj*> m_ObjList;
66+ LONGLONG m_Start;
67+ LONGLONG m_End;
68+ };
69+ CFrameData m_FrameData[2];
70+ int m_OddFrame;
71+ int m_FrameCount;
72+ int m_SpanFrames;
73+ int m_SpanFrameCount;
74+
75+public:
76+ CJobTimer();
77+ int GetFrameCount() const{ return m_FrameCount; }
78+ void Clear();
79+ void AddObj(CTimerObj*);
80+ void Start();
81+ void Stop();
82+ void DrawResult();
83+};
84+
85+extern CJobTimer g_JobTimer;
86+
87+#endif
--- trunk/CGameMode.cpp (revision 6)
+++ trunk/CGameMode.cpp (revision 7)
@@ -2,6 +2,7 @@
22 #include "HighTimer.h"
33 #include "Capture.h"
44 #include "RSPV.h"
5+#include "CJobTimer.h"
56 #include "CScene.h"
67 #include "CSaveFile.h"
78 #include "CToggleIcon.h"
@@ -64,7 +65,7 @@
6465 int g_BlinkCounter = 0; // 汎用点滅カウンタ (0..MAXFPS-1)
6566 float g_BlinkAlpha = 0.0f; // 汎用点滅アルファ (0.0..1.0)
6667 bool g_RenderBlink = false; // レンダリング点滅フラグ
67-double g_SoundSync = 0.0; // サウンド同期用タイマ
68+LONGLONG g_SoundSync = 0; // サウンド同期用タイマ
6869 float g_FrameDelta = 0.0f; // フレーム時間 [ms]
6970
7071 CNeutralMode *g_NeutralMode; // ニュートラルモード
@@ -522,6 +523,7 @@
522523 void CGameMode::RenderFrame(
523524 int option // 1: speedinfo, 2: photomode
524525 ){
526+ TIMER_RAII("CGameMode::RenderFrame");
525527 int i, j, top1, top2, right1, right2;
526528 if(g_RSPV && g_RSPV!=RSPV_SKIN) option = 2;
527529 if(option&2){
@@ -713,29 +715,37 @@
713715 * モードループ
714716 */
715717 void CGameMode::Spin(){
718+
716719 SetMasterVolume();
717720 while(PeekAllMessage()){
718721 if(IsActive()){
719- POINT wp = {0, 0};
720- ClientToScreen(svw.hWnd, &wp);
721- RECT crc = {wp.x, wp.y, wp.x+g_DispWidth, wp.y+g_DispHeight};
722- ClipCursor(&crc);
723- //カーソル描画直前に
724- //ScanInputDevice();
725- //g_Cursor.FixCursor();
726- g_BlinkCounter = (g_BlinkCounter+1)%MAXFPS;
727- g_BlinkAlpha = 0.5f*(sinf(2.0f*D3DX_PI*g_BlinkCounter/MAXFPS)+1.0f);
728- g_ConfigMode->SetSpecularLight();
729- g_ManualControl = !!g_SimulationMode->GetManualControl() || g_NetworkInitialized;
730- g_IgnoreAcceleration = !!g_SimulationMode->GetIgnoreAcceleration();
731- void CheckNetworkState();
732- CheckNetworkState();
733- SpinGame();
734- if(CheckAlt() && GetKey(DIK_F4)==S_PUSH){
735- Exit();
736- break;
722+ g_JobTimer.Start();
723+ {
724+ TIMER_RAII("All");
725+ POINT wp = {0, 0};
726+ ClientToScreen(svw.hWnd, &wp);
727+ RECT crc = {wp.x, wp.y, wp.x+g_DispWidth, wp.y+g_DispHeight};
728+ ClipCursor(&crc);
729+ //カーソル描画直前に
730+ //ScanInputDevice();
731+ //g_Cursor.FixCursor();
732+ g_BlinkCounter = (g_BlinkCounter+1)%MAXFPS;
733+ g_BlinkAlpha = 0.5f*(sinf(2.0f*D3DX_PI*g_BlinkCounter/MAXFPS)+1.0f);
734+ g_ConfigMode->SetSpecularLight();
735+ g_ManualControl = !!g_SimulationMode->GetManualControl() || g_NetworkInitialized;
736+ g_IgnoreAcceleration = !!g_SimulationMode->GetIgnoreAcceleration();
737+ void CheckNetworkState();
738+ CheckNetworkState();
739+ SpinGame();
740+ if(CheckAlt() && GetKey(DIK_F4)==S_PUSH){
741+ Exit();
742+ break;
743+ }
744+ if(GetButton(DIM_LEFT)<=S_PULL){
745+ CDragContainer::EndDrag();
746+ }
737747 }
738- if(GetButton(DIM_LEFT)<=S_PULL) CDragContainer::EndDrag();
748+ g_JobTimer.Stop();
739749 SyncFrame();
740750 }else{
741751 SetMasterVolume();
@@ -756,7 +766,7 @@
756766 * サウンド定常処理
757767 */
758768 void CGameMode::SpinSound(){
759- double t = HighTimer();
769+ LONGLONG t = HighTimer();
760770 g_FrameDelta = (float)(t-g_SoundSync);
761771 g_SoundSync = t;
762772 SetListenerPos(GetVPos());
--- trunk/HighTimer.h (revision 6)
+++ trunk/HighTimer.h (revision 7)
@@ -2,6 +2,7 @@
22 #define HIGHTIMER_H_INCLUDED
33
44 bool InitHighTimer();
5-double HighTimer();
5+LONGLONG HighTimer();
6+double FromHighTimerCountToMs(LONGLONG t);
67
78 #endif
--- trunk/CScene.cpp (revision 6)
+++ trunk/CScene.cpp (revision 7)
@@ -1,4 +1,5 @@
11 #include "stdafx.h"
2+#include "CJobTimer.h"
23 #include "CRailDetectCurve.h"
34 #include "CRailConnector.h"
45 #include "CPier.h"
@@ -652,6 +653,7 @@
652653 * レンダリング
653654 */
654655 void CScene::RenderScene(){
656+ TIMER_RAII("CScene::RenderScene()");
655657 SetSeason();
656658 SetGlobalAxis();
657659 g_SystemSwitch[SYS_SW_SERIAL].SetValue(m_Serial);
@@ -668,43 +670,64 @@
668670 Render();
669671 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
670672 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
671- g_RailPluginList->RenderAll();
672- g_TiePluginList->RenderAll();
673- g_GirderPluginList->RenderAll();
674- g_PierPluginList->RenderAll();
675- g_LinePluginList->RenderAll();
673+ {
674+ TIMER_RAII("profile RenderAll()");
675+ g_RailPluginList->RenderAll();
676+ g_TiePluginList->RenderAll();
677+ g_GirderPluginList->RenderAll();
678+ g_PierPluginList->RenderAll();
679+ g_LinePluginList->RenderAll();
680+ }
676681 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_MATERIAL);
677682 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_MATERIAL);
678683 devSetLighting(TRUE);
679- CRailWay *way = m_RailWay;
680- while(way){
681- way->Render();
682- way = way->Next();
684+ {
685+ TIMER_RAII("railway");
686+ CRailWay *way = m_RailWay;
687+ while(way){
688+ way->Render();
689+ way = way->Next();
690+ }
683691 }
684- CPier *pier = m_Pier;
685- while(pier){
686- pier->Render();
687- pier = pier->Next();
692+ {
693+ TIMER_RAII("pier");
694+ CPier *pier = m_Pier;
695+ while(pier){
696+ pier->Render();
697+ pier = pier->Next();
698+ }
688699 }
689- CLine *line = m_Line;
690- while(line){
691- line->Render();
692- line = line->Next();
700+ {
701+ TIMER_RAII("line");
702+ CLine *line = m_Line;
703+ while(line){
704+ line->Render();
705+ line = line->Next();
706+ }
693707 }
694- CPole *pole = m_Pole;
695- while(pole){
696- pole->Render();
697- pole = pole->Next();
708+ {
709+ TIMER_RAII("pole");
710+ CPole *pole = m_Pole;
711+ while(pole){
712+ pole->Render();
713+ pole = pole->Next();
714+ }
698715 }
699- CStation *station = m_Station;
700- while(station){
701- station->Render();
702- station = station->Next();
716+ {
717+ TIMER_RAII("station");
718+ CStation *station = m_Station;
719+ while(station){
720+ station->Render();
721+ station = station->Next();
722+ }
703723 }
704- CStruct *strct = m_Struct;
705- while(strct){
706- strct->Render();
707- strct = strct->Next();
724+ {
725+ TIMER_RAII("struct");
726+ CStruct *strct = m_Struct;
727+ while(strct){
728+ strct->Render();
729+ strct = strct->Next();
730+ }
708731 }
709732 devSetState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
710733 devSetState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
--- trunk/CSceneryMode.cpp (revision 6)
+++ trunk/CSceneryMode.cpp (revision 7)
@@ -3,6 +3,7 @@
33 #include "CPixelbit.h"
44 #include "Capture.h"
55 #include "RailMap.h"
6+#include "CJobTimer.h"
67 #include "CScene.h"
78 #include "CSaveFile.h"
89 #include "CSurfacePlugin.h"
@@ -105,6 +106,8 @@
105106 break;
106107 }
107108
109+ g_JobTimer.DrawResult();
110+
108111 EndScene();
109112
110113 VideoCapture(1|(ms_PhotoMode==2 ? 4 : 0)
--- trunk/CJobTimer.cpp (nonexistent)
+++ trunk/CJobTimer.cpp (revision 7)
@@ -0,0 +1,157 @@
1+#include "stdafx.h"
2+#include "HighTimer.h"
3+#include "CJobTimer.h"
4+
5+CJobTimer g_JobTimer;
6+
7+////////////////////////////////////////////////////////////////////////////////
8+////////////////////////////////////////////////////////////////////////////////
9+
10+CTimerObj::CTimerObj(const char* name)
11+ : m_FrameCount(-1)
12+ , m_IsStarted(false)
13+ , m_InactiveFrames(0)
14+ , m_OddFrame(0)
15+{
16+ SetName(name);
17+}
18+
19+void CTimerObj::InitFrame(){
20+ CFrameData &frame_data = m_FrameData[m_OddFrame];
21+ if(frame_data.m_Data.size()){
22+ frame_data.m_Data.clear();
23+ m_InactiveFrames = 0;
24+ }else{
25+ ++m_InactiveFrames;
26+ }
27+ frame_data.m_Total = 0;
28+}
29+
30+void CTimerObj::Start(){
31+ if(m_FrameCount!=g_JobTimer.GetFrameCount()){
32+ m_FrameCount = g_JobTimer.GetFrameCount();
33+ InitFrame();
34+ g_JobTimer.AddObj(this);
35+ }
36+ CFrameData &frame_data = m_FrameData[m_OddFrame];
37+ if(m_IsStarted) ErrorDialog("CTimerObj::Start() [%s] Already started!", GetName());
38+ m_IsStarted = true;
39+ frame_data.m_Data.push_back(CTimerData());
40+ CTimerData &data = frame_data.m_Data.back();
41+ data.m_Start = data.m_End = HighTimer();
42+}
43+
44+void CTimerObj::Stop(){
45+ CFrameData &frame_data = m_FrameData[m_OddFrame];
46+ if(!m_IsStarted) ErrorDialog("CTimerObj::Stop() [%s] Not started!", GetName());
47+ CTimerData &data = frame_data.m_Data.back();
48+ data.m_End = HighTimer();
49+ frame_data.m_Total += data.GetDelta();
50+ m_IsStarted = false;
51+}
52+
53+void CTimerObj::Update(){
54+ if(m_IsStarted) ErrorDialog("CTimerObj::Update() [%s] Already started!", GetName());
55+ m_OddFrame = !m_OddFrame;
56+}
57+
58+////////////////////////////////////////////////////////////////////////////////
59+////////////////////////////////////////////////////////////////////////////////
60+
61+CJobTimer::CJobTimer()
62+ : m_OddFrame(0)
63+ , m_FrameCount(0)
64+ , m_SpanFrames(1)
65+ , m_SpanFrameCount(0)
66+{
67+}
68+
69+void CJobTimer::Clear(){
70+ CFrameData &frame_data = m_FrameData[m_OddFrame];
71+ frame_data.m_ObjList.clear();
72+}
73+
74+void CJobTimer::AddObj(
75+ CTimerObj *obj // object
76+){
77+ CFrameData &frame_data = m_FrameData[m_OddFrame];
78+ frame_data.m_ObjList.push_back(obj);
79+}
80+
81+void CJobTimer::Start(){
82+#if ENABLE_JOB_TIMER
83+ ++m_FrameCount;
84+ Clear();
85+ CFrameData &frame_data = m_FrameData[m_OddFrame];
86+ frame_data.m_Start = frame_data.m_End = HighTimer();
87+#endif
88+}
89+
90+void CJobTimer::Stop(){
91+#if ENABLE_JOB_TIMER
92+ CFrameData &frame_data = m_FrameData[m_OddFrame];
93+ frame_data.m_End = HighTimer();
94+ unsigned int i;
95+ for(i = 0; i<frame_data.m_ObjList.size(); ++i){
96+ frame_data.m_ObjList[i]->Update();
97+ }
98+ m_OddFrame = !m_OddFrame;
99+#endif
100+}
101+
102+void CJobTimer::DrawResult(){
103+#if ENABLE_JOB_TIMER
104+ TIMER_RAII("CJobTimer::DrawResult()");
105+ CFrameData &frame_data = m_FrameData[!m_OddFrame];
106+ unsigned int i, j;
107+ static const double FRAME_UNIT = 1000.0/MAXFPS; // milliseconds
108+ const double delta = FromHighTimerCountToMs(frame_data.m_End-frame_data.m_Start);
109+ const int span_frames = (int)ceil(delta/FRAME_UNIT);
110+ if(span_frames<m_SpanFrames){
111+ ++m_SpanFrameCount;
112+ if(m_SpanFrameCount>MAXFPS) m_SpanFrames = span_frames;
113+ }else{
114+ m_SpanFrames = span_frames;
115+ m_SpanFrameCount = 0;
116+ }
117+ const double rcp_span = 1.0/(FRAME_UNIT*m_SpanFrames);
118+ const int bar_height = FONT_HEIGHT;
119+ const int bar_hilite = 4;
120+ const int area_x = 50;
121+ const int area_y = g_DispHeight-50;
122+ const int area_width = g_DispWidth-200;
123+ const int area_height = bar_height*frame_data.m_ObjList.size();
124+ int pos_y = area_y;
125+ devResetMatrix();
126+ devSetLighting(false);
127+ devSetTexture(0, 0);
128+ devBLEND_ALPHA();
129+ Fill2DRect(area_x, area_y-area_height, area_x+area_width, area_y, 0x80000000);
130+ for(i = 0; i<frame_data.m_ObjList.size(); ++i){
131+ CTimerObj* obj = frame_data.m_ObjList[i];
132+ const CTimerObj::CFrameData &obj_frame = obj->GetFrameData(1);
133+ for(j = 0; j<obj_frame.m_Data.size(); ++j){
134+ const CTimerObj::CTimerData &timer_data = obj_frame.m_Data[j];
135+ const int bar_start = (int)(FromHighTimerCountToMs(timer_data.m_Start-frame_data.m_Start)*area_width*rcp_span);
136+ int bar_end = (int)(FromHighTimerCountToMs(timer_data.m_End-frame_data.m_Start)*area_width*rcp_span);
137+ if(bar_end==bar_start) bar_end=bar_start+1;
138+ Fill2DRect(area_x+bar_start, pos_y-bar_height, area_x+bar_end, pos_y, MultiplyColor(0xc0ff0000, j&1 ? 0xffc0c0c0 : 0xffffffff));
139+ Fill2DRect(area_x+bar_start, pos_y-bar_hilite, area_x+bar_end, pos_y, j&1 ? 0x80c0c0c0 : 0x80ffffff);
140+ }
141+ pos_y -= bar_height;
142+ }
143+ Draw2DRect(area_x, area_y-area_height, area_x+area_width, area_y, 0xffffffff);
144+ for(i = 1; i<m_SpanFrames; ++i){
145+ const int line_x = area_width*i/m_SpanFrames;
146+ Draw2DLine(area_x+line_x, area_y-area_height, area_x+line_x, area_y, 0xffffffff);
147+ }
148+ pos_y = area_y;
149+ for(i = 0; i<frame_data.m_ObjList.size(); ++i){
150+ CTimerObj* obj = frame_data.m_ObjList[i];
151+ const CTimerObj::CFrameData &obj_frame = obj->GetFrameData(1);
152+ const double frame_percent = FromHighTimerCountToMs(obj_frame.m_Total)*100.0/FRAME_UNIT;
153+ g_StrTex->RenderLeft(area_x, pos_y-bar_height, 0xffffffff, 0, FlashIn("%7.2lf x%d: %s", frame_percent, obj_frame.m_Data.size(), obj->GetName()));
154+ pos_y -= bar_height;
155+ }
156+#endif
157+}
--- trunk/CShadowVolume.cpp (revision 6)
+++ trunk/CShadowVolume.cpp (revision 7)
@@ -1,4 +1,5 @@
11 #include "stdafx.h"
2+#include "CJobTimer.h"
23 #include "CShadowVolume.h"
34 #include "CScene.h"
45 #include "CEnvPlugin.h"
@@ -137,6 +138,8 @@
137138 CObject *obj, // オブジェクト
138139 VEC3 vLight // ライト方向
139140 ){
141+ TIMER_RAII("CShadowVolume::BuildFromMesh()");
142+
140143 CMesh *udxMesh = obj->GetMesh();
141144 if(!udxMesh) return;
142145 udxMesh->MaskMatFlag(1);
Show on old repository browser