Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OpenGL
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
C-Fu
OpenGL
Commits
91b65bf6
Commit
91b65bf6
authored
8 years ago
by
Anakin
Browse files
Options
Downloads
Patches
Plain Diff
added drag n drop function,
need to clean up before loading the next mesh
parent
b4bd3144
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
MshViewer/Header/callback.h
+3
-1
3 additions, 1 deletion
MshViewer/Header/callback.h
MshViewer/Source/OpenGlController.cpp
+1
-0
1 addition, 0 deletions
MshViewer/Source/OpenGlController.cpp
MshViewer/Source/callback.cpp
+7
-0
7 additions, 0 deletions
MshViewer/Source/callback.cpp
with
11 additions
and
1 deletion
MshViewer/Header/callback.h
+
3
−
1
View file @
91b65bf6
...
...
@@ -8,4 +8,6 @@ extern void mouseMove(GLFWwindow *window, double xpos, double ypos);
extern
void
mouseWheel
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
);
extern
void
keyPress
(
GLFWwindow
*
window
,
int
key
,
int
scancode
,
int
action
,
int
mods
);
\ No newline at end of file
extern
void
keyPress
(
GLFWwindow
*
window
,
int
key
,
int
scancode
,
int
action
,
int
mods
);
extern
void
dragNdrop
(
GLFWwindow
*
window
,
int
count
,
const
char
**
paths
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
MshViewer/Source/OpenGlController.cpp
+
1
−
0
View file @
91b65bf6
...
...
@@ -179,6 +179,7 @@ void OpenGLController::setCallbackFunctions()
glfwSetWindowSizeCallback
(
pWindow
,
windowResize
);
glfwSetScrollCallback
(
pWindow
,
mouseWheel
);
glfwSetKeyCallback
(
pWindow
,
keyPress
);
glfwSetDropCallback
(
pWindow
,
dragNdrop
);
}
glm
::
mat4
OpenGLController
::
getModelMatrix
(
unsigned
int
index
)
...
...
This diff is collapsed.
Click to expand it.
MshViewer/Source/callback.cpp
+
7
−
0
View file @
91b65bf6
...
...
@@ -98,3 +98,10 @@ void keyPress(GLFWwindow *window, int key, int scancode, int action, int mods)
}
}
}
void
dragNdrop
(
GLFWwindow
*
window
,
int
count
,
const
char
**
paths
)
{
OpenGLController
*
controller
=
reinterpret_cast
<
OpenGLController
*>
(
glfwGetWindowUserPointer
(
window
));
if
(
count
>
0
)
controller
->
loadMsh
(
paths
[
0
]);
}
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