Example #1
0
 virtual void mouseDown(int x, int y, int button) {
   if (button) {
     body.clear();
     rePaint();
   } else {
     if (body.empty() || x != body[body.size() - 2] || x != body[body.size() - 1]) {
       body.push_back(x);
       body.push_back(y);
       rePaint();
     }
   }
 }
Example #2
0
void PGE_Window::clean()
{
    if(window==NULL) return;
    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    //Reset modelview matrix
    glLoadIdentity();
    glFlush();
    rePaint();
}