use RV3D_CAMOB define, theres no reason to use >= comparison either.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 7 Nov 2010 10:36:06 +0000 (10:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 7 Nov 2010 10:36:06 +0000 (10:36 +0000)
also fixed opengl render ortho test.

source/blender/editors/render/render_opengl.c
source/blender/editors/space_view3d/drawobject.c

index eb24919f99b805c88fbfb94157522d73b880df9e..3dfd7e52c30e4f6509b4125a3ab8aa4b90f3273f 100644 (file)
@@ -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 {
index 7d30c404bf09783c333289a0abf23fbd00b3eca4..5c95a6a3026253b671ba49ba09d43379d77c275c 100644 (file)
@@ -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]);