Click to See Complete Forum and Search --> : drawing graphs w/ OpenGL in C++


thickheadedbastard
October 27th, 2006, 07:27 PM
I need help! I'm trying to draw what amounts to a piece of graph paper in C++ and while getting the program to draw points, lines and the grid w/ OpenGL is easy, getting the C++ to cooperate is a pain in the ***...

Simply put, I want to toggle when the points are drawn to the nearest intersection, but I'm not sure where to put it. If I put it before the program takes in the points from the mouse, it won't toggle, it just keeps going to the nearest intersection; if I put it in after the program takes in the points, it just puts them exactly where i click, even it's right next to an intersection, if i don't drop it right on top the intersection, it won't go there. I knowthere's probably some absurdly simple explanation for my problem, but i frankly suck at the simple explanations, if anyone can help, explain it to me word for word, because i'm tired of guessing at it and bashing my head against the wall...