[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23209] trunk/blender/source/blender/ editors/space_view3d/drawobject.c: Smoke:
Daniel Genrich
daniel.genrich at gmx.net
Mon Sep 14 12:37:13 CEST 2009
Revision: 23209
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23209
Author: genscher
Date: 2009-09-14 12:37:13 +0200 (Mon, 14 Sep 2009)
Log Message:
-----------
Smoke:
* put another drawing method in to test for broken
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawobject.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c 2009-09-14 10:21:41 UTC (rev 23208)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c 2009-09-14 10:37:13 UTC (rev 23209)
@@ -5360,12 +5360,57 @@
{
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);
More information about the Bf-blender-cvs
mailing list