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
6eb518fa
Commit
6eb518fa
authored
Aug 02, 2019
by
chili
Browse files
testing out multiple model bind sharing
parent
a28c15d4
Changes
2
Show whitespace changes
Inline
Side-by-side
hw3d/App.cpp
View file @
6eb518fa
...
@@ -27,6 +27,7 @@ void App::DoFrame()
...
@@ -27,6 +27,7 @@ void App::DoFrame()
light
.
Bind
(
wnd
.
Gfx
(),
cam
.
GetMatrix
()
);
light
.
Bind
(
wnd
.
Gfx
(),
cam
.
GetMatrix
()
);
nano
.
Draw
(
wnd
.
Gfx
()
);
nano
.
Draw
(
wnd
.
Gfx
()
);
nano2
.
Draw
(
wnd
.
Gfx
()
);
light
.
Draw
(
wnd
.
Gfx
()
);
light
.
Draw
(
wnd
.
Gfx
()
);
while
(
const
auto
e
=
wnd
.
kbd
.
ReadKey
()
)
while
(
const
auto
e
=
wnd
.
kbd
.
ReadKey
()
)
...
@@ -96,7 +97,8 @@ void App::DoFrame()
...
@@ -96,7 +97,8 @@ void App::DoFrame()
cam
.
SpawnControlWindow
();
cam
.
SpawnControlWindow
();
light
.
SpawnControlWindow
();
light
.
SpawnControlWindow
();
ShowImguiDemoWindow
();
ShowImguiDemoWindow
();
nano
.
ShowWindow
();
nano
.
ShowWindow
(
"Model 1"
);
nano2
.
ShowWindow
(
"Model 2"
);
// present
// present
wnd
.
Gfx
().
EndFrame
();
wnd
.
Gfx
().
EndFrame
();
...
...
hw3d/App.h
View file @
6eb518fa
...
@@ -26,4 +26,5 @@ private:
...
@@ -26,4 +26,5 @@ private:
Camera
cam
;
Camera
cam
;
PointLight
light
;
PointLight
light
;
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"
};
};
};
\ 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