diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-26 13:09:31 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-26 13:09:31 +0400 |
commit | 18d2dd7e3ae0338829fd61740151f41c21668474 (patch) | |
tree | 53d755b496944c9017c2cda0ac812e7c545f4024 /source/blender/render | |
parent | fc9e0a37f0087d003808a87c26e46ed573ae39dd (diff) | |
parent | f1ed223e34e61777af46d33e5bfc2fc03223a689 (diff) |
Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
Diffstat (limited to 'source/blender/render')
8 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index 020fa57cf94..2bcd39ab71b 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -165,9 +165,9 @@ int RE_RenderInProgress(struct Render *re); void RE_InitRenderCB(struct Render *re); /* use free render as signal to do everything over (previews) */ -void RE_FreeRender (struct Render *re); +void RE_FreeRender(struct Render *re); /* only called on exit */ -void RE_FreeAllRender (void); +void RE_FreeAllRender(void); /* only call on file load */ void RE_FreeAllRenderResults(void); /* for external render engines that can keep persistent data */ @@ -187,22 +187,22 @@ struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name) float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype); /* obligatory initialize call, disprect is optional */ -void RE_InitState (struct Render *re, struct Render *source, struct RenderData *rd, struct SceneRenderLayer *srl, int winx, int winy, rcti *disprect); +void RE_InitState(struct Render *re, struct Render *source, struct RenderData *rd, struct SceneRenderLayer *srl, int winx, int winy, rcti *disprect); /* set up the viewplane/perspective matrix, three choices */ struct Object *RE_GetCamera(struct Render *re); /* return camera override if set */ void RE_SetCamera(struct Render *re, struct Object *camera); void RE_SetEnvmapCamera(struct Render *re, struct Object *cam_ob, float viewscale, float clipsta, float clipend); -void RE_SetWindow (struct Render *re, rctf *viewplane, float clipsta, float clipend); -void RE_SetOrtho (struct Render *re, rctf *viewplane, float clipsta, float clipend); +void RE_SetWindow(struct Render *re, rctf *viewplane, float clipsta, float clipend); +void RE_SetOrtho(struct Render *re, rctf *viewplane, float clipsta, float clipend); void RE_SetPixelSize(struct Render *re, float pixsize); /* option to set viewmatrix before making dbase */ -void RE_SetView (struct Render *re, float mat[4][4]); +void RE_SetView(struct Render *re, float mat[4][4]); /* make or free the dbase */ void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view); -void RE_Database_Free (struct Render *re); +void RE_Database_Free(struct Render *re); /* project dbase again, when viewplane/perspective changed */ void RE_DataBase_ApplyWindow(struct Render *re); diff --git a/source/blender/render/intern/include/raycounter.h b/source/blender/render/intern/include/raycounter.h index 075a6337435..1694273df0e 100644 --- a/source/blender/render/intern/include/raycounter.h +++ b/source/blender/render/intern/include/raycounter.h @@ -50,7 +50,7 @@ typedef struct RayCounter { } RayCounter; #define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).shading.raycounter) -void RE_RC_INFO (RayCounter *rc); +void RE_RC_INFO(RayCounter *rc); void RE_RC_MERGE(RayCounter *rc, RayCounter *tmp); #define RE_RC_COUNT(var) (var)++ diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index 162fa3b7e88..ca9897b652c 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -55,10 +55,10 @@ int testclip(const float v[3]); void zbuffer_shadow(struct Render *re, float winmat[4][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity); void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[4][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]); -void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart *, struct ZSpan *, int, void*), void *data); +void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart *, struct ZSpan *, int, void *), void *data); unsigned short *zbuffer_transp_shade(struct RenderPart *pa, struct RenderLayer *rl, float *pass, struct ListBase *psmlist); -void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int)); +void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void *, int, int, int, int, int)); int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[4][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache); typedef struct APixstr { diff --git a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp index 198577f61c6..18e8ba6cd14 100644 --- a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp @@ -44,7 +44,7 @@ static int RE_rayobject_blibvh_intersect(RayObject *o, Isect *isec); static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob); static void RE_rayobject_blibvh_done(RayObject *o); static void RE_rayobject_blibvh_free(RayObject *o); -static void RE_rayobject_blibvh_bb(RayObject * o, float min[3], float max[3]); +static void RE_rayobject_blibvh_bb(RayObject *o, float min[3], float max[3]); static float RE_rayobject_blibvh_cost(RayObject *UNUSED(o)) { diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h index 07a1cd26c47..5b8a43eab03 100644 --- a/source/blender/render/intern/raytrace/rayobject_internal.h +++ b/source/blender/render/intern/raytrace/rayobject_internal.h @@ -46,7 +46,7 @@ extern "C" { * ... */ -typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data); +typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data); typedef struct RayObjectControl { void *data; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index fbcab8c19d4..0cbb00abed0 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -520,68 +520,68 @@ typedef struct { /* interface */ #include "mikktspace.h" -static int GetNumFaces(const SMikkTSpaceContext * pContext) +static int GetNumFaces(const SMikkTSpaceContext *pContext) { - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; return pMesh->obr->totvlak; } -static int GetNumVertsOfFace(const SMikkTSpaceContext * pContext, const int face_num) +static int GetNumVertsOfFace(const SMikkTSpaceContext *pContext, const int face_num) { - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); return vlr->v4!=NULL ? 4 : 3; } -static void GetPosition(const SMikkTSpaceContext * pContext, float fPos[], const int face_num, const int vert_index) +static void GetPosition(const SMikkTSpaceContext *pContext, float r_co[3], const int face_num, const int vert_index) { //assert(vert_index>=0 && vert_index<4); - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); - const float *co= (&vlr->v1)[vert_index]->co; - copy_v3_v3(fPos, co); + const float *co = (&vlr->v1)[vert_index]->co; + copy_v3_v3(r_co, co); } -static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[], const int face_num, const int vert_index) +static void GetTextureCoordinate(const SMikkTSpaceContext *pContext, float r_uv[2], const int face_num, const int vert_index) { //assert(vert_index>=0 && vert_index<4); - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); MTFace *tface= RE_vlakren_get_tface(pMesh->obr, vlr, pMesh->obr->actmtface, NULL, 0); const float *coord; - if (tface != NULL) { + if (tface != NULL) { coord= tface->uv[vert_index]; - fUV[0]= coord[0]; fUV[1]= coord[1]; + copy_v2_v2(r_uv, coord); } - else if ((coord= (&vlr->v1)[vert_index]->orco)) { - map_to_sphere(&fUV[0], &fUV[1], coord[0], coord[1], coord[2]); + else if ((coord = (&vlr->v1)[vert_index]->orco)) { + map_to_sphere(&r_uv[0], &r_uv[1], coord[0], coord[1], coord[2]); } else { /* else we get un-initialized value, 0.0 ok default? */ - fUV[0]= fUV[1]= 0.0f; + zero_v2(r_uv); } } -static void GetNormal(const SMikkTSpaceContext * pContext, float fNorm[], const int face_num, const int vert_index) +static void GetNormal(const SMikkTSpaceContext *pContext, float r_no[3], const int face_num, const int vert_index) { //assert(vert_index>=0 && vert_index<4); - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); if (vlr->flag & ME_SMOOTH) { const float *n = (&vlr->v1)[vert_index]->n; - copy_v3_v3(fNorm, n); + copy_v3_v3(r_no, n); } else { - negate_v3_v3(fNorm, vlr->n); + negate_v3_v3(r_no, vlr->n); } } -static void SetTSpace(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert) +static void SetTSpace(const SMikkTSpaceContext *pContext, const float fvTangent[3], const float fSign, const int face_num, const int iVert) { //assert(vert_index>=0 && vert_index<4); - SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; - VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); - float * ftang= RE_vlakren_get_nmap_tangent(pMesh->obr, vlr, 1); + SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; + VlakRen *vlr = RE_findOrAddVlak(pMesh->obr, face_num); + float *ftang = RE_vlakren_get_nmap_tangent(pMesh->obr, vlr, 1); if (ftang!=NULL) { copy_v3_v3(&ftang[iVert*4+0], fvTangent); ftang[iVert*4+3]=fSign; diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 96eaa656c36..48a64822aed 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -1532,7 +1532,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen return in; } -static void texco_mapping(ShadeInput* shi, Tex* tex, MTex* mtex, +static void texco_mapping(ShadeInput *shi, Tex *tex, MTex *mtex, const float co[3], const float dx[3], const float dy[3], float texvec[3], float dxt[3], float dyt[3]) { /* new: first swap coords, then map, then trans/scale */ diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index a0267cd65b7..cc9717bd9d2 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -2062,7 +2062,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg) /* ***************** ZBUFFER MAIN ROUTINES **************** */ -void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*, ZSpan*, int, void*), void *data) +void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart *, ZSpan *, int, void *), void *data) { ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE]; ZSpan zspans[16], *zspan; /* 16 = RE_MAX_OSA */ @@ -2531,7 +2531,7 @@ static void zbuffill_sss(ZSpan *zspan, int obi, int zvlnr, } } -void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int)) +void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void *, int, int, int, int, int)) { ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE]; ZSpan zspan; |