Refactoring.
This commit is contained in:
parent
b2a47ebefc
commit
319ade258e
@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using SlatedGameToolkit.Framework.Graphics.Render;
|
||||
using SlatedGameToolkit.Framework.Utilities;
|
||||
|
||||
namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
namespace SlatedGameToolkit.Framework.Graphics
|
||||
{
|
||||
public class Camera : IMoveable {
|
||||
private bool viewUpdated = true, projectionUpdated = true, orthographic = false;
|
@ -1,6 +1,6 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
namespace SlatedGameToolkit.Framework.Graphics
|
||||
{
|
||||
public class Camera2D : Camera {
|
||||
public new Vector2 Position {
|
@ -124,7 +124,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Text
|
||||
CharacterMetrics metrics = metricsCache.ComputeIfNonExistent(c, (p) => new CharacterMetrics(glyphIndex, info));
|
||||
//Check if glyph is loaded, if not, throw exception.
|
||||
if (!glyphTexLocations.ContainsKey((c, scale)) || !textures[glyphTexLocations[(c, scale)]].ContainsChar(c, scale)) {
|
||||
throw new FrameworkUsageException(string.Format("Character \'{0}\' was not prepared and is missing!", c));
|
||||
throw new FrameworkUsageException(string.Format("Character \'{0}\' at pixel height {1} was not prepared and is missing!", c, PixelHeight));
|
||||
}
|
||||
|
||||
FontTexture texture = textures[glyphTexLocations[(c, scale)]];
|
||||
|
@ -257,7 +257,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window
|
||||
/// Instantiates a window with the given OpenGL context, or a new context.
|
||||
/// </summary>
|
||||
public WindowContext(string title, int x = -1, int y = -1, int width = 640, int height = 480, bool specialRegions = false, SDL.SDL_WindowFlags options = default(SDL.SDL_WindowFlags)) {
|
||||
Logger.Log(String.Format("Starting openGL window with title \"{0}\"", title));
|
||||
Logger.Log(String.Format("Starting openGL window with title \"{0}\"", title), LogLevel.DEBUG);
|
||||
windowHandle = SDL.SDL_CreateWindow(title, x < 0 ? SDL.SDL_WINDOWPOS_CENTERED : x, y < 0 ? SDL.SDL_WINDOWPOS_CENTERED : y, width, height, SDL.SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS | SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL | SDL.SDL_WindowFlags.SDL_WINDOW_MOUSE_FOCUS | options);
|
||||
if (windowHandle == null) {
|
||||
throw new SDLException();
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using SDL2;
|
||||
using SlatedGameToolkit.Framework.Loaders;
|
||||
using SlatedGameToolkit.Framework.Graphics.Render;
|
||||
@ -12,7 +9,7 @@ using SlatedGameToolkit.Framework.Graphics.Window;
|
||||
using SlatedGameToolkit.Framework.Input.Devices;
|
||||
using SlatedGameToolkit.Framework.StateSystem;
|
||||
using SlatedGameToolkit.Framework.StateSystem.States;
|
||||
using StbTrueTypeSharp;
|
||||
using SlatedGameToolkit.Framework.Graphics;
|
||||
|
||||
namespace SlatedGameToolkit.Tools.Utilities.Playground
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user