View Single Post
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#5
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: )
Code:
static int donesetup=0;

if(!donesetup) {

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

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