Angel 3.2
A 2D Game Prototyping Engine
Functions
DrawUtil.h File Reference
#include "../Infrastructure/Vector2.h"

Go to the source code of this file.

Functions

void DrawCross (const Vector2 &point, float size)
 
void DrawPoint (const Vector2 &point, float size)
 
void DrawLine (const Vector2 &from, const Vector2 &to)
 
bool HandleGLErrors ()
 

Detailed Description

A set of C-style utility functions to draw things on the screen. Good for quick debug work.

Definition in file DrawUtil.h.

Function Documentation

void DrawCross ( const Vector2 point,
float  size 
)

Draws a cross on the screen. Will be in whatever color you last passed in to a glColor* function.

Parameters
pointThe point for the center of the cross (in world space)
sizeHow long each arm should be (in GL units)

Definition at line 36 of file DrawUtil.cpp.

void DrawPoint ( const Vector2 point,
float  size 
)

Draws a point on the screen. Will be in whatever color you last passed in to a glColor* function.

Parameters
pointThe point to draw (in world space)
sizeHow large the point should appear (in GL units)

Definition at line 55 of file DrawUtil.cpp.

void DrawLine ( const Vector2 from,
const Vector2 to 
)

Draws a line on the screen. Will be in whatever color you last passed in to a glColor* function.

Parameters
fromThe starting point in world space
toThe ending point in world space

Definition at line 74 of file DrawUtil.cpp.

bool HandleGLErrors ( )

Checks for OpenGL errors and prints any found to the log.

Returns
Whether or not any errors were found.

Definition at line 85 of file DrawUtil.cpp.