View Full Version : Mouse Callback Function
12-30-2007, 01:01 PM
I wonder if there is any mouse function (opengl) which when you double click on an item in your window or a specific area or in a subwindow to display a message box...?
OpenGL doesn't have any input functions of any kind. You have to look at whatever windowing API you're using to do such things.
12-30-2007, 01:21 PM
if I put
void mymouse(int btn, int state, int x, int y)
if(btn==GLUT_LEFT_BUTTON && state==...) code
by which methods can I display a messagebox contain 4-5 of informations after --> if(btn==GLUT_LEFT_BUTTON && state==...)
That is also provided by your windowing API. GLUT, however, does not provide it, so you have to do it some other way. On Windows, check out MessageBox.
12-31-2007, 06:41 PM
You can also use printf if you just need to dump some debug information. On Windows, your project needs be a console based application, which is probably the case since you are using GLUT.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.