Module ggez::context

source ·
Expand description

The context module contains functions and traits related to using the Context type.

Re-exports

Structs

  • A Context is an object that holds on to global resources. It basically tracks hardware state such as the screen, audio system, timers, and so on. Generally this type can not be shared/sent between threads and only one Context can exist at a time. Trying to create a second one will fail. It is fine to drop a Context and create a new one, but this will also close and re-open your game’s window.
  • A builder object for creating a Context.

Traits

  • Used to represent types that can provide a certain context type.
  • Used to represent types that can provide a certain context type in a mutable form. See also Has<T>.

Functions