• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1197
  • Last Modified:

Detect Double-Click (OpenGL)

Any methods for detecting a double-click in OpenGL?
0
rossryan
Asked:
rossryan
1 Solution
 
sunnycoderCommented:
Google shown none ....
two workarounds come to mind
1. use a win32 API for detecting mouse clicks
2. If you want to do it in opengl only, in your mouse callback, set a static/global variable to the current time
in that function

gloabl var last_time

mouse_callback ()
{
  curr = get_current_time()
  if ( curr - last_time  < delta )  // delta is some small value ... if mouse is clicked twice in less than delta time, then we consider it a double click
          //double click
}
0
 
rossryanAuthor Commented:
Hmm. OpenGl is lacking some basic functions...

Thanks,
Ryan
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now