ERY.AgateLib.ImplBase.DisplayImpl Class Reference

Abstract base class for implementing the Display object. More...

Inherits ERY.AgateLib.DriverImplBase.

List of all members.

Public Member Functions

abstract DisplayWindowImpl CreateDisplayWindow (string title, int clientWidth, int clientHeight, string iconFile, bool startFullscreen, bool allowResize)
 Creates a DisplayWindowImpl derived object.
abstract DisplayWindowImpl CreateDisplayWindow (System.Windows.Forms.Control renderTarget)
 Creates a DisplayWindowImpl derived object.
abstract SurfaceImpl CreateSurface (string fileName)
 Creates a SurfaceImpl derived object.
abstract SurfaceImpl CreateSurface (Size surfaceSize)
 Creates a SurfaceImpl derived object.
SurfaceImpl CreateSurface (int width, int height)
 Creates a SurfaceImpl derived object. Forwards the call to CreateSurface(Size).
abstract FontSurfaceImpl CreateFont (string fontFamily, float sizeInPoints, FontStyle style)
 Creates a FontSurfaceImpl derived object.
void BeginFrame ()
 Must be called at the start of each frame.
void EndFrame ()
 A version of EndFrame must be called at the end of each frame. This version allows the caller to indicate to the implementation whether or not it is preferred to wait for the vertical blank to do the drawing.
void CheckInFrame (string functionName)
 Checks to see whether or not we are currently inside a BeginFrame..EndFrame block, and throws an exception if we are not. This is only meant to be called from functions which must operate between these calls.
void SetDeltaTime (double deltaTime)
 Provides a means to set the value returned by DeltaTime.
abstract void SetClipRect (Rectangle newClipRect)
 Set the current clipping rect.
abstract void PushClipRect (Rectangle newClipRect)
 Pushes a clip rect onto the clip rect stack.
abstract void PopClipRect ()
 Pops the clip rect and restores the previous clip rect.
virtual void Clear ()
 Clears the buffer to black.
abstract void Clear (Color color)
 Clears the buffer to the specified color.
abstract void Clear (Color color, Rectangle dest)
 Clears a region of the buffer to the specified color.
virtual void DrawEllipse (Rectangle rect, Color color)
 Draws an ellipse by making a bunch of connected lines.
abstract void DrawLine (int x1, int y1, int x2, int y2, Color color)
 Draws a line between the two specified end-points.
abstract void DrawLine (Point a, Point b, Color color)
 Draws a line between the two specified endpoints.
virtual void DrawLines (Point[] pt, Color color)
 Draws a bunch of connected points.
abstract void DrawRect (Rectangle rect, Color color)
 Draws the outline of a rectangle.
abstract void FillRect (Rectangle rect, Color color)
 Draws a filled rectangle.
virtual Surface BuildPackedSurface (Size size, SurfacePacker.RectPacker< Surface > packedRects)
 Builds a surface of the specified size, using the information generated by the SurfacePacker.
virtual ScreenMode[] EnumScreenModes ()
 Enumerates a list of screen modes.
abstract void FlushDrawBuffer ()
 Flushes the 2D draw buffer, if applicable.
abstract void SetOrthoProjection (Rectangle region)
 Sets the boundary coordinates of the window.
abstract void DoLighting (LightManager lights)
 Gets all the light settings from the LightManager.

Protected Member Functions

abstract void OnRenderTargetChange (IRenderTarget oldRenderTarget)
 Event raised when the current render target is changed.
abstract void OnRenderTargetResize ()
 Event raised when the render target is resized.
abstract void OnBeginFrame ()
 Called by BeginFrame to let the driver know to do its setup stuff for starting the next render pass.
abstract void OnEndFrame ()
 Called by EndFrame to let the driver know that it's time to swap buffers or whatever is required to finish rendering the frame.

Properties

IRenderTarget RenderTarget [get, set]
 Gets or sets the current render target.
abstract PixelFormat DefaultSurfaceFormat [get]
 The pixelformat that created surfaces should use.
