Esempio n. 1
0
 private Director(uint sprites_capacity, uint draw_helpers_capacity, GraphicsContext context)
 {
     this.m_paused                = false;
     this.m_frame_timer           = new Timer();
     this.m_run_with_scene_called = false;
     this.m_elapsed               = 0.0;
     this.GL                       = new GraphicsContextAlpha(context);
     this.DrawHelpers              = new DrawHelpers(this.GL, draw_helpers_capacity);
     this.SpriteRenderer           = new SpriteRenderer(this.GL, 6u * sprites_capacity);
     this.m_canceled_replace_scene = new HashSet <Scene>();
 }
Esempio n. 2
0
 public ParticleSystem(int max_particles)
 {
     this.GL          = Director.Instance.GL;
     this.m_imm_quads = new ImmediateModeQuads <ParticleSystem.Vertex>(this.GL, (uint)max_particles, new VertexFormat[]
     {
         (VertexFormat)259,
         (VertexFormat)259
     });
     this.m_particles = new ParticleSystem.Particle[max_particles];
     for (int i = 0; i < this.m_particles.Length; i++)
     {
         this.m_particles[i] = new ParticleSystem.Particle();
     }
     this.m_random     = new Math.RandGenerator(0);
     this.Shader       = ParticleSystem.DefaultShader;
     this.Emit         = new ParticleSystem.EmitterParams();
     this.Simulation   = new ParticleSystem.SimulationParams();
     this.m_v0.XYUV.Zw = Math._00;
     this.m_v1.XYUV.Zw = Math._10;
     this.m_v2.XYUV.Zw = Math._01;
     this.m_v3.XYUV.Zw = Math._11;
 }