Skip to content
Snippets Groups Projects
Commit 922ae26c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent c42fe153
No related branches found
No related tags found
No related merge requests found
......@@ -456,35 +456,26 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick)
if(zmax < CTX::instance()->lc) zmax = CTX::instance()->lc;
if (CTX::instance()->camera) { // if we use the camera mode
double clip_near, clip_far;
clip_near = 0.75 * CTX::instance()->clipFactor * zmax;
clip_far = 75. * CTX::instance()->clipFactor * zmax;
glDisable(GL_DEPTH_TEST);
glPushMatrix();
glLoadIdentity();
double w = (double)viewport[2];
double h = (double)viewport[3];
double ratio = w / h;
// double dx=.5*w*ratio;
// double dy=.5*w;
double dx = 1.5 * tan(camera.radians) * w * ratio;
double dy = 1.5 * tan(camera.radians) * w;
double dz = -w * 1.25;
glBegin(GL_QUADS);
//glColor4ubv((GLubyte *) & CTX::instance()->color.bg);
glColor3d(.8,.8,.95);
glColor4ubv((GLubyte *) & CTX::instance()->color.bg);
glVertex3i((int)-dx, (int)-dy, (int)dz);
glVertex3i((int) dx, (int)-dy, (int)dz);
// glColor4ubv((GLubyte *) & CTX::instance()->color.bgGrad);
glColor3d(.1,.1,.3);
glColor4ubv((GLubyte *) & CTX::instance()->color.bgGrad);
glVertex3i((int) dx, (int)dy, (int)dz);
glVertex3i((int)-dx, (int)dy, (int)dz);
glEnd();
glPopMatrix();
glEnable(GL_DEPTH_TEST);
}
else if(!CTX::instance()->camera){ // if not in camera mode
double clip_near, clip_far;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment