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-15 06:05:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-15 06:05:32 +0400
commite59ab6486f9e7285815671044b785c28365d5165 (patch)
tree4a9406c8181a817a8b96243ae167acc740ed20f7 /source/blender/gpu
parent35ab6cabbf62187290e417dba6d8b18cd4fe18de (diff)
parentb1019a56b54294fc91293c5c43ef46d54950ae84 (diff)
svn merge -r41751:41779 ^/trunk/blender
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c28
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c10
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c8
5 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 37745c4c9a0..6b3966b2501 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -468,11 +468,11 @@ void GPU_drawobject_free(DerivedMesh *dm)
}
typedef void (*GPUBufferCopyFunc)(DerivedMesh *dm, float *varray, int *index,
- int *mat_orig_to_new, void *user_data);
+ int *mat_orig_to_new, void *user_data);
static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
- int vector_size, int size, GLenum target,
- void *user, GPUBufferCopyFunc copy_f)
+ int vector_size, int size, GLenum target,
+ void *user, GPUBufferCopyFunc copy_f)
{
GPUBufferPool *pool;
GPUBuffer *buffer;
@@ -546,8 +546,8 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
while(uploaded == GL_FALSE) {
(*copy_f)(dm, varray, cur_index_per_mat, mat_orig_to_new, user);
/* glUnmapBuffer returns GL_FALSE if
- the data store is corrupted; retry
- in that case */
+ * the data store is corrupted; retry
+ * in that case */
uploaded = glUnmapBufferARB(target);
}
}
@@ -924,8 +924,8 @@ static GPUBuffer *gpu_buffer_setup_type(DerivedMesh *dm, GPUBufferType type)
}
buf = gpu_buffer_setup(dm, dm->drawObject, ts->vector_size,
- gpu_buffer_size_from_type(dm, type),
- ts->gl_buffer_type, user_data, ts->copy);
+ gpu_buffer_size_from_type(dm, type),
+ ts->gl_buffer_type, user_data, ts->copy);
return buf;
}
@@ -1144,8 +1144,8 @@ void GPU_buffer_unbind(void)
}
}
GLStates &= !(GPU_BUFFER_VERTEX_STATE | GPU_BUFFER_NORMAL_STATE |
- GPU_BUFFER_TEXCOORD_STATE | GPU_BUFFER_COLOR_STATE |
- GPU_BUFFER_ELEMENT_STATE);
+ GPU_BUFFER_TEXCOORD_STATE | GPU_BUFFER_COLOR_STATE |
+ GPU_BUFFER_ELEMENT_STATE);
for(i = 0; i < MAX_GPU_ATTRIB_DATA; i++) {
if(attribData[i].index != -1) {
@@ -1310,8 +1310,8 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers_v, MVert *mvert,
/* Build VBO */
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffers->vert_buf);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,
- sizeof(VertexBufferFormat) * totvert,
- NULL, GL_STATIC_DRAW_ARB);
+ sizeof(VertexBufferFormat) * totvert,
+ NULL, GL_STATIC_DRAW_ARB);
vert_data = glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
if(vert_data) {
@@ -1359,7 +1359,7 @@ GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
/* Generate index buffer object */
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buffers->index_buf);
glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
- sizeof(unsigned short) * tottri * 3, NULL, GL_STATIC_DRAW_ARB);
+ sizeof(unsigned short) * tottri * 3, NULL, GL_STATIC_DRAW_ARB);
/* Fill the triangle buffer */
tri_data = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
@@ -1429,8 +1429,8 @@ void GPU_update_grid_buffers(GPU_Buffers *buffers_v, DMGridData **grids,
if(buffers->vert_buf) {
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffers->vert_buf);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,
- sizeof(DMGridData) * totvert,
- NULL, GL_STATIC_DRAW_ARB);
+ sizeof(DMGridData) * totvert,
+ NULL, GL_STATIC_DRAW_ARB);
vert_data = glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
if(vert_data) {
for(i = 0; i < totgrid; ++i) {
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 78f5eb52d52..35ef48250cc 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -909,7 +909,7 @@ static void gpu_node_input_socket(GPUNode *node, GPUNodeStack *sock)
gpu_node_input_link(node, sock->link, sock->type);
}
else {
- link = GPU_node_link_create(0);
+ link = GPU_node_link_create(0);
link->ptr1 = sock->vec;
gpu_node_input_link(node, link, sock->type);
}
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index d08d7cf2ead..05b980cd88c 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -596,7 +596,7 @@ static void gpu_verify_repeat(Image *ima)
{
/* set either clamp or repeat in X/Y */
if (ima->tpageflag & IMA_CLAMP_U)
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
else
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
@@ -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);
@@ -809,11 +809,11 @@ void GPU_free_smoke(SmokeModifierData *smd)
if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain)
{
if(smd->domain->tex)
- GPU_texture_free(smd->domain->tex);
+ GPU_texture_free(smd->domain->tex);
smd->domain->tex = NULL;
if(smd->domain->tex_shadow)
- GPU_texture_free(smd->domain->tex_shadow);
+ GPU_texture_free(smd->domain->tex_shadow);
smd->domain->tex_shadow = NULL;
}
}
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index e1a89daf7e2..184eac9519e 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -1208,7 +1208,7 @@ GPUPixelBuffer *gpu_pixelbuffer_create(int x, int y, int halffloat, int numbuffe
pb->numbuffers = numbuffers;
pb->halffloat = halffloat;
- glGenBuffersARB(pb->numbuffers, pb->bindcode);
+ glGenBuffersARB(pb->numbuffers, pb->bindcode);
if (!pb->bindcode[0]) {
fprintf(stderr, "GPUPixelBuffer allocation failed\n");
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;