- glDrawBuffer(w->drawBuffer);
- glReadBuffer(w->drawBuffer);
+ if (w->drawBuffer == GL_NONE) {
+ glDrawBuffer(GL_BACK);
+ glReadBuffer(GL_BACK);
+ }
+ else {
+ glDrawBuffer(w->drawBuffer);
+ glReadBuffer(w->drawBuffer);
+ }
eyex = dist * cos(w->yrot * DEG2RAD) * cos(w->xrot * DEG2RAD);
eyez = dist * sin(w->yrot * DEG2RAD) * cos(w->xrot * DEG2RAD);
eyey = dist * sin(w->xrot * DEG2RAD);
eyex = dist * cos(w->yrot * DEG2RAD) * cos(w->xrot * DEG2RAD);
eyez = dist * sin(w->yrot * DEG2RAD) * cos(w->xrot * DEG2RAD);
eyey = dist * sin(w->xrot * DEG2RAD);