View Single Post
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
exoticorn: Right, but have you tried doing this once in main() instead, and the glViewport(), etc., to see if this is the source of your performance hit?

(or if you want to stay hacky just leave them where they are, but put them in something like: )
static int donesetup=0;

if(!donesetup) {

         XGetWindowAttributes(dpy, win, &gwa);
         glViewport(0, 0, gwa.width, gwa.height);
         glClearColor(0, 1, 0, 1);
         donesetup = 1;

Last edited by kwotski; 2009-12-16 at 11:57.