Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-11 16:00:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-11 16:00:08 +0400
commit094c9799f9926ae37515a1fe0380403ce3298a77 (patch)
tree780f06d65010a80ae7d3c67000af00db89d11a32 /source/blender/gpu
parenteb7bccb39a639683275ed0b80b927cd5eb8264fa (diff)
quiet -Wdouble-promotion warnings
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c4
-rw-r--r--source/blender/gpu/intern/gpu_material.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index d08d7cf2ead..3981e9fac02 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -775,7 +775,7 @@ int GPU_update_image_time(Image *ima, double time)
if (ima->lastupdate<0)
ima->lastupdate = 0;
- if (ima->lastupdate>time)
+ if (ima->lastupdate > (float)time)
ima->lastupdate=(float)time;
if(ima->tpageflag & IMA_TWINANIM) {
@@ -783,7 +783,7 @@ int GPU_update_image_time(Image *ima, double time)
/* check: is the bindcode not in the array? Then free. (still to do) */
- diff = (float)(time-ima->lastupdate);
+ diff = (float)((float)time - ima->lastupdate);
inc = (int)(diff*(float)ima->animspeed);
ima->lastupdate+=((float)inc/(float)ima->animspeed);
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 02ba2eba9e9..397c0e32c69 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1337,8 +1337,8 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
if(world) {
/* exposure correction */
if(world->exp!=0.0f || world->range!=1.0f) {
- linfac= 1.0 + pow((2.0*world->exp + 0.5), -10);
- logfac= log((linfac-1.0f)/linfac)/world->range;
+ linfac= 1.0f + powf((2.0f*world->exp + 0.5f), -10);
+ logfac= logf((linfac-1.0f)/linfac)/world->range;
GPU_link(mat, "set_value", GPU_uniform(&linfac), &ulinfac);
GPU_link(mat, "set_value", GPU_uniform(&logfac), &ulogfac);
@@ -1518,7 +1518,7 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l
if(lamp->mode & LA_HALO)
if(lamp->spotsi > 170.0f)
lamp->spotsi = 170.0f;
- lamp->spotsi= cos(M_PI*lamp->spotsi/360.0);
+ lamp->spotsi= cosf((float)M_PI*lamp->spotsi/360.0f);
lamp->spotbl= (1.0f - lamp->spotsi)*la->spotblend;
lamp->k= la->k;
@@ -1539,7 +1539,7 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l
/* makeshadowbuf */
angle= saacos(lamp->spotsi);
- temp= 0.5f*lamp->size*cos(angle)/sin(angle);
+ temp= 0.5f*lamp->size*cosf(angle)/sinf(angle);
pixsize= (lamp->d)/temp;
wsize= pixsize*0.5f*lamp->size;