+ 1
OpenGL Visual C++, how do I erase something I drew with OpenGL?
I made a graph with OpenGL that allows me to draw during run time with an input function I made thing is I want to clear the lines how do I do that?
5 ответов
+ 7
I wonder if system("clear");
might work?
+ 7
@Jacob thx for learning me on that
+ 1
lets assume your drawing function is called "draw()"
make an if statement around it, so under certain condition draw won't be called and your method won't execute on next refresh of screen.
if (cond)
{
draw(function);
}
0
That’s not how it works I stored my class in a vector I clear the vector therefore when it goes through my for loop it’s still there even though draw() is no longer being called on it
0
No it does not work because OpenGL makes its own window system(“CLS”) only clears the output window not OpenGL’s window