Categorygithub.com/gen2brain/raylib-go/raylib
modulepackage
5.5.0+incompatible
Repository: https://github.com/gen2brain/raylib-go.git
Documentation: pkg.go.dev

# Functions

CameraMoveForward - Moves the camera in its forward direction.
CameraMoveRight - Moves the camera target in its current right direction.
CameraMoveToTarget - Moves the camera position closer/farther to/from the camera target.
CameraMoveUp - Moves the camera in its up direction.
CameraPitch - Rotates the camera around its right vector, pitch is "looking up and down" - lockView prevents camera overrotation (aka "somersaults") - rotateAroundTarget defines if rotation is around target or around its position - rotateUp rotates the up direction as well (typically only useful in CAMERA_FREE) NOTE: angle must be provided in radians.
CameraRoll - Rotates the camera around its forward vector Roll is "turning your head sideways to the left or right" Note: angle must be provided in radians.
CameraYaw - Rotates the camera around its up vector Yaw is "looking left and right" If rotateAroundTarget is false, the camera rotates around its position Note: angle must be provided in radians.
Clamp - Clamp float value.
FloatEquals - Check whether two given floats are almost equal.
GetCameraForward - Returns the cameras forward vector (normalized).
GetCameraProjectionMatrix - Returns the camera projection matrix.
GetCameraRight - Returns the cameras right vector (normalized).
GetCameraUp - Returns the cameras up vector (normalized) Note: The up vector might not be perpendicular to the forward vector.
GetCameraViewMatrix - Returns the camera view matrix.
Lerp - Calculate linear interpolation between two floats.
Mat2MultiplyVector2 - Multiplies a vector by a matrix 2x2.
Mat2Radians - Creates a matrix 2x2 from a given radians value.
Mat2Set - Set values from radians to a created matrix 2x2.
Mat2Transpose - Returns the transpose of a given matrix 2x2.
MatrixAdd - Add two matrices.
MatrixDecompose - Decompose a transformation matrix into its rotational, translational and scaling components.
MatrixDeterminant - Compute matrix determinant.
MatrixFrustum - Returns perspective projection matrix.
MatrixIdentity - Returns identity matrix.
MatrixInvert - Invert provided matrix.
MatrixLookAt - Returns camera look-at matrix (view matrix).
MatrixMultiply - Returns two matrix multiplication.
MatrixNormalize - Normalize provided matrix.
MatrixOrtho - Returns orthographic projection matrix.
MatrixPerspective - Returns perspective projection matrix.
MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians).
MatrixRotateX - Returns x-rotation matrix (angle in radians).
MatrixRotateXYZ - Get xyz-rotation matrix (angles in radians).
MatrixRotateY - Returns y-rotation matrix (angle in radians).
MatrixRotateZ - Returns z-rotation matrix (angle in radians).
MatrixRotateZYX - Get zyx-rotation matrix NOTE: Angle must be provided in radians.
MatrixScale - Returns scaling matrix.
MatrixSubtract - Subtract two matrices (left - right).
MatrixToFloat - Converts Matrix to float32 slice.
MatrixToFloatV - Get float array of matrix data.
MatrixTrace - Returns the trace of the matrix (sum of the values along the diagonal).
MatrixTranslate - Returns translation matrix.
MatrixTranspose - Transposes provided matrix.
NewBoundingBox - Returns new BoundingBox.
NewCamera2D - Returns new Camera2D.
NewCamera3D - Returns new Camera3D.
NewColor - Returns new Color.
NewGlyphInfo - Returns new CharInfo.
NewImage - Returns new Image.
NewMat2 - Returns new Mat2.
NewMatrix - Returns new Matrix.
NewQuaternion - Returns new Quaternion.
NewRay - Returns new Ray.
NewRayCollision - Returns new RayCollision.
NewRectangle - Returns new Rectangle.
NewRenderTexture2D - Returns new RenderTexture2D.
NewShader - Returns new Shader.
NewTexture2D - Returns new Texture2D.
NewVector2 - Returns new Vector2.
NewVector3 - Returns new Vector3.
NewVector4 - Returns new Vector4.
NewWave - Returns new Wave.
Normalize - Normalize input value within input range.
QuaternionAdd - Add two quaternions.
QuaternionAddValue - Add quaternion and float value.
QuaternionDivide - Divide two quaternions.
QuaternionEquals - Check whether two given quaternions are almost equal.
QuaternionFromAxisAngle - Returns rotation quaternion for an angle and axis.
QuaternionFromEuler - Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX.
QuaternionFromMatrix - Returns a quaternion for a given rotation matrix.
QuaternionFromVector3ToVector3 - Calculate quaternion based on the rotation from one vector to another.
QuaternionIdentity - Get identity quaternion.
QuaternionInvert - Invert provided quaternion.
QuaternionLength - Compute the length of a quaternion.
QuaternionLerp - Calculate linear interpolation between two quaternions.
QuaternionMultiply - Calculate two quaternion multiplication.
QuaternionNlerp - Calculate slerp-optimized interpolation between two quaternions.
QuaternionNormalize - Normalize provided quaternion.
QuaternionScale - Scale quaternion by float value.
QuaternionSlerp - Calculates spherical linear interpolation between two quaternions.
QuaternionSubtract - Subtract two quaternions.
QuaternionSubtractValue - Subtract quaternion and float value.
QuaternionToAxisAngle - Returns the rotation angle and axis for a given quaternion.
QuaternionToEuler - Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians.
QuaternionToMatrix - Returns a matrix for a given quaternion.
QuaternionTransform - Transform a quaternion given a transformation matrix.
Remap - Remap input value within input range to output range.
UpdateCamera - Update camera position for selected mode Camera mode: CameraFree, CameraFirstPerson, CameraThirdPerson, CameraOrbital or Custom.
UpdateCameraPro - Update camera movement, movement/rotation values should be provided by user.
Vector2Add - Add two vectors (v1 + v2).
Vector2AddValue - Add vector and float value.
Vector2Angle - Calculate angle from two vectors in radians.
Vector2Clamp - Clamp the components of the vector between min and max values specified by the given vectors.
Vector2ClampValue - Clamp the magnitude of the vector between two min and max values.
Vector2Cross - Calculate the cross product of a vector and a value.
Vector2CrossProduct - Calculate two vectors cross product.
Vector2Distance - Calculate distance between two vectors.
Vector2DistanceSqr - Calculate square distance between two vectors.
Vector2Divide - Divide vector by vector.
Vector2DotProduct - Calculate two vectors dot product.
Vector2Equals - Check whether two given vectors are almost equal.
Vector2Invert - Invert the given vector.
Vector2Length - Calculate vector length.
Vector2LengthSqr - Calculate vector square length.
Vector2LenSqr - Returns the len square root of a vector.
Vector2Lerp - Calculate linear interpolation between two vectors.
Vector2LineAngle - Calculate angle defined by a two vectors line NOTE: Parameters need to be normalized.
Vector2MoveTowards - Move Vector towards target.
Vector2Multiply - Multiply vector by vector.
Vector2Negate - Negate vector.
Vector2Normalize - Normalize provided vector.
Vector2One - Vector with components value 1.0.
Vector2Reflect - Calculate reflected vector to normal.
Vector2Rotate - Rotate vector by angle.
Vector2Scale - Scale vector (multiply by value).
Vector2Subtract - Subtract two vectors (v1 - v2).
Vector2SubtractValue - Subtract vector by float value.
Vector2Transform - Transforms a Vector2 by a given Matrix.
Vector2Zero - Vector with components value 0.0.
Vector3Add - Add two vectors.
Vector3AddValue - Add vector and float value.
Vector3Angle - Calculate angle between two vectors.
Vector3Barycenter - Barycenter coords for p in triangle abc.
Vector3Clamp - Clamp the components of the vector between min and max values specified by the given vectors.
Vector3ClampValue - Clamp the magnitude of the vector between two values.
Vector3CrossProduct - Calculate two vectors cross product.
Vector3Distance - Calculate distance between two vectors.
Vector3DistanceSqr - Calculate square distance between two vectors.
Vector3Divide - Divide vector by vector.
Vector3DotProduct - Calculate two vectors dot product.
Vector3Equals - Check whether two given vectors are almost equal.
Vector3Invert - Invert the given vector.
Vector3Length - Calculate vector length.
Vector3LengthSqr - Calculate vector square length.
Vector3Lerp - Calculate linear interpolation between two vectors.
Vector3Max - Return max value for each pair of components.
Vector3Min - Return min value for each pair of components.
Vector3Multiply - Multiply vector by vector.
Vector3Negate - Negate provided vector (invert direction).
Vector3Normalize - Normalize provided vector.
Vector3One - Vector with components value 1.0.
Vector3OrthoNormalize - Orthonormalize provided vectors Makes vectors normalized and orthogonal to each other Gram-Schmidt function implementation.
Vector3Perpendicular - Calculate one vector perpendicular vector.
Vector3Project - Calculate the projection of the vector v1 on to v2.
Vector3Reflect - Calculate reflected vector to normal.
Vector3Refract - Compute the direction of a refracted ray v: normalized direction of the incoming ray n: normalized normal vector of the interface of two optical media r: ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface.
Vector3Reject - Calculate the rejection of the vector v1 on to v2.
Vector3RotateByAxisAngle - Rotates a vector around an axis.
Vector3RotateByQuaternion - Transform a vector by quaternion rotation.
Vector3Scale - Scale provided vector.
Vector3Subtract - Subtract two vectors.
Vector3SubtractValue - Subtract vector by float value.
Vector3ToFloatV - Get Vector3 as float array.
Vector3Transform - Transforms a Vector3 by a given Matrix.
Vector3Unproject - Projects a Vector3 from screen space into object space NOTE: We are avoiding calling other raymath functions despite available.
Vector3Zero - Vector with components value 0.0.
Wrap - Wrap input value from min to max.

