mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-12 19:21:40 +00:00
Done FullScreenCanvas api docs
This commit is contained in:
parent
dbfd606a09
commit
8af6adc6d7
1 changed files with 36 additions and 0 deletions
|
|
@ -1,12 +1,23 @@
|
|||
//#define COSMOSDEBUG
|
||||
using Cosmos.HAL;
|
||||
using sys = System;
|
||||
|
||||
namespace Cosmos.System.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// FullScreenCanvas class. Used to set and get full screen canvas.
|
||||
/// </summary>
|
||||
public static class FullScreenCanvas
|
||||
{
|
||||
/// <summary>
|
||||
/// SVGA 2 device.
|
||||
/// </summary>
|
||||
private static PCIDevice SVGAIIDevice = PCI.GetDevice(VendorID.VMWare, DeviceID.SVGAIIAdapter);
|
||||
|
||||
/// <summary>
|
||||
/// Check if SVGA 2 Exists.
|
||||
/// </summary>
|
||||
/// <returns>bool value.</returns>
|
||||
public static bool SVGAIIExist()
|
||||
{
|
||||
if (SVGAIIDevice == null)
|
||||
|
|
@ -17,8 +28,16 @@ namespace Cosmos.System.Graphics
|
|||
return SVGAIIDevice.DeviceExists;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Video driver.
|
||||
/// </summary>
|
||||
private static Canvas MyVideoDriver = null;
|
||||
|
||||
/// <summary>
|
||||
/// Get video driver.
|
||||
/// </summary>
|
||||
/// <returns>Canvas value.</returns>
|
||||
/// <exception cref="sys.ArgumentOutOfRangeException">Thrown if default graphics mode is not suppoted.</exception>
|
||||
private static Canvas GetVideoDriver()
|
||||
{
|
||||
if (SVGAIIExist())
|
||||
|
|
@ -31,6 +50,12 @@ namespace Cosmos.System.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get video driver.
|
||||
/// </summary>
|
||||
/// <param name="mode">Mode.</param>
|
||||
/// <returns>Canvas value.</returns>
|
||||
/// <exception cref="sys.ArgumentOutOfRangeException">Thrown if graphics mode is not suppoted.</exception>
|
||||
private static Canvas GetVideoDriver(Mode mode)
|
||||
{
|
||||
if (SVGAIIExist())
|
||||
|
|
@ -43,6 +68,11 @@ namespace Cosmos.System.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get full screen canvas.
|
||||
/// </summary>
|
||||
/// <returns>Canvas value.</returns>
|
||||
/// <exception cref="sys.ArgumentOutOfRangeException">Thrown if default graphics mode is not suppoted.</exception>
|
||||
public static Canvas GetFullScreenCanvas()
|
||||
{
|
||||
Global.mDebugger.SendInternal($"GetFullScreenCanvas() with default mode");
|
||||
|
|
@ -59,6 +89,12 @@ namespace Cosmos.System.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get full screen canvas.
|
||||
/// </summary>
|
||||
/// <param name="mode">Mode.</param>
|
||||
/// <returns>Canvas value.</returns>
|
||||
/// <exception cref="sys.ArgumentOutOfRangeException">Thrown if graphics mode is not suppoted.</exception>
|
||||
public static Canvas GetFullScreenCanvas(Mode mode)
|
||||
{
|
||||
Global.mDebugger.SendInternal($"GetFullScreenCanvas() with mode" + mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue