Ignore:
Timestamp:
May 2, 2012, 1:47:32 PM (9 years ago)
Author:
sam
Message:

orbital: do not let the world objects know anything about the projection
or view matrix unless strictly necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/particlesystem.h

    r1330 r1332  
    6060            m_ready = true;
    6161        }
    62         mat4 anim = mat4::rotate(m_angle, vec3(0, 1, 0));
    63         mat4 view = mat4::lookat(vec3(0, 2, 0), vec3(0, 0, -4), vec3(0, 1, 0));
    64         mat4 proj = mat4::perspective(45.0f, 640.0f, 480.0f, 0.1f, 10.0f);
    6562
    6663        for (int i = 0; i < m_particles.Count(); i++)
    6764        {
    68             mat4 model = mat4::translate(vec3(0, 0, -4.5))
    69                        * mat4::scale(vec3(0.025))
    70                        * mat4::translate(m_particles[i].m1);
    71             mat4 modelview = view * model * anim;
     65            mat4 model = mat4::translate(vec3(0, 0, -100))
     66                       * mat4::translate(m_particles[i].m1);;
    7267
    73             m_mesh.Render(modelview, proj);
     68            m_mesh.Render(model);
    7469        }
    7570    }
Note: See TracChangeset for help on using the changeset viewer.