예제 #1
0
 /// <summary>
 /// Initializes a new instance of the DerpWindow class.
 /// </summary>
 protected DerpWindow(int width, int height, GraphicsMode mode, string title)
     : base(width, height, mode, title)
 {
     // log some OpenGL information
     Logger.Info("OpenGL context information:");
     Logger.InfoFormat("{0}: {1}", StringName.Vendor, GL.GetString(StringName.Vendor));
     Logger.InfoFormat("{0}: {1}", StringName.Renderer, GL.GetString(StringName.Renderer));
     Logger.InfoFormat("{0}: {1}", StringName.Version, GL.GetString(StringName.Version));
     Logger.InfoFormat("{0}: {1}", StringName.ShadingLanguageVersion, GL.GetString(StringName.ShadingLanguageVersion));
     int numExtensions;
     GL.GetInteger(GetPName.NumExtensions, out numExtensions);
     Logger.DebugFormat("Number available extensions: {0}", numExtensions);
     for (var i = 0; i < numExtensions; i++) Logger.DebugFormat("{0}: {1}", i, GL.GetString(StringNameIndexed.Extensions, i));
     Logger.InfoFormat("Initializing game window: {0}", title);
     // set up GameWindow events
     Resize += OnResize;
     UpdateFrame += OnUpdateFrame;
     // set up frame timer
     FrameTimer = new FrameTimer();
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the DerpWindow class.
        /// </summary>
        protected DerpWindow(GameWindowSettings gws, NativeWindowSettings nws)
            : base(gws, nws)
        {
            // log some OpenGL information
            Logger?.Info("OpenGL context information:");
            Logger?.InfoFormat("{0}: {1}", StringName.Vendor, GL.GetString(StringName.Vendor));
            Logger?.InfoFormat("{0}: {1}", StringName.Renderer, GL.GetString(StringName.Renderer));
            Logger?.InfoFormat("{0}: {1}", StringName.Version, GL.GetString(StringName.Version));
            Logger?.InfoFormat("{0}: {1}", StringName.ShadingLanguageVersion, GL.GetString(StringName.ShadingLanguageVersion));
            int numExtensions;

            GL.GetInteger(GetPName.NumExtensions, out numExtensions);
            Logger?.DebugFormat("Number available extensions: {0}", numExtensions);
            for (var i = 0; i < numExtensions; i++)
            {
                Logger?.DebugFormat("{0}: {1}", i, GL.GetString(StringNameIndexed.Extensions, i));
            }
            Logger?.InfoFormat("Initializing game window: {0}", nws.Title);
            // set up GameWindow events
            // set up frame timer
            FrameTimer = new FrameTimer();
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the DerpWindow class.
        /// </summary>
        protected DerpWindow(int width, int height, GraphicsMode mode, string title)
            : base(width, height, mode, title)
        {
            // log some OpenGL information
            Logger.Info("OpenGL context information:");
            Logger.InfoFormat("{0}: {1}", StringName.Vendor, GL.GetString(StringName.Vendor));
            Logger.InfoFormat("{0}: {1}", StringName.Renderer, GL.GetString(StringName.Renderer));
            Logger.InfoFormat("{0}: {1}", StringName.Version, GL.GetString(StringName.Version));
            Logger.InfoFormat("{0}: {1}", StringName.ShadingLanguageVersion, GL.GetString(StringName.ShadingLanguageVersion));
            int numExtensions;

            GL.GetInteger(GetPName.NumExtensions, out numExtensions);
            Logger.DebugFormat("Number available extensions: {0}", numExtensions);
            for (var i = 0; i < numExtensions; i++)
            {
                Logger.DebugFormat("{0}: {1}", i, GL.GetString(StringNameIndexed.Extensions, i));
            }
            Logger.InfoFormat("Initializing game window: {0}", title);
            // set up GameWindow events
            Resize      += OnResize;
            UpdateFrame += OnUpdateFrame;
            // set up frame timer
            FrameTimer = new FrameTimer();
        }