double AlphaThreshold [get, set]
 Gets or sets the threshold value for alpha transparency below which pixels are considered completely transparent, and may not be drawn.
double DeltaTime [get]
 Gets the amount of time in milliseconds that has passed between this frame and the last one.
double FramesPerSecond [get]
 Gets the framerate.
abstract Size MaxSurfaceSize [get]
 Returns the maximum size a surface object can be.
virtual bool VSync [get, set]
 Gets or sets VSync flag. There is no need to call base.VSync if overriding this member.
abstract IDisplayCaps Caps [get]
 Gets the capabilities of the Display object.


Detailed Description

Abstract base class for implementing the Display object.


Member Function Documentation

abstract void ERY.AgateLib.ImplBase.DisplayImpl.OnRenderTargetChange ( IRenderTarget  oldRenderTarget  )  [protected, pure virtual]

Event raised when the current render target is changed.

Parameters:
oldRenderTarget 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.OnRenderTargetResize (  )  [protected, pure virtual]

Event raised when the render target is resized.

abstract DisplayWindowImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateDisplayWindow ( string  title,
int  clientWidth,
int  clientHeight,
string  iconFile,
bool  startFullscreen,
bool  allowResize 
) [pure virtual]

Creates a DisplayWindowImpl derived object.

Parameters:
title 
clientWidth 
clientHeight 
allowResize 
iconFile 
startFullscreen 
Returns:

abstract DisplayWindowImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateDisplayWindow ( System.Windows.Forms.Control  renderTarget  )  [pure virtual]

Creates a DisplayWindowImpl derived object.

abstract SurfaceImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateSurface ( string  fileName  )  [pure virtual]

Creates a SurfaceImpl derived object.

abstract SurfaceImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateSurface ( Size  surfaceSize  )  [pure virtual]

Creates a SurfaceImpl derived object.

SurfaceImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateSurface ( int  width,
int  height 
)

Creates a SurfaceImpl derived object. Forwards the call to CreateSurface(Size).

abstract FontSurfaceImpl ERY.AgateLib.ImplBase.DisplayImpl.CreateFont ( string  fontFamily,
float  sizeInPoints,
FontStyle  style 
) [pure virtual]

Creates a FontSurfaceImpl derived object.

Parameters:
fontFamily 
sizeInPoints 
style 
Returns:

void ERY.AgateLib.ImplBase.DisplayImpl.BeginFrame (  ) 

Must be called at the start of each frame.

void ERY.AgateLib.ImplBase.DisplayImpl.EndFrame (  ) 

A version of EndFrame must be called at the end of each frame. This version allows the caller to indicate to the implementation whether or not it is preferred to wait for the vertical blank to do the drawing.

abstract void ERY.AgateLib.ImplBase.DisplayImpl.OnBeginFrame (  )  [protected, pure virtual]

Called by BeginFrame to let the driver know to do its setup stuff for starting the next render pass.

abstract void ERY.AgateLib.ImplBase.DisplayImpl.OnEndFrame (  )  [protected, pure virtual]

Called by EndFrame to let the driver know that it's time to swap buffers or whatever is required to finish rendering the frame.

void ERY.AgateLib.ImplBase.DisplayImpl.CheckInFrame ( string  functionName  ) 

Checks to see whether or not we are currently inside a BeginFrame..EndFrame block, and throws an exception if we are not. This is only meant to be called from functions which must operate between these calls.

Parameters:
functionName The name of the calling function, for debugging purposes.

void ERY.AgateLib.ImplBase.DisplayImpl.SetDeltaTime ( double  deltaTime  ) 

Provides a means to set the value returned by DeltaTime.

Parameters:
deltaTime 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.SetClipRect ( Rectangle  newClipRect  )  [pure virtual]

Set the current clipping rect.

Parameters:
newClipRect 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.PushClipRect ( Rectangle  newClipRect  )  [pure virtual]

Pushes a clip rect onto the clip rect stack.

Parameters:
newClipRect 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.PopClipRect (  )  [pure virtual]

Pops the clip rect and restores the previous clip rect.

