Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-extras
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Kunstwald
glow-extras
Commits
68be07a2
Commit
68be07a2
authored
7 years ago
by
Philip Trettner
Browse files
Options
Downloads
Patches
Plain Diff
Improved GlfwApp interface
parent
411edfcd
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
glfw/glow-extras/glfw/GlfwApp.cc
+10
-0
10 additions, 0 deletions
glfw/glow-extras/glfw/GlfwApp.cc
glfw/glow-extras/glfw/GlfwApp.hh
+5
-0
5 additions, 0 deletions
glfw/glow-extras/glfw/GlfwApp.hh
with
15 additions
and
0 deletions
glfw/glow-extras/glfw/GlfwApp.cc
+
10
−
0
View file @
68be07a2
...
@@ -53,6 +53,16 @@ std::string GlfwApp::getClipboardString() const
...
@@ -53,6 +53,16 @@ std::string GlfwApp::getClipboardString() const
return
s
?
s
:
""
;
return
s
?
s
:
""
;
}
}
bool
GlfwApp
::
isMouseButtonPressed
(
int
button
)
const
{
return
glfwGetMouseButton
(
mWindow
,
button
)
==
GLFW_PRESS
;
}
bool
GlfwApp
::
isKeyPressed
(
int
key
)
const
{
return
glfwGetKey
(
mWindow
,
key
)
==
GLFW_PRESS
;
}
void
GlfwApp
::
init
()
void
GlfwApp
::
init
()
{
{
if
(
mUseDefaultRendering
)
if
(
mUseDefaultRendering
)
...
...
This diff is collapsed.
Click to expand it.
glfw/glow-extras/glfw/GlfwApp.hh
+
5
−
0
View file @
68be07a2
...
@@ -175,6 +175,11 @@ public:
...
@@ -175,6 +175,11 @@ public:
/// gets the current clipboard content
/// gets the current clipboard content
std
::
string
getClipboardString
()
const
;
std
::
string
getClipboardString
()
const
;
/// Returns true iff the specified mouse button (GLFW_...) is pressed
bool
isMouseButtonPressed
(
int
button
)
const
;
/// Returns true iff the specified key (GLFW_...) is pressed
bool
isKeyPressed
(
int
key
)
const
;
protected
:
protected
:
/// Called once GLOW is initialized. Allocated your resources and init your logic here.
/// Called once GLOW is initialized. Allocated your resources and init your logic here.
virtual
void
init
();
virtual
void
init
();
...
...
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