Halt
Hardware accelerated terminal
 All Classes Functions Variables
Public Member Functions
halt::Terminal Class Reference

Terminal emulator object. This object is responsible for the creation and management of Halt objects that in turn create and manage OpenGL resources directly. More...

#include <Terminal.h>

List of all members.

Public Member Functions

HALT_API Terminal (int width, int height, int depth, const CharacterSize &cdim)
 Creates a terminal object.
HALT_API void Clear (int z)
 Clears an entire layer to null. This uses cell value 0.
HALT_API void Fill (int value, int color, int x1, int y1, int x2, int y2, int z)
 Writes a rectangle to the terminal buffer.
HALT_API void Put (int value, int color, int x, int y, int z)
 Writes a single character to the terminal buffer.
HALT_API void PutString (const char *value, int color, int x, int y, int z)
 Writes an entire string to the terminal buffer, starting at the point denoted by x and y.
HALT_API void Draw ()
 Renders the terminal buffer.
HALT_API void SetTexture (unsigned int handle)
 Sets the texture used to render cell values from.
HALT_API void SetShader (TerminalShader *shader)
 Sets the currently active terminal shader.
HALT_API void SetCharacterMap (CharacterMap *map)
 Sets the character map to use when translating cell values to texture coordinates.
HALT_API int GetWidth () const
 Gets the width of the terminal in cells.
HALT_API int GetHeight () const
 Gets the height of the terminal in cells.
HALT_API int GetDepth () const
 Gets the depth of the terminal in cells.

Detailed Description

Terminal emulator object. This object is responsible for the creation and management of Halt objects that in turn create and manage OpenGL resources directly.


Constructor & Destructor Documentation

halt::Terminal::Terminal ( int  width,
int  height,
int  depth,
const CharacterSize &  cdim 
)

Creates a terminal object.

Parameters:
widthWidth of the terminal in cells.
heightHeight of the terminal in cells.
depthDepth of the terminal in cells.
cdimDimension of a cell in pixels.

Member Function Documentation

void halt::Terminal::Clear ( int  z)

Clears an entire layer to null. This uses cell value 0.

Parameters:
zLayer to clear.
void halt::Terminal::Fill ( int  value,
int  color,
int  x1,
int  y1,
int  x2,
int  y2,
int  z 
)

Writes a rectangle to the terminal buffer.

Parameters:
valueCell value to use in the fill process.
colorColor of the cell.
x1Top left corner of the fill area on the X-axis.
y1Top left corner of the fill area on the Y-axis.
x2Bottom right corner of the fill area on the X-axis.
y2Bottom right corner of the fill area on the Y-axis.
zLayer to perform the fill operation on.
int halt::Terminal::GetDepth ( ) const [inline]

Gets the depth of the terminal in cells.

Returns:
The depth of the terminal in cells.
int halt::Terminal::GetHeight ( ) const [inline]

Gets the height of the terminal in cells.

Returns:
The height of the terminal in cells.
int halt::Terminal::GetWidth ( ) const [inline]

Gets the width of the terminal in cells.

Returns:
The width of the terminal in cells.
void halt::Terminal::Put ( int  value,
int  color,
int  x,
int  y,
int  z 
)

Writes a single character to the terminal buffer.

Parameters:
valueCell value to write.
colorColor of the cell.
xWhere to write the character on the X-axis.
yWhere to write the character on the Y-axis.
zWhich layer to write the character to.
void halt::Terminal::PutString ( const char *  value,
int  color,
int  x,
int  y,
int  z 
)

Writes an entire string to the terminal buffer, starting at the point denoted by x and y.

Parameters:
valueString to write. The cell values used are determined by the current character map.
colorColor of the cells to write.
xWhere to start writing the string on the X-axis.
yWhere to start writing the string on the Y-axis.
zWhich layer to write the character to.

Sets the character map to use when translating cell values to texture coordinates.

Parameters:
mapPointer to the character map to be used.
See also:
CharacterMap

Sets the currently active terminal shader.

Parameters:
shaderPointer to the shader to be used. To disable terminal shaders, use NULL or 0.
See also:
TerminalShader
void halt::Terminal::SetTexture ( unsigned int  handle)

Sets the texture used to render cell values from.

Parameters:
handleOpenGL texture handle of the texture to use.

The documentation for this class was generated from the following files:
 All Classes Functions Variables