virtual void ERY.AgateLib.ImplBase.DisplayImpl.Clear (  )  [virtual]

Clears the buffer to black.

abstract void ERY.AgateLib.ImplBase.DisplayImpl.Clear ( Color  color  )  [pure virtual]

Clears the buffer to the specified color.

Parameters:
color 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.Clear ( Color  color,
Rectangle  dest 
) [pure virtual]

Clears a region of the buffer to the specified color.

Parameters:
color 
dest 

virtual void ERY.AgateLib.ImplBase.DisplayImpl.DrawEllipse ( Rectangle  rect,
Color  color 
) [virtual]

Draws an ellipse by making a bunch of connected lines.

Info for developers: The base class implements this by calculating points on the circumference of the ellipse, then making a call to DrawLines.

Parameters:
rect 
color 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.DrawLine ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [pure virtual]

Draws a line between the two specified end-points.

Parameters:
x1 
y1 
x2 
y2 
color 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.DrawLine ( Point  a,
Point  b,
Color  color 
) [pure virtual]

Draws a line between the two specified endpoints.

Parameters:
a 
b 
color 

virtual void ERY.AgateLib.ImplBase.DisplayImpl.DrawLines ( Point[]  pt,
Color  color 
) [virtual]

Draws a bunch of connected points.

Info for developers: The base class implements this by making several calls to DrawLine. You may want to override this one to minimize state changes.

Parameters:
pt 
color 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.DrawRect ( Rectangle  rect,
Color  color 
) [pure virtual]

Draws the outline of a rectangle.

Parameters:
rect 
color 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.FillRect ( Rectangle  rect,
Color  color 
) [pure virtual]

Draws a filled rectangle.

Parameters:
rect 
color 

virtual Surface ERY.AgateLib.ImplBase.DisplayImpl.BuildPackedSurface ( Size  size,
SurfacePacker.RectPacker< Surface packedRects 
) [virtual]

Builds a surface of the specified size, using the information generated by the SurfacePacker.

Parameters:
size 
packedRects 
Returns:

virtual ScreenMode [] ERY.AgateLib.ImplBase.DisplayImpl.EnumScreenModes (  )  [virtual]

Enumerates a list of screen modes.

Returns:

abstract void ERY.AgateLib.ImplBase.DisplayImpl.FlushDrawBuffer (  )  [pure virtual]

Flushes the 2D draw buffer, if applicable.

abstract void ERY.AgateLib.ImplBase.DisplayImpl.SetOrthoProjection ( Rectangle  region  )  [pure virtual]

Sets the boundary coordinates of the window.

Parameters:
region 

abstract void ERY.AgateLib.ImplBase.DisplayImpl.DoLighting ( LightManager  lights  )  [pure virtual]

Gets all the light settings from the LightManager.

Parameters:
lights 


Property Documentation

IRenderTarget ERY.AgateLib.ImplBase.DisplayImpl.RenderTarget [get, set]

Gets or sets the current render target.

abstract PixelFormat ERY.AgateLib.ImplBase.DisplayImpl.DefaultSurfaceFormat [get]

The pixelformat that created surfaces should use.

double ERY.AgateLib.ImplBase.DisplayImpl.AlphaThreshold [get, set]

Gets or sets the threshold value for alpha transparency below which pixels are considered completely transparent, and may not be drawn.

double ERY.AgateLib.ImplBase.DisplayImpl.DeltaTime [get]

Gets the amount of time in milliseconds that has passed between this frame and the last one.

double ERY.AgateLib.ImplBase.DisplayImpl.FramesPerSecond [get]

Gets the framerate.

abstract Size ERY.AgateLib.ImplBase.DisplayImpl.MaxSurfaceSize [get]

Returns the maximum size a surface object can be.

virtual bool ERY.AgateLib.ImplBase.DisplayImpl.VSync [get, set]

Gets or sets VSync flag. There is no need to call base.VSync if overriding this member.

abstract IDisplayCaps ERY.AgateLib.ImplBase.DisplayImpl.Caps [get]

Gets the capabilities of the Display object.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo