Solved

Detect Double-Click (OpenGL)

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

635 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