use RV3D_CAMOB define, theres no reason to use >= comparison either.

also fixed opengl render ortho test.
This commit is contained in:
Campbell Barton 2010-11-07 10:36:06 +00:00
parent 89baa67a40
commit 12770dba0e
2 changed files with 4 additions and 4 deletions

@ -134,7 +134,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* render 3d view */
if(rv3d->persp==RV3D_CAMOB && v3d->camera) {
RE_GetCameraWindow(oglrender->re, v3d->camera, scene->r.cfra, winmat);
is_ortho= scene->r.mode * R_ORTHO;
is_ortho= scene->r.mode & R_ORTHO;
}
else {

@ -1238,7 +1238,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
glDisable(GL_LIGHTING);
glDisable(GL_CULL_FACE);
if(rv3d->persp>=2 && cam->type==CAM_ORTHO && ob==v3d->camera) {
if(rv3d->persp==RV3D_CAMOB && cam->type==CAM_ORTHO && ob==v3d->camera) {
facx= 0.5*cam->ortho_scale*caspx;
facy= 0.5*cam->ortho_scale*caspy;
shx= cam->shiftx * cam->ortho_scale;
@ -1247,7 +1247,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
}
else {
fac= cam->drawsize;
if(rv3d->persp>=2 && ob==v3d->camera) fac= cam->clipsta+0.1; /* that way it's always visible */
if(rv3d->persp==RV3D_CAMOB && ob==v3d->camera) fac= cam->clipsta+0.1; /* that way it's always visible */
depth= - fac*cam->lens/16.0;
facx= fac*caspx;
@ -1270,7 +1270,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
glEnd();
if(rv3d->persp>=2 && ob==v3d->camera) return;
if(rv3d->persp==RV3D_CAMOB && ob==v3d->camera) return;
glBegin(GL_LINE_STRIP);
glVertex3fv(vec[2]);