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:
authorTon Roosendaal <ton@blender.org>2003-12-22 00:52:51 +0300
committerTon Roosendaal <ton@blender.org>2003-12-22 00:52:51 +0300
commitec99255c2729b555f34d75c0a2c59f141e327924 (patch)
tree9b8b03fca39f16c2dfc8b05627bda786786fc140 /source/blender/renderconverter
parent16eec383fda747ff97b44e3f93cfc7e0b1033174 (diff)
Phew, a lot of work, and no new features...
Main target was to make the inner rendering loop using no globals anymore. This is essential for proper usage while raytracing, it caused a lot of hacks in the raycode as well, which even didn't work correctly for all situations (textures especially). Done this by creating a new local struct RenderInput, which replaces usage of the global struct Render R. The latter now only is used to denote image size, viewmatrix, and the like. Making the inner render loops using no globals caused 1000s of vars to be changed... but the result definitely is much nicer code, which enables making 'real' shaders in a next stage. It also enabled me to remove the hacks from ray.c Then i went to the task of removing redundant code. Especially the calculus of texture coords took place (identical) in three locations. Most obvious is the change in the unified render part, which is much less code now; it uses the same rendering routines as normal render now. (Note; not for halos yet!) I also removed 6 files called 'shadowbuffer' something. This was experimen- tal stuff from NaN days. And again saved a lot of double used code. Finally I went over the blenkernel and blender/src calls to render stuff. Here the same local data is used now, resulting in less dependency. I also moved render-texture to the render module, this was still in Kernel. (new file: texture.c) So! After this commit I will check on the autofiles, to try to fix that. MSVC people have to do it themselves. This commit will need quite some testing help, but I'm around!
Diffstat (limited to 'source/blender/renderconverter')
-rw-r--r--source/blender/renderconverter/intern/convertBlenderScene.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/source/blender/renderconverter/intern/convertBlenderScene.c b/source/blender/renderconverter/intern/convertBlenderScene.c
index 310000b8624..525fe566056 100644
--- a/source/blender/renderconverter/intern/convertBlenderScene.c
+++ b/source/blender/renderconverter/intern/convertBlenderScene.c
@@ -1883,32 +1883,12 @@ void RE_add_render_lamp(Object *ob, int doshadbuf)
}
}
}
-
- if( (R.r.mode & R_SHADOW) && (lar->mode & LA_SHAD)
- && (la->type==LA_SPOT) && doshadbuf ) {
+
+ if( (R.r.mode & R_SHADOW) && (lar->mode & LA_SHAD) && (la->type==LA_SPOT) && doshadbuf ) {
/* Per lamp, one shadow buffer is made. */
- if (R.r.mode & R_UNIFIED) {
- int mode;
- /* For the UR, I want to stick to the cpp version. I can
- * put a switch here for the different shadow buffers. At
- * this point, the type of shadow buffer is
- * determined. The actual calculations are done during the
- * render pre operations. */
- if (lar->mode & LA_DEEP_SHADOW) {
- mode = 0; /* dummy, for testing */
- } else if (2) {
- mode = 2; /* old-style buffer */
- }
- lar->shadowBufOb = (void*) RE_createShadowBuffer(lar,
- ob->obmat,
- mode);
- } else {
- RE_createShadowBuffer(lar,
- ob->obmat,
- 1); /* mode = 1 is old buffer */
- }
+ RE_initshadowbuf(lar, ob->obmat);
}
-
+
lar->org= MEM_dupallocN(lar);
}
@@ -2704,12 +2684,6 @@ void RE_freeRotateBlenderScene(void)
/* FREE */
for(a=0; a<R.totlamp; a++) {
-
- /* for the shadow buf object integration */
- if (R.la[a]->shadowBufOb) {
- RE_deleteShadowBuffer((RE_ShadowBufferHandle) R.la[a]->shadowBufOb);
- }
-
if(R.la[a]->shb) {
shb= R.la[a]->shb;
v= (shb->size*shb->size)/256;
@@ -2821,8 +2795,6 @@ void RE_rotateBlenderScene(void)
ob= ob->id.next;
}
- if(G.special1 & G_HOLO) RE_holoview();
-
/* because of optimal calculation tracking/lattices/etc: and extra where_is_ob here */
base= G.scene->base.first;