module
Eagle::GPU
Overview
The layer between Eagle and the graphics API. Everything draws through GPU.device,
which is OpenGL 3.3 on desktop and WebGL2 in the browser.
Game code rarely touches this module directly. You meet its enums as arguments
elsewhere: BlendMode for Graphics#blend= and particles, Filter and Wrap for
textures, and UniformValue for shader uniforms. Shaders are written in the common
subset of GLSL 3.30 and GLSL ES 3.00, and each backend adds its own prelude.
Defined in:
eagle/gpu/device.creagle/gpu/gl33.cr
Class Method Summary
-
.device : Device
The active device.
-
.device=(d : Device | Nil)
Sets the active device.
-
.ready? : Bool
True once a device exists.
Class Method Detail
The active device. Raises if called before the engine has started, which usually means
a texture or shader was created too early. Create them in App#load or Node#ready.