Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Graphics
pew
Commits
b0f24760
Commit
b0f24760
authored
2 years ago
by
Evy Storozhenko
Browse files
Options
Downloads
Patches
Plain Diff
added getShouldClose in window
parent
bb64fb84
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/pew/renderpass/renderpass.hpp
+2
-2
2 additions, 2 deletions
src/pew/renderpass/renderpass.hpp
src/pew/scene/scene.cpp
+1
-0
1 addition, 0 deletions
src/pew/scene/scene.cpp
src/pew/window/window.hpp
+5
-0
5 additions, 0 deletions
src/pew/window/window.hpp
with
8 additions
and
2 deletions
src/pew/renderpass/renderpass.hpp
+
2
−
2
View file @
b0f24760
...
...
@@ -94,7 +94,7 @@ namespace pew {
RenderPassBuffers
buffers
;
#if !defined(PEW_USE_THREADS)
std
::
function
<
void
()
>
pixelUpdateFun
;
std
::
function
<
bool
()
>
pixelUpdateFun
;
#endif
public:
...
...
@@ -133,7 +133,7 @@ namespace pew {
#if !defined(PEW_USE_THREADS)
RenderPass
&
setPixelUpdateFunction
(
const
std
::
function
<
void
()
>&
fun
)
{
setPixelUpdateFunction
(
const
std
::
function
<
bool
()
>&
fun
)
{
pixelUpdateFun
=
fun
;
return
*
this
;
}
...
...
This diff is collapsed.
Click to expand it.
src/pew/scene/scene.cpp
+
1
−
0
View file @
b0f24760
...
...
@@ -43,6 +43,7 @@ namespace pew {
renderPass
.
setPixelUpdateFunction
([
&
]
{
window
.
handleInput
();
window
.
drawFrame
();
return
window
.
getShouldClose
();
});
#if defined(__EMSCRIPTEN__)
...
...
This diff is collapsed.
Click to expand it.
src/pew/window/window.hpp
+
5
−
0
View file @
b0f24760
...
...
@@ -155,6 +155,11 @@ namespace pew {
shouldClose
=
true
;
}
auto
getShouldClose
()
const
noexcept
{
return
shouldClose
;
}
void
handleInput
()
{
SDL_Event
event
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment