projects
/
fishladder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zoom offset
[fishladder.git]
/
vg
/
vg.h
diff --git
a/vg/vg.h
b/vg/vg.h
index 190b9e96f0e9b34f6db165fb19b1d36a9e7f4828..6e2d0ff48b0cb896598596ebbfdf579aaf6a4e83 100644
(file)
--- a/
vg/vg.h
+++ b/
vg/vg.h
@@
-48,6
+48,7
@@
int vg_window_y = 768;
#endif
v2f vg_mouse;
#endif
v2f vg_mouse;
+v2f vg_mouse_wheel;
v3f vg_mouse_ws;
float vg_time;
v3f vg_mouse_ws;
float vg_time;
@@
-130,7
+131,8
@@
void vg_mouse_callback( GLFWwindow* ptrW, double xpos, double ypos )
void vg_scroll_callback( GLFWwindow* ptrW, double xoffset, double yoffset )
{
void vg_scroll_callback( GLFWwindow* ptrW, double xoffset, double yoffset )
{
-
+ vg_mouse_wheel[0] += xoffset;
+ vg_mouse_wheel[1] += yoffset;
}
void vg_framebuffer_resize_callback( GLFWwindow *ptrW, int w, int h )
}
void vg_framebuffer_resize_callback( GLFWwindow *ptrW, int w, int h )
@@
-247,6
+249,8
@@
static void vg_init( int argc, char *argv[], const char *window_name )
// Main gameloop
while( !glfwWindowShouldClose( vg_window ) )
{
// Main gameloop
while( !glfwWindowShouldClose( vg_window ) )
{
+ v2_copy( (v2f){ 0.0f, 0.0f }, vg_mouse_wheel );
+
glfwPollEvents();
#ifdef VG_STEAM
glfwPollEvents();
#ifdef VG_STEAM