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:
authorDaniel Genrich <daniel.genrich@gmx.net>2009-09-14 14:37:13 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2009-09-14 14:37:13 +0400
commitb0a3224d898fdf58afe6c548dd53307172126856 (patch)
treebd948f990e84568d504b281da1d6de41277e806f
parentce70ed260b45c48ee43e5f13b372cc0d68f76be4 (diff)
Smoke:
* put another drawing method in to test for broken
-rw-r--r--source/blender/editors/space_view3d/drawobject.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c02d45ca798..2c4d72f64ab 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5360,12 +5360,57 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
{
if(!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
{
+// #if0
smd->domain->tex = NULL;
GPU_create_smoke(smd, 0);
draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow);
GPU_free_smoke(smd);
+// #endif
+#if 0
+ int x, y, z;
+ float *density = smoke_get_density(smd->domain->fluid);
+
+ wmLoadMatrix(rv3d->viewmat);
+ // wmMultMatrix(ob->obmat);
+
+ if(col || (ob->flag & SELECT)) cpack(0xFFFFFF);
+ glDepthMask(GL_FALSE);
+ glEnable(GL_BLEND);
+
+
+ // glPointSize(3.0);
+ bglBegin(GL_POINTS);
+
+ for(x = 0; x < smd->domain->res[0]; x++)
+ for(y = 0; y < smd->domain->res[1]; y++)
+ for(z = 0; z < smd->domain->res[2]; z++)
+ {
+ float tmp[3];
+ int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
+
+ if(density[index] > FLT_EPSILON)
+ {
+ float color[3];
+ VECCOPY(tmp, smd->domain->p0);
+ tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5;
+ tmp[1] += smd->domain->dx * y + smd->domain->dx * 0.5;
+ tmp[2] += smd->domain->dx * z + smd->domain->dx * 0.5;
+ color[0] = color[1] = color[2] = 1.0; // density[index];
+ glColor3fv(color);
+ bglVertex3fv(tmp);
+ }
+ }
+
+ bglEnd();
+ glPointSize(1.0);
+
+ wmMultMatrix(ob->obmat);
+ glDisable(GL_BLEND);
+ glDepthMask(GL_TRUE);
+ if(col) cpack(col);
+#endif
}
- else if(smd->domain->wt || (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
+ else if(smd->domain->wt && (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
{
smd->domain->tex = NULL;
GPU_create_smoke(smd, 1);