public Window(Point2 size, string title, bool fullScreen, GraphicsMode graphicsMode) : base(size) { //GraphicsMode graphicsMode = new GraphicsMode(new ColorFormat(settings.BitsPerPixel), settings.DepthBufferBits,settings.StencilBufferBits, settings.Antialiasing); m_nativeWindow = new NativeWindow(size.X, size.Y, title, (fullScreen ? GameWindowFlags.Fullscreen : GameWindowFlags.Default), graphicsMode, DisplayDevice.Default); m_windowContext = new GraphicsContext(graphicsMode, m_nativeWindow.WindowInfo); m_windowContext.LoadAll(); ContextManager.Activate(m_windowContext, m_nativeWindow.WindowInfo); m_exists = true; m_nativeWindow.Closed += (s, e) => { m_exists = false; }; GL.ClearColor(0.0f, 0.0f, 0.0f, 0.0f); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); }
public override void Activate() { ContextManager.Activate(m_windowContext, m_nativeWindow.WindowInfo); }