[][src]Crate rusty_gfx

The OpenGL window is (-1.0, -1.0) in the bottom left to (1.0, 1.0) in the top right.

Modules

prelude

Structs

Color

A color with 32-bit float parts from [0.0, 1.0] suitable for OpenGL.

Img

An image that can be drawn using the Window.draw() method. Currently only PNG format is supported.

ImgVertex
Shape

A Shape can be drawn to a Window using its draw_shape() method. Use the provided new_* methods to make a Shape.

ShapeVertex
Sprite
Window

An OpenGL window for displaying graphics. Also the object through which you'll receive input events (mouse, keyboard, etc.)

Enums

ButtonState

Whether a button was pressed or released

ButtonValue

Abstracted button values you may receive (arrow keys and WASD keys combined into directions, for example)

DrawBundle
GameEvent

GameEvent represents game events caused by a user, such as the mouse moving around, buttons being pushed, or the window being closed.

ShapeStyle

Traits

Drawable

Functions

angle_facing
clamp_vec_to_magnitude
new_in_square