public GraphicsManager(GameManager parent_)
 {
     this._parent    = parent_;
     this._texLoader = new TextureLoader();
     xConsole.WriteLine("OpenGL - " + PulseeGL.GetGLVersion());
     return;
 }
Exemple #2
0
        protected override void OnResize(EventArgs e)
        {
            #region Trying to maintain the ratio (but whatever)

            /**
             * Trying to maintain the size ratio when the window is resized
             *
             * WHAT IF JUST REMOVE THAT FEATURE ? JUST MAKE IT NON RESIZABLE AND ALL WILL BE FINE
             * jesus !
             *
             * */

            /*
             * if (this.Width > this.oldWidth || this.Width < this.oldWidth)
             * {
             *  this.Height = (int)Math.Ceiling((double) this.Width *
             *      (this.Height / this._actualResolution.Item1));
             * }
             *
             * if (this.Height > this.oldHeight)
             * {
             *  this.Width = (int)Math.Floor((double) this.Height *
             *      (this._actualResolution.Item1 / this._actualResolution.Item2));
             * }*/
            #endregion

            PulseeGL.GLOnResize();
            return;
        }
Exemple #3
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            // TODO: render input manager update with pressed buttons (inputMgrRender)
            this.SwapBuffers();
            PulseeGL.GLDrawScene();

            this.ChangeTitle("GUI Window - " + Math.Round(Math.Ceiling(this.RenderFrequency), 0) + " ~~ " + Width + "x" + Height);
            return;
        }
Exemple #4
0
        public GameManager()
        {
            xConsole.WriteLine("Loading game manager...");

            this.dim  = new DisplayManager(this);
            this.grm  = new GraphicsManager(this);
            this.gasm = new GameStatesManager(this);
            gom       = new GameObjectManager();

            PulseeGL.GLSetContext(this);

            return;
        }
Exemple #5
0
        public static void PrintLogoOnScreen(GameManager parent_)
        {
            xConsole.WriteLine("Opening.PrintLogoOnScreen()", ConsoleColor.Red);

            if (Alpha_currentStep == null || Alpha_totalStep == null)
            {
                Alpha_currentStep = 0;
                Alpha_totalStep   = 100;
            }

            if (_parent == null)  //just in case y'know
            {
                _parent = parent_;
            }

            PulseeGL.LoadSingle(_splashPath);


            return;
        }