Komodo Engine
C PROJECT_LOGO=
|
Manages all the underlying graphics resources and devices. More...
Public Member Functions | |||
GraphicsManager (Game game) | |||
| |||
void | ApplyChanges () | ||
Applies pending changes to the Microsoft.Xna.Framework.GraphicsDeviceManager. More... | |||
void | Clear (Color clearColor) | ||
Clears the screen with a given Microsoft.Xna.Framework.Color. More... | |||
Texture | CreateTexture (Color[] data, int width, int height) | ||
Creates a new Komodo.Core.Engine.Graphics.Texture from raw Microsoft.Xna.Framework.Color data and dimensions. More... | |||
Texture | CreateTexture (Color[,] data) | ||
Creates a new Komodo.Core.Engine.Graphics.Texture from raw Microsoft.Xna.Framework.Color data. More... | |||
void | Initialize () | ||
Called after all framework resources have been initialized and allocated. More... | |||
void | SetFullscreen (bool isFullscreen, bool shouldApplyChanges=true) | ||
Sets the game window to render either in fullscreen or windowed mode. More... | |||
void | SetResolution (Resolution resolution, bool shouldApplyChanges=true) | ||
Sets the game window resolution. More... | |||
void | ToggleFullscreen (bool shouldApplyChanges=true) | ||
Toggles whether or not the game window renders in fullscreen or windowed mode More... | |||
Public Attributes | |
Viewport | ViewPort => GraphicsDeviceManager.GraphicsDevice.Viewport |
Current Microsoft.Xna.Framework.Graphics.Viewport for the Microsoft.Xna.Framework.Graphics.GraphicsDevice. More... | |
Properties | |
Game | Game [get] |
Reference to current Komodo.Core.Game instance. More... | |
bool? | IsMouseVisible [get, set] |
Whether or not to show the mouse in the game window. More... | |
List< Resolution >??? | Resolutions [get] |
Supported resolutions for the current graphics device. More... | |
GraphicsDeviceManager | GraphicsDeviceManager [get] |
Underlying Microsoft.Xna.Framework.GraphicsDeviceManager, providing access to the underlying Microsoft.Xna.Framework.Graphics.GraphicsDevice. More... | |
SpriteBatch | SpriteBatch [get, set] |
Current Microsoft.Xna.Framework.Graphics.SpriteBatch for the underlying Microsoft.Xna.Framework.Graphics.GraphicsDevice. More... | |
bool | VSync [get, set] |
Whether or not to render using vertical sync. More... | |
Manages all the underlying graphics resources and devices.
void Komodo.Core.Engine.Graphics.GraphicsManager.ApplyChanges | ( | ) |
Applies pending changes to the Microsoft.Xna.Framework.GraphicsDeviceManager.
void Komodo.Core.Engine.Graphics.GraphicsManager.Clear | ( | Color | clearColor | ) |
Clears the screen with a given Microsoft.Xna.Framework.Color.
clearColor | Microsoft.Xna.Framework.Color to clear the Microsoft.Xna.Framework.Graphics.GraphicsDevice with. |
Texture Komodo.Core.Engine.Graphics.GraphicsManager.CreateTexture | ( | Color | data[,] | ) |
Creates a new Komodo.Core.Engine.Graphics.Texture from raw Microsoft.Xna.Framework.Color data.
data | 2D array of Microsoft.Xna.Framework.Color. |
Texture Komodo.Core.Engine.Graphics.GraphicsManager.CreateTexture | ( | Color[] | data, |
int | width, | ||
int | height | ||
) |
Creates a new Komodo.Core.Engine.Graphics.Texture from raw Microsoft.Xna.Framework.Color data and dimensions.
data | 1D array of Microsoft.Xna.Framework.Color. |
width | Width of the Komodo.Core.Engine.Graphics.Texture to generate. |
height | Height of the Komodo.Core.Engine.Graphics.Texture to generate. |
void Komodo.Core.Engine.Graphics.GraphicsManager.Initialize | ( | ) |
Called after all framework resources have been initialized and allocated.
Before Initialize is called, MonoGame will not have set up the Microsoft.Xna.Framework.Graphics.GraphicsDevice yet, preventing Komodo.Core.Engine.Graphics.Texture or Komodo.Core.Engine.Graphics.Model from being generated.
void Komodo.Core.Engine.Graphics.GraphicsManager.SetFullscreen | ( | bool | isFullscreen, |
bool | shouldApplyChanges = true |
||
) |
Sets the game window to render either in fullscreen or windowed mode.
isFullscreen | Whether or not to render in fullscreen. |
shouldApplyChanges | Whether or not to apply the graphics changes immediately. |
void Komodo.Core.Engine.Graphics.GraphicsManager.SetResolution | ( | Resolution | resolution, |
bool | shouldApplyChanges = true |
||
) |
Sets the game window resolution.
resolution | New resolution to display. |
shouldApplyChanges | Whether or not to apply the graphics changes immediately. |
void Komodo.Core.Engine.Graphics.GraphicsManager.ToggleFullscreen | ( | bool | shouldApplyChanges = true | ) |
Toggles whether or not the game window renders in fullscreen or windowed mode
shouldApplyChanges | Whether or not to apply the graphics changes immediately. |
Viewport Komodo.Core.Engine.Graphics.GraphicsManager.ViewPort => GraphicsDeviceManager.GraphicsDevice.Viewport |
Current Microsoft.Xna.Framework.Graphics.Viewport for the Microsoft.Xna.Framework.Graphics.GraphicsDevice.
|
get |
Reference to current Komodo.Core.Game instance.
|
get |
Underlying Microsoft.Xna.Framework.GraphicsDeviceManager, providing access to the underlying Microsoft.Xna.Framework.Graphics.GraphicsDevice.
|
getset |
Whether or not to show the mouse in the game window.
|
get |
Supported resolutions for the current graphics device.
|
getset |
Current Microsoft.Xna.Framework.Graphics.SpriteBatch for the underlying Microsoft.Xna.Framework.Graphics.GraphicsDevice.
|
getset |
Whether or not to render using vertical sync.