diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 18:59:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 18:59:55 +0400 |
commit | 617e6a83bc89ca36e18bd06d851a31c010e11db2 (patch) | |
tree | d1347daa3d9a7bf51a0168048247cfe1ce13a4ee /source/blender/editors/screen | |
parent | 8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (diff) |
object/paint/misc-files: floats were being implicitly promoted to doubles, adjust to use floats.
- also UV angle stretching was using radians->deg which wasn't needed.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 22 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index d541550c2a7..2918c98c84a 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -346,7 +346,7 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment float t= (float) i/(nsegments-1); float cur= start + t*angle; - glVertex2f(cos(cur)*radius, sin(cur)*radius); + glVertex2f(cosf(cur)*radius, sinf(cur)*radius); } glEnd(); } @@ -359,7 +359,7 @@ void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments float t= (float) i/(nsegments-1); float cur= start + t*angle; - glVertex2f(cos(cur)*radius, sin(cur)*radius); + glVertex2f(cosf(cur)*radius, sinf(cur)*radius); } glEnd(); } @@ -761,9 +761,9 @@ void bglBegin(int mode) if(mode==GL_POINTS) { float value[4]; glGetFloatv(GL_POINT_SIZE_RANGE, value); - if(value[1]<2.0) { + if(value[1] < 2.0f) { glGetFloatv(GL_POINT_SIZE, value); - pointhack= floor(value[0]+0.5); + pointhack= floor(value[0] + 0.5f); if(pointhack>4) pointhack= 4; } else glBegin(mode); @@ -774,9 +774,9 @@ int bglPointHack(void) { float value[4]; int pointhack_px; glGetFloatv(GL_POINT_SIZE_RANGE, value); - if(value[1]<2.0) { + if(value[1] < 2.0f) { glGetFloatv(GL_POINT_SIZE, value); - pointhack_px= floor(value[0]+0.5); + pointhack_px= floorf(value[0]+0.5f); if(pointhack_px>4) pointhack_px= 4; return pointhack_px; } @@ -789,7 +789,7 @@ void bglVertex3fv(float *vec) case GL_POINTS: if(pointhack) { glRasterPos3fv(vec); - glBitmap(pointhack, pointhack, (float)pointhack/2.0, (float)pointhack/2.0, 0.0, 0.0, Squaredot); + glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot); } else glVertex3fv(vec); break; @@ -802,7 +802,7 @@ void bglVertex3f(float x, float y, float z) case GL_POINTS: if(pointhack) { glRasterPos3f(x, y, z); - glBitmap(pointhack, pointhack, (float)pointhack/2.0, (float)pointhack/2.0, 0.0, 0.0, Squaredot); + glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot); } else glVertex3f(x, y, z); break; @@ -860,7 +860,7 @@ void bglPolygonOffset(float viewdist, float dist) { static float winmat[16], offset=0.0; - if(dist!=0.0) { + if(dist != 0.0f) { float offs; // glEnable(GL_POLYGON_OFFSET_FILL); @@ -872,8 +872,8 @@ void bglPolygonOffset(float viewdist, float dist) /* dist is from camera to center point */ - if(winmat[15]>0.5) offs= 0.00001*dist*viewdist; // ortho tweaking - else offs= 0.0005*dist; // should be clipping value or so... + if(winmat[15]>0.5f) offs= 0.00001f*dist*viewdist; // ortho tweaking + else offs= 0.0005f*dist; // should be clipping value or so... winmat[14]-= offs; offset+= offs; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index d4b547154ed..d07cc61e680 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2776,7 +2776,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e scene->r.cfra -= step; else scene->r.cfra += step; - wt->duration -= ((float)step)/FPS; + wt->duration -= ((double)step)/FPS; } else { /* one frame +/- */ |