Esempio n. 1
0
        /// <summary>
        /// This function draws the particle system. Override from it if you want
        /// to add custom drawing for particles.
        /// </summary>
        /// <param name="gl"></param>
        public override void Draw(OpenGL gl)
        {
            if(DoPreDraw(gl))
            {

                //	Disable lighting.
                SharpGL.SceneGraph.Attributes.Lighting light = new SharpGL.SceneGraph.Attributes.Lighting();
                light.Enable = false;
                light.Set(gl);

                foreach(Particle p in particles)
                    p.Draw(gl);

                light.Restore(gl);

                DoPostDraw(gl);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This function draws the particle system. Override from it if you want
        /// to add custom drawing for particles.
        /// </summary>
        /// <param name="gl"></param>
        public override void Draw(OpenGL gl)
        {
            if (DoPreDraw(gl))
            {
                //	Disable lighting.
                SharpGL.SceneGraph.Attributes.Lighting light = new SharpGL.SceneGraph.Attributes.Lighting();
                light.Enable = false;
                light.Set(gl);

                foreach (Particle p in particles)
                {
                    p.Draw(gl);
                }

                light.Restore(gl);

                DoPostDraw(gl);
            }
        }