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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-27 22:45:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-27 22:45:33 +0400
commit9e07b7fdfdb4703b0ffd323d492e2a0effbe1b52 (patch)
tree6f77f9076a6f9989161e5cda23d41b2e39d94828 /source/blender/src/drawobject.c
parent8999c3d6dd215177dd65527f0425d40d5002b5ec (diff)
parent7f985f33999fa7db78e59cc2559531f82e276fa2 (diff)
Apricot Branch
============== svn merge -r 14561:14567
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r--source/blender/src/drawobject.c149
1 files changed, 0 insertions, 149 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index dc8e4b20966..531269727eb 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -2986,144 +2986,6 @@ static int drawDispList(Base *base, int dt)
return retval;
}
-/* ******************************** */
-
-
-static void draw_particle_system(Base *base, PartEff *paf)
-{
- Object *ob= base->object;
- Particle *pa;
- float ptime, ctime, vec[3], vec1[3], mat[4][4];
- int a, totpart;
-
- pa= paf->keys;
- // FSPARTICLE always rebuild fluid particle system upon change...
- if( (pa==NULL)
- || ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE))
- ) {
- build_particle_system(ob);
- pa= paf->keys;
- if(pa==NULL) return;
- }
-
- myloadmatrix(G.vd->viewmat);
- /* flag abuse... but I need working code too now. This feature doesnt work for per frame animated objects */
- if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
- Mat4MulMat4(mat, paf->imat, ob->obmat);
- mymultmatrix(mat);
- }
-
- if(ob->ipoflag & OB_OFFS_PARTICLE) ptime= give_timeoffset(ob);
- else ptime= 0.0;
- ctime= bsystem_time(ob, (float)(G.scene->r.cfra), ptime);
-
- glPointSize(1.0);
-
- if(paf->stype==PAF_VECT) glBegin(GL_LINES);
- else glBegin(GL_POINTS);
-
- totpart= (paf->disp*paf->totpart)/100;
- for(a=0; a<totpart; a++, pa+=paf->totkey) {
-
- if(ctime > pa->time) {
- if(ctime < pa->time+pa->lifetime) {
-
- if(paf->stype==PAF_VECT) {
- where_is_particle(paf, pa, ctime, vec);
- where_is_particle(paf, pa, ctime+1.0, vec1);
-
- glVertex3fv(vec);
- glVertex3fv(vec1);
- }
- else {
- where_is_particle(paf, pa, ctime, vec);
-
- glVertex3fv(vec);
- }
- }
- }
- }
- glEnd();
-
- myloadmatrix(G.vd->viewmat);
- mymultmatrix(ob->obmat); // bring back local matrix for dtx
-}
-
-static void draw_static_particle_system(Object *ob, PartEff *paf, int dt)
-{
- Particle *pa;
- float ctime, mtime, vec[3], veco[3];
- int a, use_norm=0, totpart;
-
- pa= paf->keys;
- // FSPARTICLE always rebuild upon change...
- if( (pa==NULL)
- || ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE))
- ) {
- build_particle_system(ob);
- pa= paf->keys;
- if(pa==NULL) return;
- }
-
- if(paf->stype==PAF_VECT) {
- if(dt>OB_WIRE) {
-
- /* shaded/texture mode: we still draw solid, so have to set materials */
- if(dt>OB_SOLID) init_gl_materials(ob, 0, 0);
-
- glEnable(GL_LIGHTING);
- set_gl_material(paf->omat);
- use_norm= 1;
- }
- }
- else {
- glPointSize(1.0);
- glBegin(GL_POINTS);
- }
-
- totpart= (paf->disp*paf->totpart)/100;
- for(a=0; a<totpart; a++, pa+=paf->totkey) {
-
- if(paf->stype==PAF_VECT) {
-
- glBegin(GL_LINE_STRIP);
- where_is_particle(paf, pa, pa->time, veco);
-
- mtime= pa->time+pa->lifetime+paf->staticstep;
- for(ctime= pa->time+paf->staticstep; ctime<mtime; ctime+=paf->staticstep) {
-
- where_is_particle(paf, pa, ctime, vec);
-
- if(use_norm) {
- float no[3];
- VECSUB(no, vec, veco);
- glNormal3fv(no);
- }
- glVertex3fv(veco);
- VECCOPY(veco, vec);
- }
-
- glVertex3fv(veco);
- glEnd();
- }
- else {
- mtime= pa->time+pa->lifetime+paf->staticstep-1;
- for(ctime= pa->time; ctime<mtime; ctime+=paf->staticstep) {
- where_is_particle(paf, pa, ctime, vec);
- glVertex3fv(vec);
- }
- }
- }
- if(paf->stype==PAF_VECT) {
- glDisable(GL_LIGHTING);
- set_gl_material(-1);
- }
- else {
- glEnd();
- }
-
-}
-
/* unified drawing of all new particle systems draw types except dupli ob & group */
/* mostly tries to use vertex arrays for speed */
@@ -5106,17 +4968,6 @@ void draw_object(Base *base, int flag)
if (!(base->flag&OB_RADIO)) {
empty_object= draw_mesh_object(base, dt, flag);
if(flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
-
- if(G.obedit!=ob && warning_recursive==0) {
- PartEff *paf = give_parteff(ob);
-
- if(paf) {
- if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */
- if(paf->flag & PAF_STATIC) draw_static_particle_system(ob, paf, dt);
- else if((flag & DRAW_PICKING) == 0) draw_particle_system(base, paf); // selection errors happen to easy
- if(col) cpack(col);
- }
- }
}
break;