generated from ange-yaghi/visualcpp_template
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f27013b
commit 69de1ed
Showing
33 changed files
with
348 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef YDS_BREAKDOWN_TIMER_H | ||
#define YDS_BREAKDOWN_TIMER_H | ||
|
||
#include "yds_base.h" | ||
|
||
#include "yds_expanding_array.h" | ||
#include "yds_breakdown_timer_channel.h" | ||
|
||
class ysBreakdownTimer : public ysObject { | ||
public: | ||
ysBreakdownTimer(); | ||
~ysBreakdownTimer(); | ||
|
||
int GetChannelCount() const { return m_channels.GetNumObjects(); } | ||
|
||
void StartFrame(); | ||
void StartMeasurement(const std::string &timerChannelName); | ||
void EndMasurement(const std::string &timerChannelName); | ||
|
||
protected: | ||
ysBreakdownTimerChannel *FindChannel(const std::string &s); | ||
|
||
ysExpandingArray<ysBreakdownTimerChannel, 4> m_channels; | ||
ysExpandingArray<std::string, 4> m_executionOrder; | ||
}; | ||
|
||
#endif /* YDS_BREAKDOWN_TIMER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef YDS_BREAKDOWN_TIMER_CHANNEL_H | ||
#define YDS_BREAKDOWN_TIMER_CHANNEL_H | ||
|
||
#include "yds_base.h" | ||
|
||
#include <string> | ||
|
||
class ysBreakdownTimerChannel : public ysObject { | ||
public: | ||
ysBreakdownTimerChannel(); | ||
~ysBreakdownTimerChannel(); | ||
|
||
void Initialize(int bufferSize); | ||
void Reset(); | ||
void Destroy(); | ||
|
||
void SetName(const std::string &name) { m_name = name; } | ||
std::string GetName() const { return m_name; } | ||
|
||
int GetEntryCount() const { return m_entryCount; } | ||
|
||
void RecordSample(float s); | ||
float GetSample(int i) const; | ||
|
||
protected: | ||
std::string m_name; | ||
float *m_sampleBuffer; | ||
int m_bufferSize; | ||
int m_currentBufferOffset; | ||
int m_entryCount; | ||
}; | ||
|
||
#endif /* YDS_BREAKDOWN_TIMER_CHANNEL_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef YDS_D3D11_UTILITIES_H | ||
#define YDS_D3D11_UTILITIES_H | ||
|
||
#include <string> | ||
|
||
struct ID3D11DeviceChild; | ||
|
||
void D3D11SetDebugName(ID3D11DeviceChild *object, const std::string &name); | ||
|
||
#endif /* YDS_D3D11_UTILITIES_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.