Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detect Double-Click (OpenGL)

Posted on 2004-03-23
2
Medium Priority
?
1,177 Views
Last Modified: 2013-12-26
Any methods for detecting a double-click in OpenGL?
0
Comment
Question by:rossryan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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