Solved

Detect Double-Click (OpenGL)

Posted on 2004-03-23
2
1,137 Views
Last Modified: 2013-12-26
Any methods for detecting a double-click in OpenGL?
0
Comment
Question by:rossryan
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 10664395
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
 

Author Comment

by:rossryan
ID: 10670280
Hmm. OpenGl is lacking some basic functions...

Thanks,
Ryan
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now