Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
f00bb134
Commit
f00bb134
authored
Dec 26, 2018
by
chili
Browse files
test app loop
parent
6e0a7911
Changes
2
Show whitespace changes
Inline
Side-by-side
hw3d/App.cpp
View file @
f00bb134
#include "App.h"
#include "App.h"
#include <sstream>
#include <iomanip>
App
::
App
()
App
::
App
()
:
:
...
@@ -30,5 +32,8 @@ int App::Go()
...
@@ -30,5 +32,8 @@ int App::Go()
void
App
::
DoFrame
()
void
App
::
DoFrame
()
{
{
const
float
t
=
timer
.
Peek
();
std
::
ostringstream
oss
;
oss
<<
"Time elapsed: "
<<
std
::
setprecision
(
1
)
<<
std
::
fixed
<<
t
<<
"s"
;
wnd
.
SetTitle
(
oss
.
str
()
);
}
}
\ No newline at end of file
hw3d/App.h
View file @
f00bb134
#pragma once
#pragma once
#include "Window.h"
#include "Window.h"
#include "ChiliTimer.h"
class
App
class
App
{
{
...
@@ -11,4 +12,5 @@ private:
...
@@ -11,4 +12,5 @@ private:
void
DoFrame
();
void
DoFrame
();
private:
private:
Window
wnd
;
Window
wnd
;
ChiliTimer
timer
;
};
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment