How should I search this?

Jan 27, 2017 at 5:29pm
I am trying to find forms using C++ and OpenGL to make a checkerboard and have users click within a box and have a circle fill in the box.

I've tried searching for making circles using OpenGL and setting coordinates to them but many searches are still not letting me find anything on how to limit a user to place a circle within a square on the checkerboard and not where ever they click on screen.
Jan 27, 2017 at 9:23pm
When the user clicks, check the coordinates where he clicked (they should be available in the mouse event handler). If they are not in the bounds of the board, don't draw the circle. If they are in the bounds of the board, figure out which square they are in and center your circle on the center of the square.

I've only worked with OpenGL for a few months, and it was years ago, so I can't help you with what functions to use.

Jan 29, 2017 at 6:01pm
I see makes sense.
I know also using an array in my case helps. I am just struggling to put it all together haha.

Thank you for the help :)
Topic archived. No new replies allowed.