# Constants

Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer texture attachment type.
Framebuffer texture attachment type.
Framebuffer texture attachment type.
Framebuffer texture attachment type.
Framebuffer texture attachment type.
Framebuffer texture attachment type.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer texture attachment type.
Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more.
Framebuffer texture attachment type.
Blend textures adding colors (alternative).
Blend textures adding colors.
Blend textures considering alpha (default).
Blend premultiplied textures considering alpha.
Blend textures using custom src/dst factors.
Blend textures using custom rgb/alpha separate src/dst factors.
Blend textures multiplying colors.
Blend textures subtracting colors (alternative).
Camera system modes.
Camera system modes.
Camera system modes.
Camera system modes.
Camera projection modes.
Camera projection modes.
Camera system modes.
8 bpp.
2 bpp.
4 bpp (no alpha).
4 bpp (1 bit alpha).
8 bpp.
8 bpp.
4 bpp.
8 bpp.
4 bpp.
4 bpp.
4 bpp.
GL_COMPUTE_SHADER.
Automatically detect layout type.
Layout is defined by a 4x3 cross with cubemap faces.
Layout is defined by a 3x4 cross with cubemap faces.
Layout is defined by a horizontal line with faces.
Layout is defined by a vertical line with faces.
Some basic Defines.
GL_DYNAMIC_COPY.
GL_DYNAMIC_DRAW.
GL_DYNAMIC_READ.
Anisotropic filtering 16x.
Anisotropic filtering 4x.
Anisotropic filtering 8x.
Linear filtering.
No filter, just pixel aproximation.
Trilinear filtering (linear with mipmaps).
Set to run program in borderless windowed mode.
Set to run program in fullscreen.
Set to try enabling interlaced video format (for V3D).
Set to try enabling MSAA 4X.
Set to try enabling V-Sync on GPU.
Set to allow windows running while minimized.
Set to hide window.
Set to support HighDPI.
Set to maximize window (expanded to monitor).
Set to minimize window (iconify).
Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED.
Set to allow resizable window.
Set to window always on top.
Set to allow transparent window.
Set to disable window decoration (frame and buttons).
Set to window non focused.
GL_FLOAT.
Bitmap font generation, no anti-aliasing.
Default font generation, anti-aliased.
SDF font generation, requires external shader.
GL_FRAGMENT_SHADER.
Gamepad back trigger left, pressure level: [1..-1].
Gamepad left stick X axis.
Gamepad left stick Y axis.
Gamepad back trigger right, pressure level: [1..-1].
Gamepad right stick X axis.
Gamepad right stick Y axis.
Gamepad left DPAD down button.
Gamepad left DPAD left button.
Gamepad left DPAD right button.
Gamepad left DPAD up button.
Gamepad joystick pressed button left.
Gamepad top/back trigger left (first), it could be a trailing button.
Gamepad top/back trigger left (second), it could be a trailing button.
Gamepad center buttons, middle one (i.e.
Gamepad center buttons, left one (i.e.
Gamepad center buttons, right one (i.e.
Gamepad right button down (i.e.
Gamepad right button left (i.e.
Gamepad right button right (i.e.
Gamepad right button up (i.e.
Gamepad joystick pressed button right.
Gamepad top/back trigger right (first), it could be a trailing button.
Gamepad top/back trigger right (second), it could be a trailing button.
Unknown button, just for error checking.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Gestures types NOTE: It could be used as flags to enable only some gestures.
Some basic Defines.
Keyboard Alpha Numeric Keys.
Some basic Defines.
Android keys.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Keyboard Number Pad Keys.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
KeyNull is used for no key pressed.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Keyboard Function Keys.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Some basic Defines.
GL_LINES.
Display all logs.
Debug logging, used for internal debugging, it should be disabled on release builds.
Error logging, used on unrecoverable failures.
Fatal logging, used to abort program: exit(EXIT_FAILURE).
Info logging, used for program execution info.
Disable logging.
Trace logging, intended for internal use only.
Warning logging, used on recoverable failures.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Material map index.
Maximum number of texture maps stored in shader struct.
Maximum number of predefined locations stored in shader struct.
GL_MODELVIEW.
Mouse Buttons.
Mouse Buttons.
Mouse Buttons.
Mouse Buttons.
Mouse Buttons.
Mouse Buttons.
Mouse Buttons.
Arrow shape.
Cross shape.
Default pointer shape.
Text writing cursor shape.
The operation-not-allowed shape.
Pointing hand cursor.
The omni-directional resize/move cursor shape.
Horizontal resize/move arrow shape.
The top-right to bottom-left diagonal resize/move arrow shape.
Vertical resize/move arrow shape.
Top-left to bottom-right diagonal resize/move arrow shape.
Some basic Defines.
Some basic Defines.
Some basic Defines.
Npatch layout: 3x3 tiles.
Npatch layout: 3x1 tiles.
Npatch layout: 1x3 tiles.
OpenGL version.
OpenGL version.
OpenGL version.
OpenGL version.
OpenGL version.
Some basic Defines.
GL_PROJECTION.
GL_QUADS.
Some basic Defines.
Shader attribute data types.
Shader attribute data types.
Shader attribute data types.
Shader attribute data types.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader location point type.
Shader uniform type: float.
Shader uniform type: int.
Shader uniform type: ivec2 (2 int).
Shader uniform type: ivec2 (3 int).
Shader uniform type: ivec2 (4 int).
Shader uniform type: sampler2d.
Shader uniform type: unsigned int.
Shader uniform type: uivec2 (2 unsigned int).
Shader uniform type: uivec3 (3 unsigned int).
Shader uniform type: uivec4 (4 unsigned int).
Shader uniform type: vec2 (2 float).
Shader uniform type: vec3 (3 float).
Shader uniform type: vec4 (4 float).
GL_STATIC_COPY.
GL_STATIC_DRAW.
GL_STATIC_READ.
GL_STREAM_COPY.
GL_STREAM_DRAW.
GL_STREAM_READ.
GL_TEXTURE.
Anisotropic filter (custom identifier).
GL_LINEAR.
GL_LINEAR_MIPMAP_NEAREST.
GL_LINEAR_MIPMAP_LINEAR.
GL_NEAREST_MIPMAP_NEAREST.
GL_NEAREST.
GL_NEAREST_MIPMAP_LINEAR.
GL_TEXTURE_MAG_FILTER.
GL_TEXTURE_MIN_FILTER.
Texture mipmap bias, percentage ratio (custom identifier).
GL_CLAMP_TO_EDGE.
GL_MIRROR_CLAMP_EXT.
GL_MIRRORED_REPEAT.
GL_REPEAT.
GL_TEXTURE_WRAP_S.
GL_TEXTURE_WRAP_T.
GL_TRIANGLES.
8*2 bpp (2 channels).
8 bit per pixel (no alpha).
32 bpp (1 channel - float).
32*3 bpp (3 channels - float).
32*4 bpp (4 channels - float).
16 bpp (4 bit alpha).
16 bpp (1 bit alpha).
16 bpp.
24 bpp.
32 bpp.
GL_UNSIGNED_BYTE.
GL_VERTEX_SHADER.
Texture parameters: wrap mode.
Texture parameters: wrap mode.
Texture parameters: wrap mode.
Texture parameters: wrap mode.

# Variables

Beige.
Black.
Blank (Transparent).
Blue.
Brown.
Dark Blue.
Dark Brown.
Dark Gray.
Dark Green.
Dark Purple.
Gold.
Gray.
Green.
Light Gray.
Lime.
Magenta.
Maroon.
Orange.
Pink.
Purple.
Ray White (RayLib Logo White).
Red.
Sky Blue.
Violet.
White.
Yellow.

# Structs

AudioStream type NOTE: Useful to create custom audio streams not bound to a specific file.
AutomationEvent - Automation event.
AutomationEventList - Automation event list.
BoneInfo type.
BoundingBox type.
Camera2D type, defines a 2d camera.
Camera3D type, defines a camera position/orientation in 3d space.
DrawCall - Draw call type NOTE: Only texture changes register a new draw, other state-change-related elements are not used at this moment (vaoId, shaderId, matrices), raylib just forces a batch draw call if any of those state-change happens (this is done in core module).
Font type, includes texture and charSet array data.
GlyphInfo - Font character info.
Image type, bpp always RGBA (32bit) NOTE: Data stored in CPU memory (RAM).
Mat2 type (used for polygon shape rotation matrix).
Material type.
MaterialMap type.
Matrix type (OpenGL style 4x4 - right handed, column major).
Mesh - Vertex data definning a mesh.
Model is struct of model, meshes, materials and animation data.
ModelAnimation type.
Music type (file streaming from memory) NOTE: Anything longer than ~10 seconds should be streamed.
NPatchInfo type, n-patch layout info.
Ray type (useful for raycast).
RayCollision type - ray hit information.
Rectangle type.
RectangleInt32 type.
RenderBatch type.
RenderTexture2D type, for texture rendering.
Shader type (generic shader).
Sound source type.
Texture2D type, bpp always RGBA (32bit) NOTE: Data stored in GPU memory.
Transform type.
Vector2 type.
Vector3 type.
Vector4 type.
VertexBuffer - Dynamic vertex buffers (position + texcoords + colors + indices arrays).
VrDeviceInfo, Head-Mounted-Display device parameters.
VrStereoConfig, VR stereo rendering configuration for simulator.
Wave type, defines audio wave data.

# Interfaces

Asset file.

# Type aliases

AudioCallback function.
BlendMode type.
Camera type fallback, defaults to Camera3D.
CameraMode type.
CameraProjection type.
Color type, RGBA (32bit) TODO remove later, keep type for now to not break code.
FramebufferAttachTextureType type.
FramebufferAttachType type.
Gestures type.
GlVersion type.
Mouse cursor.
N-patch layout.
PixelFormat - Texture format.
Quaternion, 4 components (Vector4 alias).
ShaderAttributeDataType type.
ShaderUniformDataType type.
TextureFilterMode - Texture filter mode.
TextureWrapMode - Texture wrap mode.
TraceLogCallbackFun - function that will recive the trace log messages.
TraceLogLevel parameter of trace log message.