Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. I have been searching the web for how to make buttons in opengl c++. I want to make a button from either scratch or with the use of a library. I do not want to use glui as I can not place the button in a xy position. If there is any library or code for this. Code for making a button with rectangles and mouse clicks would be great. This have really been a burden to me since I have been searching and trying to learn how to do this for quite some time. I have not started any code on this topic. I know I can make a rectangle and than mouse click functions and finally a visual effect of a button being pressed, though I do not know how to do that. Thanks.
Please send code or a video on how to make a button.

What I have tried:

I have not tried any code yet. I know I can use glut MouseFunc, but I don't know how to make the visual effect. I also don't know how I can use glut MouseFunc as I am knew to this topic.
Posted
Updated 21-Jun-20 20:58pm
v4
Comments
Richard MacCutchan 22-Jun-20 4:10am    
"I also don't know how I can use glut MouseFunc as I am knew to this topic."
Then you should make use of the documentation and online tutorials to learn how to use it.

1 solution

Look at some Stanford Example Code. Found in 5 seconds.
 
Share this answer
 
Comments
Member 14869357 23-Jun-20 11:08am    
This is Wonderful, but how can I use c++ for this
Member 14869357 24-Jun-20 17:10pm    
I saw the code and now to want the language to be c++, not c

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900