Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- c++class
- leveleditor
- 자료구조
- 자료구조정리
- c++porinter
- c++용어정리
- 자료형타입
- 언리얼엔진
- 프로그래밍일기
- 월드아웃라이너
- 언리얼엔진5
- uaiperception
- 언리얼비헤이어비어트리
- 언리얼ai
- 언리얼엔진공부
- unrealengineai
- 수학용어정리
- DX
- 25.06.11dir
- bttask
- c언어정리
- 영단어정리
- 게임개발
- 각도변환
- 게임엔진튜토리얼
- livrary
- 프로그래밍
- ipc(inter process communication)
- c++
- directx
Archives
- Today
- Total
루리코딩 세상
Time 관련 본문
| DeltaTime | 프레임 간 시간 간격 | |
| RunningTime | 현재 시간 |
public:
float GetDeltaTime() {return DeltaTime;}
float GetRunningTime() {return RunningTime;}
private:
system_clock : OS Clock
Steady_clock : CPU Clock
Steady_clock::time_point StartTime;
Steady_clock::time_point PrevFrameTime;
float DeltaTime = 0.0f;
float RunningTime = 0.0f
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
Timer.cpp
void CTimer::Tick()
{
steady_clock::time_point current = steady_clock::now();
duration<float, milli> temp = current - PrevFrameTime;
DeltaTime = temp.count();
PrevFrameTime = current;
duration<float> temp2 = current - StartTime;
RunningTime = temp2.count();
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
ImGui::LabelText("Running", "%f", CTimer::Get()->GetRunningTime());
ImGui::LabelText("Delta", "%f", CTimer::Get()->GetDeltaTime());
ImGui::LabalText("FPS", "%f", ImGui::GetIO().Framerate);'이론 > DirectX' 카테고리의 다른 글
| 싱글, 더블 버퍼링(Single Buffering, Double Buffering) (0) | 2025.06.03 |
|---|---|
| DirectX 관련 키워드 및 개념 요약 정리해두기 (1) | 2025.06.02 |
| DirectX 윈도우 창 띄우기 (0) | 2025.06.01 |
| 래스터라이즈(Rasterize)란? (0) | 2025.05.30 |
| DirectX에 관하여 기본적인 지식 뼈대 만들기 (4) | 2025.05.29 |