public static Canvas GetFullScreenCanvas(Mode mode) { if (MyVideoDriver == null) return MyVideoDriver = new VBEScreen(mode); /* We have already got a VideoDriver istance simple change its mode */ MyVideoDriver.Mode = mode; return MyVideoDriver; }
protected override void BeforeRun() { Console.WriteLine("Cosmos booted successfully. Let's go in Graphic Mode"); canvas = FullScreenCanvas.GetFullScreenCanvas(); //VGA.SetGraphicsMode(ScreenSize.Size320x200, ColorDepth.BitDepth8); //VScreen.SetMode(ScreenSize.Size640x480, Bpp.Bpp32); //VScreen.SetMode(ScreenSize.Size320x200, Bpp.Bpp32); }
public void initScreen() { try { canv = System.Settings.currentCanvas; w = canv.Mode.Rows; h = canv.Mode.Columns; buffer = new Color[w * h]; this.Clear(Color.Red); this.Clear(BackColor); } catch (Exception e) { System.Settings.kernel.BSOD(e.Message, "Error while intializing screen.", 001); } }
public static void InitialiseGraphics() { try { if (aCanvas == null) { aCanvas = CGS.FullScreenCanvas.GetFullScreenCanvas(new CGS.Mode(1280, 720, CGS.ColorDepth.ColorDepth32)); Console.WriteLine("Initiated Graphics!"); } else { CustomConsole.WarningLog("Graphics already initialised"); } } catch (Exception e) { CustomConsole.ErrorLog(e.ToString()); } }