Solved

Detect Double-Click (OpenGL)

Posted on 2004-03-23
2
1,139 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

895 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

14 Experts available now in Live!

Get 1:1 Help Now