Beispiel #1
0
        Gl_saver saver; //HACK this kinda complicates things as GL_saver depends on GlobalInfo and FlurryCluster init's GlobalInfo :P

        #endregion Fields

        #region Constructors

        /*
         * Note: the Flurry base code keeps everything in a global variable named
         * info.  We want to instance it, for multimon support (several separate
         * Flurries), so we allocate several such structures, but to avoid changing
         * the base code, we set info = current->globals before calling into it.
         * Obviously, not thread safe.
         */
        public FlurryCluster(FlurryClusterSpec spec)
        {
            saver=new Gl_saver();//HACK  I dont know if this is correct to initilize GL_saver for every cluster ? Doesn't OpenGL go nutties a little bit?
            saver.OTSetup();
            oldFrameTime = saver.TimeInSecondsSinceStart();

            flurryData = FlurryAlloc(spec);

            // specialize
            //flurryData.numStreams = spec.nStreams;
            //flurryData.currentColorMode = (Types.ColorModes)spec.color;
            //flurryData.streamExpansion = spec.thickness;
            //flurryData.star.rotSpeed = spec.speed;
        }
Beispiel #2
0
        /*
         * Note: the Flurry base code keeps everything in a global variable named
         * info.  We want to instance it, for multimon support (several separate
         * Flurries), so we allocate several such structures, but to avoid changing
         * the base code, we set info = current->globals before calling into it.
         * Obviously, not thread safe.
         */

        public FlurryCluster(FlurryClusterSpec spec)
        {
            saver = new Gl_saver();          //HACK  I dont know if this is correct to initilize GL_saver for every cluster ? Doesn't OpenGL go nutties a little bit?
            saver.OTSetup();
            oldFrameTime = saver.TimeInSecondsSinceStart();

            flurryData = FlurryAlloc(spec);


            // specialize
            //flurryData.numStreams = spec.nStreams;
            //flurryData.currentColorMode = (Types.ColorModes)spec.color;
            //flurryData.streamExpansion = spec.thickness;
            //flurryData.star.rotSpeed = spec.speed;
        }
Beispiel #3
0
        FlurryCoreData FlurryAlloc(FlurryClusterSpec spec)
        {
            int            i;
            FlurryCoreData flurry = new FlurryCoreData();

            flurry.flurryRandomSeed = Tools.RandFlt(0.0f, 300.0f);

            flurry.numStreams       = spec.nStreams;
            flurry.currentColorMode = (Types.ColorModes)spec.color;
            flurry.streamExpansion  = spec.thickness;


            //flurry.numStreams = 5;
            //flurry.streamExpansion = 100;
            //flurry.currentColorMode = Types.ColorModes.tiedyeColorMode;

            for (i = 0; i < Types.MAXNUMPARTICLES; i++)
            {
                flurry.particles[i] = new Particle(flurry);
            }

            flurry.smoke = new Smoke(flurry);
            //InitSmoke(flurry->s);


            flurry.star = new Star(flurry);
            //InitStar(flurry->star);
            flurry.star.rotSpeed = spec.speed;
            //flurry.star.rotSpeed = 1.0f;
            flurry.spark = new Spark[spec.nStreams];
            for (i = 0; i < flurry.spark.Length; i++)
            {
                flurry.spark[i] = new Spark(flurry);
                //InitSpark(flurry->spark[i]);
            }

            return(flurry);
        }
Beispiel #4
0
        FlurryCoreData FlurryAlloc(FlurryClusterSpec spec)
        {
            int i;
            FlurryCoreData flurry = new FlurryCoreData();
            flurry.flurryRandomSeed = Tools.RandFlt(0.0f, 300.0f);

            flurry.numStreams = spec.nStreams;
            flurry.currentColorMode = (Types.ColorModes)spec.color;
            flurry.streamExpansion = spec.thickness;

            //flurry.numStreams = 5;
            //flurry.streamExpansion = 100;
            //flurry.currentColorMode = Types.ColorModes.tiedyeColorMode;

            for (i = 0; i < Types.MAXNUMPARTICLES; i++) {
                flurry.particles[i] = new Particle(flurry);
            }

            flurry.smoke = new Smoke(flurry);
            //InitSmoke(flurry->s);

            flurry.star = new Star(flurry);
            //InitStar(flurry->star);
            flurry.star.rotSpeed = spec.speed;
            //flurry.star.rotSpeed = 1.0f;
            flurry.spark=new Spark[spec.nStreams];
            for (i = 0; i < flurry.spark.Length; i++) {
                flurry.spark[i] = new Spark(flurry);
                //InitSpark(flurry->spark[i]);
            }

            return flurry;
        }