Revision: 41943
http://brlcad.svn.sourceforge.net/brlcad/?rev=41943&view=rev
Author: erikgreenwald
Date: 2011-01-04 20:03:49 +0000 (Tue, 04 Jan 2011)
Log Message:
-----------
quell warnings
Modified Paths:
--------------
brlcad/trunk/src/adrt/librender/camera.c
brlcad/trunk/src/adrt/librender/component.c
brlcad/trunk/src/adrt/librender/cut.c
brlcad/trunk/src/adrt/librender/grid.c
brlcad/trunk/src/adrt/librender/render_internal.h
brlcad/trunk/src/adrt/librender/spall.c
brlcad/trunk/src/adrt/librender/surfel.c
brlcad/trunk/src/adrt/librender/texture_mix.c
Modified: brlcad/trunk/src/adrt/librender/camera.c
===================================================================
--- brlcad/trunk/src/adrt/librender/camera.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/camera.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -44,15 +44,15 @@
#define TIE_SEM_LAST (TIE_SEM_WORKER+1)
struct render_shader_s {
- char *name;
- void (*init)(render_t *, char *);
+ const char *name;
+ void (*init)(render_t *, const char *);
void *dlh; /* dynamic library handle */
struct render_shader_s *next;
};
static struct render_shader_s *shaders = NULL;
-void* render_camera_render_thread(int cpu, void *ptr); /* for bu_parallel */
+void render_camera_render_thread(int cpu, genptr_t ptr); /* for
bu_parallel */
static void render_camera_prep_ortho(render_camera_t *camera);
static void render_camera_prep_persp(render_camera_t *camera);
static void render_camera_prep_persp_dof(render_camera_t *camera);
@@ -408,7 +408,7 @@
void
-*render_camera_render_thread(int cpu, void *ptr)
+render_camera_render_thread(int cpu, genptr_t ptr)
{
render_camera_thread_data_t *td;
int d, n, res_ind, scanline, v_scanline;
@@ -436,7 +436,7 @@
if (*td->scanline == td->tile->size_y)
{
bu_semaphore_release(TIE_SEM_WORKER);
- return 0;
+ return;
}
else
{
@@ -479,7 +479,7 @@
VSCALE(v1.v, td->camera->view_list[d].step_x.v, n);
VADD2(ray.dir.v, ray.dir.v, v1.v);
- VSET(pixel.v, RENDER_CAMERA_BGR, RENDER_CAMERA_BGG,
RENDER_CAMERA_BGB);
+ VSET(pixel.v, (tfloat)RENDER_CAMERA_BGR,
(tfloat)RENDER_CAMERA_BGG, (tfloat)RENDER_CAMERA_BGB);
ray.pos = td->camera->view_list[d].pos;
ray.depth = 0;
@@ -501,7 +501,7 @@
VSCALE(v2.v, td->camera->view_list[0].step_x.v, n);
VADD2(ray.dir.v, v1.v, v2.v);
- VSET(pixel.v, RENDER_CAMERA_BGR, RENDER_CAMERA_BGG,
RENDER_CAMERA_BGB);
+ VSET(pixel.v, (tfloat)RENDER_CAMERA_BGR,
(tfloat)RENDER_CAMERA_BGG, (tfloat)RENDER_CAMERA_BGB);
ray.pos = td->camera->view_list[0].pos;
ray.depth = 0;
@@ -518,7 +518,7 @@
VADD2(ray.pos.v, ray.pos.v, v1.v);
VADD2(ray.pos.v, ray.pos.v, v2.v);
- VSET(pixel.v, RENDER_CAMERA_BGR, RENDER_CAMERA_BGG,
RENDER_CAMERA_BGB);
+ VSET(pixel.v, (tfloat)RENDER_CAMERA_BGR,
(tfloat)RENDER_CAMERA_BGG, (tfloat)RENDER_CAMERA_BGB);
ray.depth = 0;
/* Compute pixel value using this ray */
@@ -554,8 +554,6 @@
}
}
-
- return 0;
}
@@ -563,7 +561,7 @@
render_camera_render(render_camera_t *camera, tie_t *tie, camera_tile_t *tile,
tienet_buffer_t *result)
{
render_camera_thread_data_t td;
- unsigned int i, scanline, ind;
+ unsigned int scanline, ind;
ind = result->ind;
@@ -597,7 +595,7 @@
}
struct render_shader_s *
-render_shader_register(const char *name, void (*init)(render_t *, char *))
+render_shader_register(const char *name, void (*init)(render_t *, const char
*))
{
struct render_shader_s *shader = (struct render_shader_s
*)bu_malloc(sizeof(struct render_shader_s), "shader");
if(shader == NULL)
Modified: brlcad/trunk/src/adrt/librender/component.c
===================================================================
--- brlcad/trunk/src/adrt/librender/component.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/component.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -55,15 +55,15 @@
/* shade solid */
pixel->v[0] = mesh->flags & ADRT_MESH_HIT ? 0.8 : 0.2;
- pixel->v[1] = 0.2;
+ pixel->v[1] = (tfloat)0.2;
pixel->v[2] = mesh->flags & ADRT_MESH_SELECT ? 0.8 : 0.2;
VSUB2(vec.v, ray->pos.v, id.pos.v);
VUNITIZE(vec.v);
VSCALE((*pixel).v, (*pixel).v, VDOT(vec.v, id.norm.v) * 0.8);
} else if (ray->depth) {
- pixel->v[0] += 0.2;
- pixel->v[1] += 0.2;
- pixel->v[2] += 0.2;
+ pixel->v[0] += (tfloat)0.2;
+ pixel->v[1] += (tfloat)0.2;
+ pixel->v[2] += (tfloat)0.2;
}
}
Modified: brlcad/trunk/src/adrt/librender/cut.c
===================================================================
--- brlcad/trunk/src/adrt/librender/cut.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/cut.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -148,7 +148,7 @@
dot = fabs(VDOT( ray->dir.v, hit.id.norm.v));
if (hit.mesh->flags & (ADRT_MESH_SELECT|ADRT_MESH_HIT)) {
- VSET(color.v, hit.mesh->flags & ADRT_MESH_HIT ? 0.9 : 0.2, 0.2,
hit.mesh->flags & ADRT_MESH_SELECT ? 0.9 : 0.2);
+ VSET(color.v, hit.mesh->flags & ADRT_MESH_HIT ? (tfloat)0.9 :
(tfloat)0.2, (tfloat)0.2, hit.mesh->flags & ADRT_MESH_SELECT ? (tfloat)0.9 :
(tfloat)0.2);
} else {
/* Mix actual color with white 4:1, shade 50% darker */
#if 0
@@ -157,7 +157,7 @@
VADD2(color.v, color.v, hit.mesh->attributes->color.v);
VSCALE(color.v, color.v, 0.125);
#else
- VSET(color.v, 0.8, 0.8, 0.7);
+ VSET(color.v, (tfloat)0.8, (tfloat)0.8, (tfloat)0.7);
#endif
}
@@ -178,9 +178,9 @@
}
#endif
- pixel->v[0] += 0.1;
- pixel->v[1] += 0.1;
- pixel->v[2] += 0.1;
+ pixel->v[0] += (tfloat)0.1;
+ pixel->v[1] += (tfloat)0.1;
+ pixel->v[2] += (tfloat)0.1;
}
int
Modified: brlcad/trunk/src/adrt/librender/grid.c
===================================================================
--- brlcad/trunk/src/adrt/librender/grid.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/grid.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -45,13 +45,13 @@
if ((m = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
/* if X or Y lie in the grid paint it white else make it gray */
if (fabs(GRID*id.pos.v[0] - (int)(GRID*id.pos.v[0])) < 0.2*LINE ||
fabs(GRID*id.pos.v[1] - (int)(GRID*id.pos.v[1])) < 0.2*LINE) {
- pixel->v[0] = 0.9;
- pixel->v[1] = 0.9;
- pixel->v[2] = 0.9;
+ pixel->v[0] = (tfloat)0.9;
+ pixel->v[1] = (tfloat)0.9;
+ pixel->v[2] = (tfloat)0.9;
} else {
- pixel->v[0] = 0.1;
- pixel->v[1] = 0.1;
- pixel->v[2] = 0.1;
+ pixel->v[0] = (tfloat)0.1;
+ pixel->v[1] = (tfloat)0.1;
+ pixel->v[2] = (tfloat)0.1;
}
} else {
return;
@@ -62,9 +62,9 @@
angle = VDOT( vec.v, id.norm.v);
VSCALE((*pixel).v, (*pixel).v, (angle*0.9));
- pixel->v[0] += 0.1;
- pixel->v[1] += 0.1;
- pixel->v[2] += 0.1;
+ pixel->v[0] += (tfloat)0.1;
+ pixel->v[1] += (tfloat)0.1;
+ pixel->v[2] += (tfloat)0.1;
}
int
Modified: brlcad/trunk/src/adrt/librender/render_internal.h
===================================================================
--- brlcad/trunk/src/adrt/librender/render_internal.h 2011-01-04 19:57:24 UTC
(rev 41942)
+++ brlcad/trunk/src/adrt/librender/render_internal.h 2011-01-04 20:03:49 UTC
(rev 41943)
@@ -57,7 +57,7 @@
render_free_t *free;
void *data;
struct render_s *next;
- char *shader;
+ const char *shader;
} render_t;
#endif
Modified: brlcad/trunk/src/adrt/librender/spall.c
===================================================================
--- brlcad/trunk/src/adrt/librender/spall.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/spall.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -94,9 +94,9 @@
/* Draw spall Cone */
if (tie_work(&rd->tie, ray, &id, render_arrow_hit, NULL)) {
- pixel->v[0] = 0.4;
- pixel->v[1] = 0.4;
- pixel->v[2] = 0.4;
+ pixel->v[0] = (tfloat)0.4;
+ pixel->v[1] = (tfloat)0.4;
+ pixel->v[2] = (tfloat)0.4;
}
/*
@@ -148,13 +148,13 @@
if (hit.mesh->flags == 1) {
- VSET(color.v, 0.9, 0.2, 0.2);
+ VSET(color.v, (tfloat)0.9, (tfloat)0.2, (tfloat)0.2);
} else {
/* Mix actual color with white 4:1, shade 50% darker */
- VSET(color.v, 1.0, 1.0, 1.0);
- VSCALE(color.v, color.v, 3.0);
+ VSET(color.v, (tfloat)1.0, (tfloat)1.0, (tfloat)1.0);
+ VSCALE(color.v, color.v, (tfloat)3.0);
VADD2(color.v, color.v, hit.mesh->attributes->color.v);
- VSCALE(color.v, color.v, 0.125);
+ VSCALE(color.v, color.v, (tfloat)0.125);
}
#if 0
@@ -173,9 +173,9 @@
}
#endif
- pixel->v[0] += 0.1;
- pixel->v[1] += 0.1;
- pixel->v[2] += 0.1;
+ pixel->v[0] += (tfloat)0.1;
+ pixel->v[1] += (tfloat)0.1;
+ pixel->v[2] += (tfloat)0.1;
}
int
Modified: brlcad/trunk/src/adrt/librender/surfel.c
===================================================================
--- brlcad/trunk/src/adrt/librender/surfel.c 2011-01-04 19:57:24 UTC (rev
41942)
+++ brlcad/trunk/src/adrt/librender/surfel.c 2011-01-04 20:03:49 UTC (rev
41943)
@@ -77,7 +77,7 @@
}
}
- VSET((*pixel).v, 0.8, 0.8, 0.8);
+ VSET((*pixel).v, (tfloat)0.8, (tfloat)0.8, (tfloat)0.8);
}
}
Modified: brlcad/trunk/src/adrt/librender/texture_mix.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_mix.c 2011-01-04 19:57:24 UTC
(rev 41942)
+++ brlcad/trunk/src/adrt/librender/texture_mix.c 2011-01-04 20:03:49 UTC
(rev 41943)
@@ -52,9 +52,7 @@
void texture_mix_work(__TEXTURE_WORK_PROTOTYPE__) {
texture_mix_t *td;
TIE_3 t;
- int i;
-
td = (texture_mix_t *)texture->data;
td->texture1->work(td->texture1, ADRT_MESH(mesh), ray, id, pixel);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits