Ejemplo n.º 1
0
        public Game(int windowWidth, int windowHeight, string windowTitle)
        {
            _graphics = new OpenGLGraphicsFactory();
            _window   = _graphics.CreateWindow(windowWidth, windowHeight, windowTitle, false);
            _renderer = _graphics.CreateRenderer();
            _renderer.Init();

            OnUpdate();
            NewGame();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates graphics objects from the specified factory
        /// </summary>
        public static void Initialize( IGraphicsFactory factory )
        {
            s_Factory = factory;
            s_Renderer = factory.CreateRenderer( );
            s_Draw = factory.CreateDraw( );

            //	Effect data sources are created lazily, to remove the dependency
            //	on the effect assembly for applications that don't need it

            factory.Initialize( );
        }