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
0bb1a961
Commit
0bb1a961
authored
Aug 29, 2019
by
chili
Browse files
add test cube to app scene
parent
99e15f43
Changes
2
Hide whitespace changes
Inline
Side-by-side
hw3d/App.cpp
View file @
0bb1a961
...
@@ -15,9 +15,11 @@ App::App()
...
@@ -15,9 +15,11 @@ App::App()
:
:
wnd
(
1280
,
720
,
"The Donkey Fart Box"
),
wnd
(
1280
,
720
,
"The Donkey Fart Box"
),
light
(
wnd
.
Gfx
()
),
light
(
wnd
.
Gfx
()
),
plane
(
wnd
.
Gfx
(),
3.0
f
)
plane
(
wnd
.
Gfx
(),
3.0
f
),
cube
(
wnd
.
Gfx
(),
4.0
f
)
{
{
plane
.
SetPos
(
{
1.0
f
,
17.0
f
,
-
1.0
f
}
);
plane
.
SetPos
(
{
-
5.0
f
,
17.0
f
,
-
1.0
f
}
);
cube
.
SetPos
(
{
3.0
f
,
14.0
f
,
-
2.0
f
}
);
wnd
.
Gfx
().
SetProjection
(
dx
::
XMMatrixPerspectiveLH
(
1.0
f
,
9.0
f
/
16.0
f
,
0.5
f
,
40.0
f
)
);
wnd
.
Gfx
().
SetProjection
(
dx
::
XMMatrixPerspectiveLH
(
1.0
f
,
9.0
f
/
16.0
f
,
0.5
f
,
40.0
f
)
);
}
}
...
@@ -32,6 +34,7 @@ void App::DoFrame()
...
@@ -32,6 +34,7 @@ void App::DoFrame()
nano2
.
Draw
(
wnd
.
Gfx
()
);
nano2
.
Draw
(
wnd
.
Gfx
()
);
light
.
Draw
(
wnd
.
Gfx
()
);
light
.
Draw
(
wnd
.
Gfx
()
);
plane
.
Draw
(
wnd
.
Gfx
()
);
plane
.
Draw
(
wnd
.
Gfx
()
);
cube
.
Draw
(
wnd
.
Gfx
()
);
while
(
const
auto
e
=
wnd
.
kbd
.
ReadKey
()
)
while
(
const
auto
e
=
wnd
.
kbd
.
ReadKey
()
)
{
{
...
@@ -103,6 +106,7 @@ void App::DoFrame()
...
@@ -103,6 +106,7 @@ void App::DoFrame()
nano
.
ShowWindow
(
"Model 1"
);
nano
.
ShowWindow
(
"Model 1"
);
nano2
.
ShowWindow
(
"Model 2"
);
nano2
.
ShowWindow
(
"Model 2"
);
plane
.
SpawnControlWindow
(
wnd
.
Gfx
()
);
plane
.
SpawnControlWindow
(
wnd
.
Gfx
()
);
cube
.
SpawnControlWindow
(
wnd
.
Gfx
()
);
// present
// present
wnd
.
Gfx
().
EndFrame
();
wnd
.
Gfx
().
EndFrame
();
...
...
hw3d/App.h
View file @
0bb1a961
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include "Camera.h"
#include "Camera.h"
#include "PointLight.h"
#include "PointLight.h"
#include "TestPlane.h"
#include "TestPlane.h"
#include "TestCube.h"
#include "Mesh.h"
#include "Mesh.h"
#include <set>
#include <set>
...
@@ -29,4 +30,5 @@ private:
...
@@ -29,4 +30,5 @@ private:
Model
nano
{
wnd
.
Gfx
(),
"Models
\\
nano_textured
\\
nanosuit.obj"
};
Model
nano
{
wnd
.
Gfx
(),
"Models
\\
nano_textured
\\
nanosuit.obj"
};
Model
nano2
{
wnd
.
Gfx
(),
"Models
\\
nano_textured
\\
nanosuit.obj"
};
Model
nano2
{
wnd
.
Gfx
(),
"Models
\\
nano_textured
\\
nanosuit.obj"
};
TestPlane
plane
;
TestPlane
plane
;
TestCube
cube
;
};
};
\ No newline at end of file
hw3d_nuc_rw
@project_10_bot1
mentioned in commit
eebc975a
·
Apr 10, 2023
mentioned in commit
eebc975a
mentioned in commit eebc975adb369ad963429ac422e0f3f4677c83c4
Toggle commit list
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