Game window class specialized for drawing 2D graphics.
More...
Game window class specialized for drawing 2D graphics.
TriDevs.TriEngine.GameWindow2D.GameWindow2D |
( |
int |
width, |
|
|
int |
height, |
|
|
string |
title, |
|
|
bool |
vsync = true |
|
) |
| |
|
protected |
52 : base(width, height, GraphicsMode.Default, title)
54 VSync = vsync ? VSyncMode.On : VSyncMode.Off;
void TriDevs.TriEngine.GameWindow2D.Initialize |
( |
| ) |
|
|
protected |
98 GL.Viewport(0, 0, ClientRectangle.Width, ClientRectangle.Height);
100 GL.MatrixMode(MatrixMode.Projection);
104 GL.Ortho(0, ClientRectangle.Width - 1, ClientRectangle.Height - 1, 0, -1, 1);
106 GL.MatrixMode(MatrixMode.Modelview);
111 GL.Enable(EnableCap.Blend);
112 GL.BlendEquation(BlendEquationMode.FuncAdd);
113 GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
121 Helpers.Exceptions.Throw(ex,
"Initialization of 2D game window failed during OpenGL setup!");
abstract void TriDevs.TriEngine.GameWindow2D.OnDraw |
( |
FrameEventArgs |
e | ) |
|
|
protectedpure virtual |
override void TriDevs.TriEngine.GameWindow2D.OnLoad |
( |
EventArgs |
e | ) |
|
|
protected |
sealed override void TriDevs.TriEngine.GameWindow2D.OnRenderFrame |
( |
FrameEventArgs |
e | ) |
|
|
protected |
83 base.OnRenderFrame(e);
85 GL.Clear(ClearBufferMask.ColorBufferBit);
override void TriDevs.TriEngine.GameWindow2D.OnResize |
( |
EventArgs |
e | ) |
|
|
protected |
63 GL.Viewport(0, 0, ClientRectangle.Width, ClientRectangle.Height);
65 GL.MatrixMode(MatrixMode.Projection);
69 GL.Ortho(0, ClientRectangle.Width - 1, ClientRectangle.Height - 1, 0, -1, 1);
71 GL.MatrixMode(MatrixMode.Modelview);
Color TriDevs.TriEngine.GameWindow2D.ClearColor |
|
getsetprotected |
Gets or sets the clear color for this window.
The documentation for this class was generated from the following file: