while (running){
    ClearScreen();
    Line(0,0, 100,100);
    Line(100,100, 100,0);
    Line(100,0, 0 , 0);
    // other stuff
} 
       
SendToGPU(line, 0, 0, 100, 100)
SendToGPU(line, 100, 1000, 100, 0)
SendToGPU(line, 100, 0, 0, 0)
while(running) {
    TellGPUToExecute();
    // other stuff
}