Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
OpenGL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
C-Fu
OpenGL
Commits
91b65bf6
Commit
91b65bf6
authored
Nov 12, 2016
by
Anakin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added drag n drop function,
need to clean up before loading the next mesh
parent
b4bd3144
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
MshViewer/Header/callback.h
MshViewer/Header/callback.h
+3
-1
MshViewer/Source/OpenGlController.cpp
MshViewer/Source/OpenGlController.cpp
+1
-0
MshViewer/Source/callback.cpp
MshViewer/Source/callback.cpp
+7
-0
No files found.
MshViewer/Header/callback.h
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
MshViewer/Source/OpenGlController.cpp
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
)
...
...
MshViewer/Source/callback.cpp
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
]);
}
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