All functions start with the prefix tl.
Initializes the window and environment.
No arguments
Checks if window should close. Returns a boolean.
No arguments
Sets all pixels to one color.
Arguments:
tlColor color
Adds a mesh to the scene. The filename becomes the name of the mesh and the triangles are set to the given color.
Returns the index of the new mesh in the list.
Arguments:
std::string filePathPosition3 positiontlColor color
Draws all meshes added to the scene. Must be called every frame. The argument specifies whether the triangles drawn are filled.
Arguments:
bool trianglesFilled
Returns the current Frames Per Second.
The camera is handled automatically, but you can change the movement speed with this function.
Arguments:
float newSpeed
Set the Field Of View of the camera.
Arguments:
float newFov
Moves a mesh by the given delta. Mesh can be specified by name.
Arguments Overload 1:
uint32_t indexPosition3 deltaPos
Arguments Overload 2:
std::string namePosition3 deltaPos
Rotates a mesh by the given delta. Mesh can be specified by name.
Arguments Overload 1:
uint32_t indexRotation3 deltaRot
Arguments Overload 2:
std::string nameRotation3 deltaRot
Scales a mesh by a uniform value or a non-uniform Scale3. Mesh can be specified by name.
Arguments Overload 1:
uint32_t indexfloat deltaScale
Arguments Overload 2:
std::string namefloat deltaScale
Arguments Overload 3:
uint32_t indexScale3 deltaUniformScale
Arguments Overload 4:
std::string nameScale3 deltaUniformScale
Checks if a key or mouse button is down. Returns true while down.
Arguments Overload 1:
TLMouseBtn btn
Arguments Overload 2:
TLKey key
Checks if a key or mouse button is up. Returns true while up.
Arguments Overload 1:
TLMouseBtn btn
Arguments Overload 2:
TLKey key
Checks if a key or mouse button has just been pressed. Returns true only on the first frame when pressed.
Arguments Overload 1:
TLMouseBtn btn
Arguments Overload 2:
TLKey key
Checks if a key or mouse button has just been released. Returns true only on the first frame when released.
Arguments Overload 1:
TLMouseBtn btn
Arguments Overload 2:
TLKey key
Returns the current mouse position.
No arguments
Type for RGBA colors in format 0xAARRGGBB
Structure with floats x and y.
Structure with floats x, y and z.
Structure with floats x, y and z.
Structure with floats pitch, yaw and roll.
All colors are in the namespace TlColors.
Included colors: white, black, red, green, blue, light blue, yellow, cyan, magenta, orange, purple, pink, brown, gray, light gray, dark gray.
Contains all mouse buttons. Used in input functions.
- TL_MOUSE_BTN_LEFT
- TL_MOUSE_BTN_RIGHT
- ...
Contains all keyboard keys. Used in input functions.
- TL_KEY_A
- TL_KEY_B
- ...