rl

package module
v0.0.0-...-bcf0fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2025 License: Zlib Imports: 17 Imported by: 0

Documentation

Overview

Package raylib - Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

raylib is highly inspired by Borland BGI graphics lib and by XNA framework. raylib could be useful for prototyping, tools development, graphic applications, embedded systems and education.

NOTE for ADVENTURERS: raylib is a programming library to learn videogames programming; no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way.

Index

Constants

View Source
const (
	Pi      = 3.1415927
	Deg2rad = 0.017453292
	Rad2deg = 57.295776
)

Some basic Defines

View Source
const (
	ShaderLocVertexPosition = iota
	ShaderLocVertexTexcoord01
	ShaderLocVertexTexcoord02
	ShaderLocVertexNormal
	ShaderLocVertexTangent
	ShaderLocVertexColor
	ShaderLocMatrixMvp
	ShaderLocMatrixView
	ShaderLocMatrixProjection
	ShaderLocMatrixModel
	ShaderLocMatrixNormal
	ShaderLocVectorView
	ShaderLocColorDiffuse
	ShaderLocColorSpecular
	ShaderLocColorAmbient
	ShaderLocMapAlbedo
	ShaderLocMapMetalness
	ShaderLocMapNormal
	ShaderLocMapRoughness
	ShaderLocMapOcclusion
	ShaderLocMapEmission
	ShaderLocMapHeight
	ShaderLocMapCubemap
	ShaderLocMapIrradiance
	ShaderLocMapPrefilter
	ShaderLocMapBrdf

	ShaderLocMapDiffuse  = ShaderLocMapAlbedo
	ShaderLocMapSpecular = ShaderLocMapMetalness
)

Shader location point type

View Source
const (
	MapAlbedo = iota
	MapMetalness
	MapNormal
	MapRoughness
	MapOcclusion
	MapEmission
	MapHeight
	MapBrdg
	MapCubemap
	MapIrradiance
	MapPrefilter
	MapBrdf

	MapDiffuse  = MapAlbedo
	MapSpecular = MapMetalness
)

Material map index

View Source
const (
	// Maximum number of predefined locations stored in shader struct
	MaxShaderLocations = 32
	// Maximum number of texture maps stored in shader struct
	MaxMaterialMaps = 12
)

Shader and material limits

View Source
const (
	FontDefault = iota // Default font generation, anti-aliased
	FontBitmap         // Bitmap font generation, no anti-aliasing
	FontSdf            // SDF font generation, requires external shader
)

Font type, defines generation method

View Source
const (
	CubemapLayoutAutoDetect       = iota // Automatically detect layout type
	CubemapLayoutLineVertical            // Layout is defined by a vertical line with faces
	CubemapLayoutLineHorizontal          // Layout is defined by a horizontal line with faces
	CubemapLayoutCrossThreeByFour        // Layout is defined by a 3x4 cross with cubemap faces
	CubemapLayoutCrossFourByThree        // Layout is defined by a 4x3 cross with cubemap faces
)

Cubemap layouts

View Source
const (
	// Texture parameters (equivalent to OpenGL defines)
	TextureWrapS     = 0x2802 // GL_TEXTURE_WRAP_S
	TextureWrapT     = 0x2803 // GL_TEXTURE_WRAP_T
	TextureMagFilter = 0x2800 // GL_TEXTURE_MAG_FILTER
	TextureMinFilter = 0x2801 // GL_TEXTURE_MIN_FILTER

	TextureFilterNearest          = 0x2600 // GL_NEAREST
	TextureFilterLinear           = 0x2601 // GL_LINEAR
	TextureFilterMipNearest       = 0x2700 // GL_NEAREST_MIPMAP_NEAREST
	TextureFilterNearestMipLinear = 0x2702 // GL_NEAREST_MIPMAP_LINEAR
	TextureFilterLinearMipNearest = 0x2701 // GL_LINEAR_MIPMAP_NEAREST
	TextureFilterMipLinear        = 0x2703 // GL_LINEAR_MIPMAP_LINEAR
	TextureFilterAnisotropic      = 0x3000 // Anisotropic filter (custom identifier)
	TextureMipmapBiasRatio        = 0x4000 // Texture mipmap bias, percentage ratio (custom identifier)

	TextureWrapRepeat       = 0x2901 // GL_REPEAT
	TextureWrapClamp        = 0x812F // GL_CLAMP_TO_EDGE
	TextureWrapMirrorRepeat = 0x8370 // GL_MIRRORED_REPEAT
	TextureWrapMirrorClamp  = 0x8742 // GL_MIRROR_CLAMP_EXT

	// Matrix modes (equivalent to OpenGL)
	Modelview  = 0x1700 // GL_MODELVIEW
	Projection = 0x1701 // GL_PROJECTION
	Texture    = 0x1702 // GL_TEXTURE

	// Primitive assembly draw modes
	Lines     = 0x0001 // GL_LINES
	Triangles = 0x0004 // GL_TRIANGLES
	Quads     = 0x0007 // GL_QUADS

	// GL equivalent data types
	UnsignedByte = 0x1401 // GL_UNSIGNED_BYTE
	Float        = 0x1406 // GL_FLOAT

	// Buffer usage hint
	StreamDraw  = 0x88E0 // GL_STREAM_DRAW
	StreamRead  = 0x88E1 // GL_STREAM_READ
	StreamCopy  = 0x88E2 // GL_STREAM_COPY
	StaticDraw  = 0x88E4 // GL_STATIC_DRAW
	StaticRead  = 0x88E5 // GL_STATIC_READ
	StaticCopy  = 0x88E6 // GL_STATIC_COPY
	DynamicDraw = 0x88E8 // GL_DYNAMIC_DRAW
	DynamicRead = 0x88E9 // GL_DYNAMIC_READ
	DynamicCopy = 0x88EA // GL_DYNAMIC_COPY

	// GL Shader type
	FragmentShader = 0x8B30 // GL_FRAGMENT_SHADER
	VertexShader   = 0x8B31 // GL_VERTEX_SHADER
	ComputeShader  = 0x91B9 // GL_COMPUTE_SHADER

	// GL blending factors
	Zero                  = 0      // GL_ZERO
	One                   = 1      // GL_ONE
	SrcColor              = 0x0300 // GL_SRC_COLOR
	OneMinusSrcColor      = 0x0301 // GL_ONE_MINUS_SRC_COLOR
	SrcAlpha              = 0x0302 // GL_SRC_ALPHA
	OneMinusSrcAlpha      = 0x0303 // GL_ONE_MINUS_SRC_ALPHA
	DstAlpha              = 0x0304 // GL_DST_ALPHA
	OneMinusDstAlpha      = 0x0305 // GL_ONE_MINUS_DST_ALPHA
	DstColor              = 0x0306 // GL_DST_COLOR
	OneMinusDstColor      = 0x0307 // GL_ONE_MINUS_DST_COLOR
	SrcAlphaSaturate      = 0x0308 // GL_SRC_ALPHA_SATURATE
	ConstantColor         = 0x8001 // GL_CONSTANT_COLOR
	OneMinusConstantColor = 0x8002 // GL_ONE_MINUS_CONSTANT_COLOR
	ConstantAlpha         = 0x8003 // GL_CONSTANT_ALPHA
	OneMinusConstantAlpha = 0x8004 // GL_ONE_MINUS_CONSTANT_ALPHA

	// GL blending functions/equations
	FuncAdd             = 0x8006        // GL_FUNC_ADD
	Min                 = 0x8007        // GL_MIN
	Max                 = 0x8008        // GL_MAX
	FuncSubtract        = 0x800A        // GL_FUNC_SUBTRACT
	FuncReverseSubtract = 0x800B        // GL_FUNC_REVERSE_SUBTRACT
	BlendEquation       = 0x8009        // GL_BLEND_EQUATION
	BlendEquationRgb    = BlendEquation // GL_BLEND_EQUATION_RGB (Same as BLEND_EQUATION)
	BlendEquationAlpha  = 0x883D        // GL_BLEND_EQUATION_ALPHA
	BlendDstRgb         = 0x80C8        // GL_BLEND_DST_RGB
	BlendSrcRgb         = 0x80C9        // GL_BLEND_SRC_RGB
	BlendFuncDstAlpha   = 0x80CA        // GL_BLEND_DST_ALPHA
	BlendFuncSrcAlpha   = 0x80CB        // GL_BLEND_SRC_ALPHA
	BlendColor          = 0x8005        // GL_BLEND_COLOR

	ReadFramebuffer = 0x8CA8 // GL_READ_FRAMEBUFFER
	DrawFramebuffer = 0x8CA9 // GL_DRAW_FRAMEBUFFER
)
View Source
const (
	Opengl11   int32 = 1
	Opengl21   int32 = 2
	Opengl33   int32 = 3
	Opengl43   int32 = 4
	OpenglEs20 int32 = 5
)

OpenGL version

View Source
const (
	ShaderAttribFloat int32 = 0
	ShaderAttribVec2  int32 = 1
	ShaderAttribVec3  int32 = 2
	ShaderAttribVec4  int32 = 3
)

Shader attribute data types

View Source
const (
	AttachmentColorChannel0 int32 = 0
	AttachmentColorChannel1 int32 = 1
	AttachmentColorChannel2 int32 = 2
	AttachmentColorChannel3 int32 = 3
	AttachmentColorChannel4 int32 = 4
	AttachmentColorChannel5 int32 = 5
	AttachmentColorChannel6 int32 = 6
	AttachmentColorChannel7 int32 = 7
	AttachmentDepth         int32 = 100
	AttachmentStencil       int32 = 200
)

Framebuffer attachment type NOTE: By default up to 8 color channels defined but it can be more

View Source
const (
	AttachmentCubemapPositiveX int32 = 0
	AttachmentCubemapNegativeX int32 = 1
	AttachmentCubemapPositiveY int32 = 2
	AttachmentCubemapNegativeY int32 = 3
	AttachmentCubemapPositiveZ int32 = 4
	AttachmentCubemapNegativeZ int32 = 5
	AttachmentTexture2d        int32 = 100
	AttachmentRenderbuffer     int32 = 200
)

Framebuffer texture attachment type

Variables

View Source
var (
	// Light Gray
	LightGray = NewColor(200, 200, 200, 255)
	// Gray
	Gray = NewColor(130, 130, 130, 255)
	// Dark Gray
	DarkGray = NewColor(80, 80, 80, 255)
	// Yellow
	Yellow = NewColor(253, 249, 0, 255)
	// Gold
	Gold = NewColor(255, 203, 0, 255)
	// Orange
	Orange = NewColor(255, 161, 0, 255)
	// Pink
	Pink = NewColor(255, 109, 194, 255)
	// Red
	Red = NewColor(230, 41, 55, 255)
	// Maroon
	Maroon = NewColor(190, 33, 55, 255)
	// Green
	Green = NewColor(0, 228, 48, 255)
	// Lime
	Lime = NewColor(0, 158, 47, 255)
	// Dark Green
	DarkGreen = NewColor(0, 117, 44, 255)
	// Sky Blue
	SkyBlue = NewColor(102, 191, 255, 255)
	// Blue
	Blue = NewColor(0, 121, 241, 255)
	// Dark Blue
	DarkBlue = NewColor(0, 82, 172, 255)
	// Purple
	Purple = NewColor(200, 122, 255, 255)
	// Violet
	Violet = NewColor(135, 60, 190, 255)
	// Dark Purple
	DarkPurple = NewColor(112, 31, 126, 255)
	// Beige
	Beige = NewColor(211, 176, 131, 255)
	// Brown
	Brown = NewColor(127, 106, 79, 255)
	// Dark Brown
	DarkBrown = NewColor(76, 63, 47, 255)
	// White
	White = NewColor(255, 255, 255, 255)
	// Black
	Black = NewColor(0, 0, 0, 255)
	// Blank (Transparent)
	Blank = NewColor(0, 0, 0, 0)
	// Magenta
	Magenta = NewColor(255, 0, 255, 255)
	// Ray White (RayLib Logo White)
	RayWhite = NewColor(245, 245, 245, 255)
)

Some Basic Colors NOTE: Custom raylib color palette for amazing visuals on WHITE background

View Source
var (
	AnchorTopLeft      = vector2.NewFloat32(0, 0)
	AnchorTopRight     = vector2.NewFloat32(1, 0)
	AnchorTopCenter    = vector2.NewFloat32(0.5, 0)
	AnchorCenter       = vector2.NewFloat32(0.5, 0.5)
	AnchorBottomCenter = vector2.NewFloat32(0.5, 1)
	AnchorBottomLeft   = vector2.NewFloat32(0, 1)
	AnchorBottomRight  = vector2.NewFloat32(1, 1)
)

Functions

func ActiveDrawBuffers

func ActiveDrawBuffers(count int32)

ActiveDrawBuffers - Activate multiple draw color buffers

func ActiveTextureSlot

func ActiveTextureSlot(slot int32)

ActiveTextureSlot - Select and active a texture slot

func AttachAudioMixedProcessor

func AttachAudioMixedProcessor(callback AudioCallback)

func Begin

func Begin(mode int32)

Begin - Initialize drawing mode (how to organize vertex)

func BeginBlendCustomMode

func BeginBlendCustomMode(glSrcFactor, glDstFactor BlendFactor, glEquation BlendFunc)

func BeginBlendCustomSeparateMode

func BeginBlendCustomSeparateMode(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha BlendFactor, glEqRGB, glEqAlpha BlendFunc)

func BeginBlendMode

func BeginBlendMode(mode BlendMode)

BeginBlendMode - Begin blending mode (alpha, additive, multiplied)

func BeginDrawing

func BeginDrawing()

BeginDrawing - Setup drawing canvas to start drawing

func BeginMode2D

func BeginMode2D(camera Camera2D)

BeginMode2D - Initialize 2D mode with custom camera

func BeginMode3D

func BeginMode3D(camera Camera)

BeginMode3D - Initializes 3D mode for drawing (Camera setup)

func BeginScissorMode

func BeginScissorMode(x, y, width, height int32)

BeginScissorMode - Begins scissor mode (define screen area for following drawing)

func BeginScissorModeRec

func BeginScissorModeRec(r RectangleInt32)

func BeginShaderMode

func BeginShaderMode(shader Shader)

BeginShaderMode - Begin custom shader drawing

func BeginTextureMode

func BeginTextureMode(target RenderTexture2D)

#cgo noescape BeginTextureMode #cgo nocallback BeginTextureMode BeginTextureMode - Initializes render texture for drawing

func BeginVrStereoMode

func BeginVrStereoMode(config VrStereoConfig)

BeginVrStereoMode - Begin stereo rendering (requires VR simulator)

func BindFramebuffer

func BindFramebuffer(target, framebuffer uint32)

BindFramebuffer - Bind framebuffer (FBO)

func BindImageTexture

func BindImageTexture(id uint32, index uint32, format int32, readonly bool)

BindImageTexture - Bind image texture

func BindShaderBuffer

func BindShaderBuffer(id uint32, index uint32)

BindShaderBuffer - Bind SSBO buffer

func BlitFramebuffer

func BlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask int32)

BlitFramebuffer - Blit active framebuffer to main framebuffer

func CheckCollisionBoxSphere

func CheckCollisionBoxSphere(box BoundingBox, centerSphere vector3.Float32, radiusSphere float32) bool

CheckCollisionBoxSphere - Detect collision between box and sphere

func CheckCollisionBoxes

func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool

CheckCollisionBoxes - Detect collision between two bounding boxes

func CheckCollisionCircleLine

func CheckCollisionCircleLine(center vector2.Float32, radius float32, p1, p2 vector2.Float32) bool

CheckCollisionCircleLine - Check if circle collides with a line created betweeen two points [p1] and [p2]

func CheckCollisionCircleRec

func CheckCollisionCircleRec(center vector2.Float32, radius float32, rec rect2.Float32) bool

CheckCollisionCircleRec - Check collision between circle and rectangle

func CheckCollisionCircles

func CheckCollisionCircles(center1 vector2.Float32, radius1 float32, center2 vector2.Float32, radius2 float32) bool

CheckCollisionCircles - Check collision between two circles

func CheckCollisionLines

func CheckCollisionLines(startPos1, endPos1, startPos2, endPos2 vector2.Float32, point *vector2.Float32) bool

CheckCollisionLines - Check the collision between two lines defined by two points each, returns collision point by reference

func CheckCollisionPointCircle

func CheckCollisionPointCircle(point vector2.Float32, center vector2.Float32, radius float32) bool

CheckCollisionPointCircle - Check if point is inside circle

func CheckCollisionPointLine

func CheckCollisionPointLine(point, p1, p2 vector2.Float32, threshold int32) bool

CheckCollisionPointLine - Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]

func CheckCollisionPointPoly

func CheckCollisionPointPoly(point vector2.Float32, points []vector2.Float32) bool

CheckCollisionPointPoly - Check if point is within a polygon described by array of vertices

NOTE: Based on http://jeffreythompson.org/collision-detection/poly-point.php

func CheckCollisionPointRec

func CheckCollisionPointRec(point vector2.Float32, rec rect2.Float32) bool

CheckCollisionPointRec - Check if point is inside rectangle

func CheckCollisionPointTriangle

func CheckCollisionPointTriangle(point, p1, p2, p3 vector2.Float32) bool

CheckCollisionPointTriangle - Check if point is inside a triangle

func CheckCollisionRecs

func CheckCollisionRecs(rec1, rec2 rect2.Float32) bool

CheckCollisionRecs - Check collision between two rectangles

func CheckCollisionSpheres

func CheckCollisionSpheres(centerA vector3.Float32, radiusA float32, centerB vector3.Float32, radiusB float32) bool

CheckCollisionSpheres - Detect collision between two spheres

func CheckErrors

func CheckErrors()

CheckErrors - Check and log OpenGL error codes

func CheckRenderBatchLimit

func CheckRenderBatchLimit(vCount int32) bool

CheckRenderBatchLimit - Check internal buffer overflow for a given number of vertex

func ClearBackground

func ClearBackground(col colorex.RGBA)

ClearBackground - Sets Background Color

func ClearColor

func ClearColor(r uint8, g uint8, b uint8, a uint8)

ClearColor - Clear color buffer with color

func ClearScreenBuffers

func ClearScreenBuffers()

ClearScreenBuffers - Clear used screen buffers (color and depth)

func ClearWindowState

func ClearWindowState(flags uint32)

ClearWindowState - Clear window configuration state flags

func CloseAudioDevice

func CloseAudioDevice()

CloseAudioDevice - Close the audio device and context

func CloseWindow

func CloseWindow()

CloseWindow - Close Window and Terminate Context

func Color3f

func Color3f(x float32, y float32, z float32)

Color3f - Define one vertex (color) - 3 float

func Color4f

func Color4f(x float32, y float32, z float32, w float32)

Color4f - Define one vertex (color) - 4 float

func Color4ub

func Color4ub(r uint8, g uint8, b uint8, a uint8)

Color4ub - Define one vertex (color) - 4 byte

func ColorAlpha

func ColorAlpha(col colorex.RGBA, alpha float32) colorex.RGBA

ColorAlpha - Returns color with alpha applied, alpha goes from 0.0f to 1.0f

func ColorAlphaBlend

func ColorAlphaBlend(src, dst, tint colorex.RGBA) colorex.RGBA

ColorAlphaBlend - Returns src alpha-blended into dst color with tint

func ColorBrightness

func ColorBrightness(col colorex.RGBA, factor float32) colorex.RGBA

ColorBrightness - Get color with brightness correction, brightness factor goes from -1.0f to 1.0f

func ColorContrast

func ColorContrast(col colorex.RGBA, contrast float32) colorex.RGBA

ColorContrast - Get color with contrast correction, contrast values between -1.0f and 1.0f

func ColorFromHSV

func ColorFromHSV(hue, saturation, value float32) colorex.RGBA

ColorFromHSV - Returns a Color from HSV values, hue [0..360], saturation/value [0..1]

func ColorFromNormalized

func ColorFromNormalized(normalized vector4.Float32) colorex.RGBA

ColorFromNormalized - Returns Color from normalized values [0..1]

func ColorLerp

func ColorLerp(col1, col2 colorex.RGBA, factor float32) colorex.RGBA

ColorLerp - Get color lerp interpolation between two colors, factor [0.0f..1.0f]

func ColorMask

func ColorMask(r, g, b, a bool)

ColorMask - Color mask control

func ColorNormalize

func ColorNormalize(col colorex.RGBA) vector4.Float32

ColorNormalize - Returns color normalized as float [0..1]

func ColorTint

func ColorTint(col colorex.RGBA, tint colorex.RGBA) colorex.RGBA

ColorTint - Get color multiplied with another color

func ColorToHSV

func ColorToHSV(col colorex.RGBA) vector3.Float32

ColorToHSV - Returns HSV values for a Color, hue [0..360], saturation/value [0..1]

func ColorToInt

func ColorToInt(col colorex.RGBA) int32

ColorToInt - Get hexadecimal value for a Color (0xRRGGBBAA)

func CompileShader

func CompileShader(shaderCode string, type_ int32) uint32

CompileShader - Compile custom shader and return shader id (type: VERTEX_SHADER, FRAGMENT_SHADER, COMPUTE_SHADER)

func ComputeShaderDispatch

func ComputeShaderDispatch(groupX uint32, groupY uint32, groupZ uint32)

ComputeShaderDispatch - Dispatch compute shader (equivalent to *draw* for graphics pilepine)

func CopyShaderBuffer

func CopyShaderBuffer(destId uint32, srcId uint32, destOffset uint32, srcOffset uint32, count uint32)

CopyShaderBuffer - Copy SSBO data between buffers

func CubemapParameters

func CubemapParameters(id uint32, param int32, value int32)

CubemapParameters - Set cubemap parameters (filter, wrap)

func DetachAudioMixedProcessor

func DetachAudioMixedProcessor(callback AudioCallback)

func DisableBackfaceCulling

func DisableBackfaceCulling()

DisableBackfaceCulling - Disable backface culling

func DisableColorBlend

func DisableColorBlend()

DisableColorBlend - Disable color blending

func DisableCursor

func DisableCursor()

DisableCursor - Disables cursor

func DisableDepthMask

func DisableDepthMask()

DisableDepthMask - Disable depth write

func DisableDepthTest

func DisableDepthTest()

DisableDepthTest - Disable depth test

func DisableEventWaiting

func DisableEventWaiting()

DisableEventWaiting - Disable waiting for events on EndDrawing(), automatic events polling

func DisableFramebuffer

func DisableFramebuffer()

DisableFramebuffer - Disable render texture (fbo), return to default framebuffer

func DisableScissorTest

func DisableScissorTest()

DisableScissorTest - Disable scissor test

func DisableShader

func DisableShader()

DisableShader - Disable shader program

func DisableSmoothLines

func DisableSmoothLines()

DisableSmoothLines - Disable line aliasing

func DisableStereoRender

func DisableStereoRender()

DisableStereoRender - Disable stereo rendering

func DisableTexture

func DisableTexture()

DisableTexture - Disable texture

func DisableTextureCubemap

func DisableTextureCubemap()

DisableTextureCubemap - Disable texture cubemap

func DisableVertexArray

func DisableVertexArray()

DisableVertexArray - Disable vertex array (VAO, if supported)

func DisableVertexAttribute

func DisableVertexAttribute(index uint32)

DisableVertexAttribute - Disable vertex attribute index

func DisableVertexBuffer

func DisableVertexBuffer()

DisableVertexBuffer - Disable vertex buffer (VBO)

func DisableVertexBufferElement

func DisableVertexBufferElement()

DisableVertexBufferElement - Disable vertex buffer element (VBO element)

func DisableWireMode

func DisableWireMode()

DisableWireMode - Disable wire mode

func DrawBillboard

func DrawBillboard(camera Camera, texture Texture2D, center vector3.Float32, scale float32, tint colorex.RGBA)

DrawBillboard - Draw a billboard texture

func DrawBillboardPro

func DrawBillboardPro(camera Camera, texture Texture2D, sourceRec rect2.Float32, position vector3.Float32, up vector3.Float32, size vector2.Float32, origin vector2.Float32, rotation float32, tint colorex.RGBA)

DrawBillboardPro - Draw a billboard texture with pro parameters

func DrawBillboardRec

func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec rect2.Float32, center vector3.Float32, size vector2.Float32, tint colorex.RGBA)

DrawBillboardRec - Draw a billboard texture defined by sourceRec

func DrawBoundingBox

func DrawBoundingBox(box BoundingBox, col colorex.RGBA)

DrawBoundingBox - Draw bounding box (wires)

func DrawCapsule

func DrawCapsule(startPos, endPos vector3.Float32, radius float32, slices, rings int32, col colorex.RGBA)

DrawCapsule - Draw a capsule with the center of its sphere caps at startPos and endPos

func DrawCapsuleWires

func DrawCapsuleWires(startPos, endPos vector3.Float32, radius float32, slices, rings int32, col colorex.RGBA)

DrawCapsuleWires - Draw capsule wireframe with the center of its sphere caps at startPos and endPos

func DrawCircle

func DrawCircle(centerX, centerY int32, radius float32, col colorex.RGBA)

DrawCircle - Draw a color-filled circle

func DrawCircle3D

func DrawCircle3D(center vector3.Float32, radius float32, rotationAxis vector3.Float32, rotationAngle float32, col colorex.RGBA)

DrawCircle3D - Draw a circle in 3D world space

func DrawCircleGradient

func DrawCircleGradient(centerX, centerY int32, radius float32, col1, col2 colorex.RGBA)

DrawCircleGradient - Draw a gradient-filled circle

func DrawCircleLines

func DrawCircleLines(centerX, centerY int32, radius float32, col colorex.RGBA)

DrawCircleLines - Draw circle outline

func DrawCircleLinesV

func DrawCircleLinesV(center vector2.Float32, radius float32, col colorex.RGBA)

DrawCircleLinesV - Draw circle outline (Vector version)

func DrawCircleSector

func DrawCircleSector(center vector2.Float32, radius, startAngle, endAngle float32, segments int32, col colorex.RGBA)

DrawCircleSector - Draw a piece of a circle

func DrawCircleSectorLines

func DrawCircleSectorLines(center vector2.Float32, radius, startAngle, endAngle float32, segments int32, col colorex.RGBA)

DrawCircleSectorLines -

func DrawCircleV

func DrawCircleV(center vector2.Float32, radius float32, col colorex.RGBA)

DrawCircleV - Draw a color-filled circle (Vector version)

func DrawCube

func DrawCube(position vector3.Float32, width float32, height float32, length float32, col colorex.RGBA)

DrawCube - Draw cube

func DrawCubeV

func DrawCubeV(position vector3.Float32, size vector3.Float32, col colorex.RGBA)

DrawCubeV - Draw cube (Vector version)

func DrawCubeWires

func DrawCubeWires(position vector3.Float32, width float32, height float32, length float32, col colorex.RGBA)

DrawCubeWires - Draw cube wires

func DrawCubeWiresV

func DrawCubeWiresV(position vector3.Float32, size vector3.Float32, col colorex.RGBA)

DrawCubeWiresV - Draw cube wires (Vector version)

func DrawCylinder

func DrawCylinder(position vector3.Float32, radiusTop float32, radiusBottom float32, height float32, slices int32, col colorex.RGBA)

DrawCylinder - Draw a cylinder/cone

func DrawCylinderEx

func DrawCylinderEx(startPos vector3.Float32, endPos vector3.Float32, startRadius float32, endRadius float32, sides int32, col colorex.RGBA)

DrawCylinderEx - Draw a cylinder with base at startPos and top at endPos

func DrawCylinderWires

func DrawCylinderWires(position vector3.Float32, radiusTop float32, radiusBottom float32, height float32, slices int32, col colorex.RGBA)

DrawCylinderWires - Draw a cylinder/cone wires

func DrawCylinderWiresEx

func DrawCylinderWiresEx(startPos vector3.Float32, endPos vector3.Float32, startRadius float32, endRadius float32, sides int32, col colorex.RGBA)

DrawCylinderWiresEx - Draw a cylinder wires with base at startPos and top at endPos

func DrawEllipse

func DrawEllipse(centerX, centerY int32, radiusH, radiusV float32, col colorex.RGBA)

DrawEllipse - Draw ellipse

func DrawEllipseLines

func DrawEllipseLines(centerX, centerY int32, radiusH, radiusV float32, col colorex.RGBA)

DrawEllipseLines - Draw ellipse outline

func DrawFPS

func DrawFPS[XT, YT CoordinateT](posX XT, posY YT)

DrawFPS - Shows current FPS

func DrawGrid

func DrawGrid(slices int32, spacing float32)

DrawGrid - Draw a grid (centered at (0, 0, 0))

func DrawLine

func DrawLine[SXT, SYT, EXT, EYT CoordinateT](startPosX SXT, startPosY SYT, endPosX EXT, endPosY EYT, col colorex.RGBA)

DrawLine - Draw a line

func DrawLine3D

func DrawLine3D(startPos vector3.Float32, endPos vector3.Float32, col colorex.RGBA)

DrawLine3D - Draw a line in 3D world space

func DrawLineAB

func DrawLineAB(a, b vector2.Float32) func(col colorex.RGBA)

func DrawLineBezier

func DrawLineBezier(startPos, endPos vector2.Float32, thick float32, col colorex.RGBA)

DrawLineBezier - Draw a line using cubic-bezier curves in-out

func DrawLineEx

func DrawLineEx(startPos, endPos vector2.Float32, thick float32, col colorex.RGBA)

DrawLineEx - Draw a line defining thickness

func DrawLineStrip

func DrawLineStrip(points []vector2.Float32, col colorex.RGBA)

DrawLineStrip - Draw lines sequence

func DrawLineV

func DrawLineV(startPos, endPos vector2.Float32, col colorex.RGBA)

DrawLineV - Draw a line (Vector version)

func DrawMesh

func DrawMesh(mesh Mesh, material Material, transform Matrix)

DrawMesh - Draw a single mesh

func DrawMeshInstanced

func DrawMeshInstanced(mesh Mesh, material Material, transforms []Matrix, instances int)

DrawMeshInstanced - Draw mesh with instanced rendering

func DrawModel

func DrawModel(model Model, position vector3.Float32, scale float32, tint colorex.RGBA)

DrawModel - Draw a model (with texture if set)

func DrawModelEx

func DrawModelEx(model Model, position vector3.Float32, rotationAxis vector3.Float32, rotationAngle float32, scale vector3.Float32, tint colorex.RGBA)

DrawModelEx - Draw a model with extended parameters

func DrawModelPoints

func DrawModelPoints(model Model, position vector3.Float32, scale float32, tint colorex.RGBA)

DrawModelPoints - Draw a model as points

func DrawModelPointsEx

func DrawModelPointsEx(model Model, position vector3.Float32, rotationAxis vector3.Float32, rotationAngle float32, scale vector3.Float32, tint colorex.RGBA)

DrawModelPointsEx - Draw a model as points with extended parameters

func DrawModelWires

func DrawModelWires(model Model, position vector3.Float32, scale float32, tint colorex.RGBA)

DrawModelWires - Draw a model wires (with texture if set)

func DrawModelWiresEx

func DrawModelWiresEx(model Model, position vector3.Float32, rotationAxis vector3.Float32, rotationAngle float32, scale vector3.Float32, tint colorex.RGBA)

DrawModelWiresEx - Draw a model wires (with texture if set) with extended parameters

func DrawPixel

func DrawPixel[XT, YT CoordinateT](posX XT, posY YT, col colorex.RGBA)

DrawPixel - Draw a pixel

func DrawPixelV

func DrawPixelV(position vector2.Float32, col colorex.RGBA)

DrawPixelV - Draw a pixel (Vector version)

func DrawPlane

func DrawPlane(centerPos vector3.Float32, size vector2.Float32, col colorex.RGBA)

DrawPlane - Draw a plane XZ

func DrawPoint3D

func DrawPoint3D(position vector3.Float32, col colorex.RGBA)

DrawPoint3D - Draw a point in 3D space, actually a small line

func DrawPoly

func DrawPoly(center vector2.Float32, sides int32, radius, rotation float32, col colorex.RGBA)

DrawPoly - Draw a regular polygon (Vector version)

func DrawPolyLines

func DrawPolyLines(center vector2.Float32, sides int32, radius, rotation float32, col colorex.RGBA)

DrawPolyLines - Draw a polygon outline of n sides

func DrawPolyLinesEx

func DrawPolyLinesEx(center vector2.Float32, sides int32, radius float32, rotation float32, lineThick float32, col colorex.RGBA)

DrawPolyLinesEx - Draw a polygon outline of n sides with extended parameters

func DrawRay

func DrawRay(ray Ray, col colorex.RGBA)

DrawRay - Draw a ray line

func DrawRectangle

func DrawRectangle[XT, YT, WT, HT CoordinateT](posX XT, posY YT, width WT, height HT, col colorex.RGBA)

DrawRectangle - Draw a color-filled rectangle

func DrawRectangleGradientEx

func DrawRectangleGradientEx(rec rect2.Float32, col1, col2, col3, col4 colorex.RGBA)

DrawRectangleGradientEx - Draw a gradient-filled rectangle with custom vertex colors

func DrawRectangleGradientH

func DrawRectangleGradientH(posX, posY, width, height int32, col1, col2 colorex.RGBA)

DrawRectangleGradientH - Draw a horizontal-gradient-filled rectangle

func DrawRectangleGradientV

func DrawRectangleGradientV(posX, posY, width, height int32, col1, col2 colorex.RGBA)

DrawRectangleGradientV - Draw a vertical-gradient-filled rectangle

func DrawRectangleLines

func DrawRectangleLines(posX, posY, width, height int32, col colorex.RGBA)

DrawRectangleLines - Draw rectangle outline

func DrawRectangleLinesEx

func DrawRectangleLinesEx(rec rect2.Float32, lineThick float32, col colorex.RGBA)

DrawRectangleLinesEx - Draw rectangle outline with extended parameters

func DrawRectanglePro

func DrawRectanglePro(rec rect2.Float32, origin vector2.Float32, rotation float32, col colorex.RGBA)

DrawRectanglePro - Draw a color-filled rectangle with pro parameters

func DrawRectangleRec

func DrawRectangleRec(rec rect2.Float32, col colorex.RGBA)

DrawRectangleRec - Draw a color-filled rectangle

func DrawRectangleRounded

func DrawRectangleRounded(rec rect2.Float32, roundness float32, segments int32, col colorex.RGBA)

DrawRectangleRounded - Draw rectangle with rounded edges

func DrawRectangleRoundedLines

func DrawRectangleRoundedLines(rec rect2.Float32, roundness float32, segments float32, col colorex.RGBA)

DrawRectangleRoundedLines - Draw rectangle with rounded edges outline

func DrawRectangleRoundedLinesEx

func DrawRectangleRoundedLinesEx(rec rect2.Float32, roundness float32, segments, lineThick float32, col colorex.RGBA)

DrawRectangleRoundedLines - Draw rectangle with rounded edges outline

func DrawRectangleV

func DrawRectangleV(position vector2.Float32, size vector2.Float32, col colorex.RGBA)

DrawRectangleV - Draw a color-filled rectangle (Vector version)

func DrawRenderBatch

func DrawRenderBatch(batch *RenderBatch)

DrawRenderBatch - Draw render batch data (Update->Draw->Reset)

func DrawRenderBatchActive

func DrawRenderBatchActive()

DrawRenderBatchActive - Update and draw internal render batch

func DrawRing

func DrawRing(center vector2.Float32, innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col colorex.RGBA)

DrawRing - Draw ring

func DrawRingLines

func DrawRingLines(center vector2.Float32, innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col colorex.RGBA)

DrawRingLines - Draw ring outline

func DrawSphere

func DrawSphere(centerPos vector3.Float32, radius float32, col colorex.RGBA)

DrawSphere - Draw sphere

func DrawSphereEx

func DrawSphereEx(centerPos vector3.Float32, radius float32, rings int32, slices int32, col colorex.RGBA)

DrawSphereEx - Draw sphere with extended parameters

func DrawSphereWires

func DrawSphereWires(centerPos vector3.Float32, radius float32, rings int32, slices int32, col colorex.RGBA)

DrawSphereWires - Draw sphere wires

func DrawSplineBasis

func DrawSplineBasis(points []vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineBasis - Draw spline: B-Spline, minimum 4 points

func DrawSplineBezierCubic

func DrawSplineBezierCubic(points []vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineBezierCubic - Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]

func DrawSplineBezierQuadratic

func DrawSplineBezierQuadratic(points []vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineBezierQuadratic - Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]

func DrawSplineCatmullRom

func DrawSplineCatmullRom(points []vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineCatmullRom - Draw spline: Catmull-Rom, minimum 4 points

func DrawSplineLinear

func DrawSplineLinear(points []vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineLinear - Draw spline: Linear, minimum 2 points

func DrawSplineSegmentBasis

func DrawSplineSegmentBasis(p1, p2, p3, p4 vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineSegmentBasis - Draw spline segment: B-Spline, 4 points

func DrawSplineSegmentBezierCubic

func DrawSplineSegmentBezierCubic(p1, p2, p3, p4 vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineSegmentBezierCubic - Draw spline segment: Cubic Bezier, 2 points, 2 control points

func DrawSplineSegmentBezierQuadratic

func DrawSplineSegmentBezierQuadratic(p1, p2, p3 vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineSegmentBezierQuadratic - Draw spline segment: Quadratic Bezier, 2 points, 1 control point

func DrawSplineSegmentCatmullRom

func DrawSplineSegmentCatmullRom(p1, p2, p3, p4 vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineSegmentCatmullRom - Draw spline segment: Catmull-Rom, 4 points

func DrawSplineSegmentLinear

func DrawSplineSegmentLinear(p1, p2 vector2.Float32, thick float32, col colorex.RGBA)

DrawSplineSegmentLinear - Draw spline segment: Linear, 2 points

func DrawText

func DrawText[XT, YT CoordinateT](text string, posX XT, posY YT, fontSize int32, col colorex.RGBA)

DrawText - Draw text (using default font)

func DrawTextCodepoint

func DrawTextCodepoint(font Font, codepoint rune, position vector2.Float32, fontSize float32, tint colorex.RGBA)

DrawTextCodepoint - Draw one character (codepoint)

func DrawTextCodepoints

func DrawTextCodepoints(font Font, codepoints []rune, position vector2.Float32, fontSize float32, spacing float32, tint colorex.RGBA)

DrawTextCodepoints - Draw multiple character (codepoint)

func DrawTextEx

func DrawTextEx(font Font, text string, position vector2.Float32, fontSize float32, spacing float32, tint colorex.RGBA)

DrawTextEx - Draw text using Font and additional parameters

func DrawTextLayout

func DrawTextLayout(font Font, text string, fontSize float32, spacing float32, tint colorex.RGBA, layoutFn func(wh vector2.Float32) rect2.Float32)

func DrawTextPro

func DrawTextPro(font Font, text string, position vector2.Float32, origin vector2.Float32, rotation, fontSize float32, spacing float32, tint colorex.RGBA)

DrawTextPro - Draw text using Font and pro parameters (rotation)

func DrawTexture

func DrawTexture[XT, YT IntegerT](texture Texture2D, posX XT, posY YT, tint colorex.RGBA)

DrawTexture - Draw a Texture2D

func DrawTextureEx

func DrawTextureEx(texture Texture2D, position vector2.Float32, rotation, scale float32, tint colorex.RGBA)

DrawTextureEx - Draw a Texture2D with extended parameters

func DrawTextureNPatch

func DrawTextureNPatch(texture Texture2D, nPatchInfo NPatchInfo, dest rect2.Float32, origin vector2.Float32, rotation float32, tint colorex.RGBA)

DrawTextureNPatch - Draws a texture (or part of it) that stretches or shrinks nicely using n-patch info

func DrawTexturePro

func DrawTexturePro(texture Texture2D, sourceRec, destRec rect2.Float32, origin vector2.Float32, rotation float32, tint colorex.RGBA)

#cgo noescape DrawTexturePro #cgo nocallback DrawTexturePro DrawTexturePro - Draw a part of a texture defined by a rectangle with 'pro' parameters

func DrawTextureRec

func DrawTextureRec(texture Texture2D, sourceRec rect2.Float32, position vector2.Float32, tint colorex.RGBA)

DrawTextureRec - Draw a part of a texture defined by a rectangle

func DrawTextureTiled

func DrawTextureTiled(texture Texture2D, source, dest rect2.Float32, origin vector2.Float32, rotation, scale float32, tint colorex.RGBA)

func DrawTextureV

func DrawTextureV(texture Texture2D, position vector2.Float32, tint colorex.RGBA)

DrawTextureV - Draw a Texture2D with position defined as vector2.Float32

func DrawTriangle

func DrawTriangle(v1, v2, v3 vector2.Float32, col colorex.RGBA)

DrawTriangle - Draw a color-filled triangle

func DrawTriangle3D

func DrawTriangle3D(v1 vector3.Float32, v2 vector3.Float32, v3 vector3.Float32, col colorex.RGBA)

DrawTriangle3D - Draw a color-filled triangle (vertex in counter-clockwise order!)

func DrawTriangleFan

func DrawTriangleFan(points []vector2.Float32, col colorex.RGBA)

DrawTriangleFan - Draw a triangle fan defined by points

func DrawTriangleLines

func DrawTriangleLines(v1, v2, v3 vector2.Float32, col colorex.RGBA)

DrawTriangleLines - Draw triangle outline

func DrawTriangleStrip

func DrawTriangleStrip(points []vector2.Float32, col colorex.RGBA)

DrawTriangleStrip - Draw a triangle strip defined by points

func EnableBackfaceCulling

func EnableBackfaceCulling()

EnableBackfaceCulling - Enable backface culling

func EnableColorBlend

func EnableColorBlend()

EnableColorBlend - Enable color blending

func EnableCursor

func EnableCursor()

EnableCursor - Enables cursor

func EnableDepthMask

func EnableDepthMask()

EnableDepthMask - Enable depth write

func EnableDepthTest

func EnableDepthTest()

EnableDepthTest - Enable depth test

func EnableEventWaiting

func EnableEventWaiting()

EnableEventWaiting - Enable waiting for events on EndDrawing(), no automatic event polling

func EnableFramebuffer

func EnableFramebuffer(id uint32)

EnableFramebuffer - Enable render texture (fbo)

func EnablePointMode

func EnablePointMode()

EnablePointMode - Enable point mode

func EnableScissorTest

func EnableScissorTest()

EnableScissorTest - Enable scissor test

func EnableShader

func EnableShader(id uint32)

EnableShader - Enable shader program

func EnableSmoothLines

func EnableSmoothLines()

EnableSmoothLines - Enable line aliasing

func EnableStereoRender

func EnableStereoRender()

EnableStereoRender - Enable stereo rendering

func EnableTexture

func EnableTexture(id uint32)

EnableTexture - Enable texture

func EnableTextureCubemap

func EnableTextureCubemap(id uint32)

EnableTextureCubemap - Enable texture cubemap

func EnableVertexArray

func EnableVertexArray(vaoId uint32) bool

EnableVertexArray - Enable vertex array (VAO, if supported)

func EnableVertexAttribute

func EnableVertexAttribute(index uint32)

EnableVertexAttribute - Enable vertex attribute index

func EnableVertexBuffer

func EnableVertexBuffer(id uint32)

EnableVertexBuffer - Enable vertex buffer (VBO)

func EnableVertexBufferElement

func EnableVertexBufferElement(id uint32)

EnableVertexBufferElement - Enable vertex buffer element (VBO element)

func EnableWireMode

func EnableWireMode()

EnableWireMode - Enable wire mode

func End

func End()

End - Finish vertex providing

func EndBlendMode

func EndBlendMode()

EndBlendMode - End blending mode (reset to default: alpha blending)

func EndDrawing

func EndDrawing()

EndDrawing - End canvas drawing and Swap Buffers (Double Buffering)

func EndMode2D

func EndMode2D()

EndMode2D - Ends 2D mode custom camera usage

func EndMode3D

func EndMode3D()

EndMode3D - Ends 3D mode and returns to default 2D orthographic mode

func EndScissorMode

func EndScissorMode()

EndScissorMode - Ends scissor mode

func EndShaderMode

func EndShaderMode()

EndShaderMode - End custom shader drawing (use default shader)

func EndTextureMode

func EndTextureMode()

EndTextureMode - Ends drawing to render texture

func EndVrStereoMode

func EndVrStereoMode()

EndVrStereoMode - End stereo rendering (requires VR simulator)

func ExportAutomationEventList

func ExportAutomationEventList(list AutomationEventList, fileName string) bool

ExportAutomationEventList - Export automation events list as text file

func ExportImage

func ExportImage(image Image, fileName string) bool

ExportImage - Export image as a PNG file

func ExportImageToMemory

func ExportImageToMemory(image Image, fileType string) []byte

ExportImageToMemory - Export image to memory buffer

func ExportMesh

func ExportMesh(mesh Mesh, fileName string)

ExportMesh - Export mesh as an OBJ file

func ExportWave

func ExportWave(wave Wave, fileName string)

ExportWave - Export wave data to file

func Fade

func Fade(col colorex.RGBA, alpha float32) colorex.RGBA

Fade - Returns color with alpha applied, alpha goes from 0.0f to 1.0f

func FramebufferAttach

func FramebufferAttach(fboId uint32, texId uint32, attachType int32, texType int32, mipLevel int32)

FramebufferAttach - Attach texture/renderbuffer to a framebuffer

func FramebufferComplete

func FramebufferComplete(id uint32) bool

FramebufferComplete - Verify framebuffer is complete

func Frustum

func Frustum(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)

Frustum .

func GenTextureMipmaps

func GenTextureMipmaps(texture *Texture2D)

GenTextureMipmaps - Generate GPU mipmaps for a texture

func GetActiveFramebuffer

func GetActiveFramebuffer() uint32

GetActiveFramebuffer - Get the currently active render texture (fbo), 0 for default framebuffer

func GetClipboardText

func GetClipboardText() string

GetClipboardText - Get clipboard text content

func GetCollisionRec

func GetCollisionRec(rec1, rec2 rect2.Float32) rect2.Float32

GetCollisionRec - Get collision rectangle for two rectangles collision

func GetColor

func GetColor(hexValue uint) colorex.RGBA

GetColor - Returns a Color struct from hexadecimal value

func GetCullDistanceFar

func GetCullDistanceFar() float64

GetCullDistanceFar - Get cull plane distance far

func GetCullDistanceNear

func GetCullDistanceNear() float64

GetCullDistanceNear - Get cull plane distance near

func GetCurrentMonitor

func GetCurrentMonitor() int

GetCurrentMonitor - Get current monitor where window is placed

func GetFPS

func GetFPS() int32

GetFPS - Returns current FPS

func GetFrameTime

func GetFrameTime() float32

GetFrameTime - Returns time in seconds for one frame

func GetFramebufferHeight

func GetFramebufferHeight() int32

GetFramebufferHeight - Get default framebuffer height

func GetFramebufferWidth

func GetFramebufferWidth() int32

GetFramebufferWidth - Get default framebuffer width

func GetGamepadAxisCount

func GetGamepadAxisCount[GT IntegerT](gamepad GT) int32

GetGamepadAxisCount - Return gamepad axis count for a gamepad

func GetGamepadAxisMovement

func GetGamepadAxisMovement[GT IntegerT](gamepad GT, axis GamepadAxisType) float32

GetGamepadAxisMovement - Return axis movement value for a gamepad axis

func GetGamepadButtonPressed

func GetGamepadButtonPressed() int32

GetGamepadButtonPressed - Get the last gamepad button pressed

func GetGamepadName

func GetGamepadName[GT IntegerT](gamepad GT) string

GetGamepadName - Return gamepad internal name id

func GetGestureDragAngle

func GetGestureDragAngle() float32

GetGestureDragAngle - Get gesture drag vector

func GetGestureDragVector

func GetGestureDragVector() vector2.Float32

GetGestureDragVector - Get gesture drag vector

func GetGestureHoldDuration

func GetGestureHoldDuration() float32

GetGestureHoldDuration - Get gesture hold time in milliseconds

func GetGesturePinchAngle

func GetGesturePinchAngle() float32

GetGesturePinchAngle - Get gesture pinch angle

func GetGesturePinchVector

func GetGesturePinchVector() vector2.Float32

GetGesturePinchVector - Get gesture pinch delta

func GetGestureSwipeAngle

func GetGestureSwipeAngle() float32

GetGestureSwipeAngle - Get gesture swipe angle

func GetGestureSwipeData

func GetGestureSwipeData() (distance, intensity, angle float32)

func GetGestureSwipeDistance

func GetGestureSwipeDistance() float32

GetGestureSwipeDistance - Get gesture swipe angle

func GetGestureSwipeIntensity

func GetGestureSwipeIntensity() float32

GetGestureSwipeIntensity - Get gesture swipe angle

func GetGestureTapPosition

func GetGestureTapPosition() vector2.Float32

func GetGlyphAtlasRec

func GetGlyphAtlasRec(font Font, codepoint int32) rect2.Float32

GetGlyphAtlasRec - Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found

func GetGlyphIndex

func GetGlyphIndex(font Font, codepoint int32) int32

GetGlyphIndex - Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found

func GetImageColor

func GetImageColor(image *Image, x, y int32) colorex.RGBA

GetImageColor - Get image pixel color at (x, y) position

func GetKeyDownCount

func GetKeyDownCount() int

func GetLineWidth

func GetLineWidth() float32

GetLineWidth - Get the line drawing width

func GetLocationAttrib

func GetLocationAttrib(shaderId uint32, attribName string) int32

GetLocationAttrib - Get shader location attribute

func GetLocationUniform

func GetLocationUniform(shaderId uint32, uniformName string) int32

GetLocationUniform - Get shader location uniform

func GetMasterVolume

func GetMasterVolume() float32

GetMasterVolume - Set master volume (listener)

func GetMonitorCount

func GetMonitorCount() int

GetMonitorCount - Get number of connected monitors

func GetMonitorHeight

func GetMonitorHeight(monitor int) int

GetMonitorHeight - Get primary monitor height

func GetMonitorName

func GetMonitorName(monitor int) string

GetMonitorName - Get the human-readable, UTF-8 encoded name of the primary monitor

func GetMonitorPhysicalHeight

func GetMonitorPhysicalHeight(monitor int) int

GetMonitorPhysicalHeight - Get primary monitor physical height in millimetres

func GetMonitorPhysicalWidth

func GetMonitorPhysicalWidth(monitor int) int

GetMonitorPhysicalWidth - Get primary monitor physical width in millimetres

func GetMonitorPosition

func GetMonitorPosition(monitor int) vector2.Float32

GetMonitorPosition - Get specified monitor position

func GetMonitorRefreshRate

func GetMonitorRefreshRate(monitor int) int

GetMonitorRefreshRate - Get specified monitor refresh rate

func GetMonitorWidth

func GetMonitorWidth(monitor int) int

GetMonitorWidth - Get primary monitor width

func GetMouseDelta

func GetMouseDelta() vector2.Float32

GetMouseDelta - Get mouse delta between frames

func GetMousePosition

func GetMousePosition() vector2.Float32

GetMousePosition - Returns mouse position XY

func GetMouseWheelMove

func GetMouseWheelMove() float32

GetMouseWheelMove - Get mouse wheel movement for X or Y, whichever is larger

func GetMouseWheelMoveV

func GetMouseWheelMoveV() vector2.Float32

GetMouseWheelMoveV - Get mouse wheel movement for both X and Y

func GetMouseX

func GetMouseX() int32

GetMouseX - Returns mouse position X

func GetMouseY

func GetMouseY() int32

GetMouseY - Returns mouse position Y

func GetMusicTimeLength

func GetMusicTimeLength(music Music) float32

GetMusicTimeLength - Get music time length (in seconds)

func GetMusicTimePlayed

func GetMusicTimePlayed(music Music) float32

GetMusicTimePlayed - Get current music time played (in seconds)

func GetPixelDataSize

func GetPixelDataSize(width, height, format int32) int32

GetPixelDataSize - Get pixel data size in bytes for certain format

func GetRandomValue

func GetRandomValue(min, max int32) int32

GetRandomValue - Returns a random value between min and max (both included)

func GetRenderHeight

func GetRenderHeight() int

GetRenderHeight - Get current render height (it considers HiDPI)

func GetRenderSize

func GetRenderSize() vector2.Int

func GetRenderWidth

func GetRenderWidth() int

GetRenderWidth - Get current render width (it considers HiDPI)

func GetScreenHeight

func GetScreenHeight() int

GetScreenHeight - Get current screen height

func GetScreenSize

func GetScreenSize() vector2.Int

func GetScreenToWorld2D

func GetScreenToWorld2D(position vector2.Float32, camera Camera2D) vector2.Float32

GetScreenToWorld2D - Returns the world space position for a 2d camera screen space position

func GetScreenWidth

func GetScreenWidth() int

GetScreenWidth - Get current screen width

func GetShaderBufferSize

func GetShaderBufferSize(id uint32) uint32

GetShaderBufferSize - Get SSBO buffer size

func GetShaderIdDefault

func GetShaderIdDefault() uint32

GetShaderIdDefault - Get default shader id

func GetShaderLocation

func GetShaderLocation(shader Shader, uniformName string) int32

GetShaderLocation - Get shader uniform location

func GetShaderLocationAttrib

func GetShaderLocationAttrib(shader Shader, attribName string) int32

GetShaderLocationAttrib - Get shader attribute location

func GetShapesTextureRectangle

func GetShapesTextureRectangle() rect2.Float32

GetShapesTextureRectangle - Get texture source rectangle that is used for shapes drawing

func GetSplinePointBasis

func GetSplinePointBasis(p1, p2, p3, p4 vector2.Float32, t float32) vector2.Float32

GetSplinePointBasis - Get (evaluate) spline point: B-Spline

func GetSplinePointBezierCubic

func GetSplinePointBezierCubic(p1, p2, p3, p4 vector2.Float32, t float32) vector2.Float32

GetSplinePointBezierCubic - Get (evaluate) spline point: Cubic Bezier

func GetSplinePointBezierQuad

func GetSplinePointBezierQuad(p1, p2, p3 vector2.Float32, t float32) vector2.Float32

GetSplinePointBezierQuad - Get (evaluate) spline point: Quadratic Bezier

func GetSplinePointCatmullRom

func GetSplinePointCatmullRom(p1, p2, p3, p4 vector2.Float32, t float32) vector2.Float32

GetSplinePointCatmullRom - Get (evaluate) spline point: Catmull-Rom

func GetSplinePointLinear

func GetSplinePointLinear(p1, p2 vector2.Float32, t float32) vector2.Float32

GetSplinePointLinear - Get (evaluate) spline point: Linear

func GetTextureIdDefault

func GetTextureIdDefault() uint32

GetTextureIdDefault - Get default texture id

func GetTime

func GetTime() float64

GetTime - Return time in seconds

func GetTouchPointCount

func GetTouchPointCount() int32

GetTouchPointCount - Get number of touch points

func GetTouchPointId

func GetTouchPointId[IT IntegerT](index IT) int32

GetTouchPointId - Get touch point identifier for given index

func GetTouchPosition

func GetTouchPosition[IT IntegerT](index IT) vector2.Float32

GetTouchPosition - Returns touch position XY for a touch point index (relative to screen size)

func GetTouchX

func GetTouchX() int32

GetTouchX - Returns touch position X for touch point 0 (relative to screen size)

func GetTouchY

func GetTouchY() int32

GetTouchY - Returns touch position Y for touch point 0 (relative to screen size)

func GetVersion

func GetVersion() int32

GetVersion - Get current OpenGL version

func GetWindowHandle

func GetWindowHandle() unsafe.Pointer

GetWindowHandle - Get native window handle

func GetWindowPosition

func GetWindowPosition() vector2.Float32

GetWindowPosition - Get window position XY on monitor

func GetWindowScaleDPI

func GetWindowScaleDPI() vector2.Float32

GetWindowScaleDPI - Get window scale DPI factor

func GetWorldToScreen

func GetWorldToScreen(position vector3.Float32, camera Camera) vector2.Float32

GetWorldToScreen - Returns the screen space position from a 3d world space position

func GetWorldToScreen2D

func GetWorldToScreen2D(position vector2.Float32, camera Camera2D) vector2.Float32

GetWorldToScreen2D - Returns the screen space position for a 2d camera world space position

func GetWorldToScreenEx

func GetWorldToScreenEx(position vector3.Float32, camera Camera, width int32, height int32) vector2.Float32

GetWorldToScreenEx - Get size position for a 3d world space position

func GlClose

func GlClose()

GlClose - De-inititialize rlgl (buffers, shaders, textures)

func GlInit

func GlInit(width int32, height int32)

GlInit - Initialize rlgl (buffers, shaders, textures, states)

func HideCursor

func HideCursor()

HideCursor - Hides cursor

func HomeDir

func HomeDir() string

HomeDir - Returns user home directory NOTE: On Android this returns internal data path and must be called after InitWindow

func ImageAlphaClear

func ImageAlphaClear(image *Image, col colorex.RGBA, threshold float32)

ImageAlphaClear - Apply alpha mask to image

func ImageAlphaCrop

func ImageAlphaCrop(image *Image, threshold float32)

ImageAlphaCrop - Crop image depending on alpha value

func ImageAlphaMask

func ImageAlphaMask(image, alphaMask *Image)

ImageAlphaMask - Apply alpha mask to image

func ImageAlphaPremultiply

func ImageAlphaPremultiply(image *Image)

ImageAlphaPremultiply - Premultiply alpha channel

func ImageBlurGaussian

func ImageBlurGaussian(image *Image, blurSize int32)

ImageBlurGaussian - Apply box blur

func ImageClearBackground

func ImageClearBackground(dst *Image, col colorex.RGBA)

ImageClearBackground - Clear image background with given color

func ImageColorBrightness

func ImageColorBrightness(image *Image, brightness int32)

ImageColorBrightness - Modify image color: brightness (-255 to 255)

func ImageColorContrast

func ImageColorContrast(image *Image, contrast float32)

ImageColorContrast - Modify image color: contrast (-100 to 100)

func ImageColorGrayscale

func ImageColorGrayscale(image *Image)

ImageColorGrayscale - Modify image color: grayscale

func ImageColorInvert

func ImageColorInvert(image *Image)

ImageColorInvert - Modify image color: invert

func ImageColorReplace

func ImageColorReplace(image *Image, col, replace colorex.RGBA)

ImageColorReplace - Modify image color: replace color

func ImageColorTint

func ImageColorTint(image *Image, col colorex.RGBA)

ImageColorTint - Modify image color: tint

func ImageCrop

func ImageCrop(image *Image, crop rect2.Float32)

ImageCrop - Crop an image to a defined rectangle

func ImageDither

func ImageDither(image *Image, rBpp, gBpp, bBpp, aBpp int32)

ImageDither - Dither image data to 16bpp or lower (Floyd-Steinberg dithering)

func ImageDraw

func ImageDraw(dst *Image, src Image, srcRec, dstRec rect2.Float32, tint colorex.RGBA)

ImageDraw - Draw a source image within a destination image

func ImageDrawCircle

func ImageDrawCircle(dst *Image, centerX, centerY, radius int32, col colorex.RGBA)

ImageDrawCircle - Draw a filled circle within an image

func ImageDrawCircleLines

func ImageDrawCircleLines(dst *Image, centerX, centerY, radius int32, col colorex.RGBA)

ImageDrawCircleLines - Draw circle outline within an image

func ImageDrawCircleLinesV

func ImageDrawCircleLinesV(dst *Image, center vector2.Float32, radius int32, col colorex.RGBA)

ImageDrawCircleLinesV - Draw circle outline within an image (Vector version)

func ImageDrawCircleV

func ImageDrawCircleV(dst *Image, center vector2.Float32, radius int32, col colorex.RGBA)

ImageDrawCircleV - Draw a filled circle within an image (Vector version)

func ImageDrawLine

func ImageDrawLine(dst *Image, startPosX, startPosY, endPosX, endPosY int32, col colorex.RGBA)

ImageDrawLine - Draw line within an image

func ImageDrawLineEx

func ImageDrawLineEx(dst *Image, start, end vector2.Float32, thick int32, col colorex.RGBA)

ImageDrawLineEx - Draw a line defining thickness within an image

func ImageDrawLineV

func ImageDrawLineV(dst *Image, start, end vector2.Float32, col colorex.RGBA)

ImageDrawLineV - Draw line within an image, vector version

func ImageDrawPixel

func ImageDrawPixel(dst *Image, posX, posY int32, col colorex.RGBA)

ImageDrawPixel - Draw pixel within an image

func ImageDrawPixelV

func ImageDrawPixelV(dst *Image, position vector2.Float32, col colorex.RGBA)

ImageDrawPixelV - Draw pixel within an image (Vector version)

func ImageDrawRectangle

func ImageDrawRectangle(dst *Image, x, y, width, height int32, col colorex.RGBA)

ImageDrawRectangle - Draw rectangle within an image

func ImageDrawRectangleLines

func ImageDrawRectangleLines(dst *Image, rec rect2.Float32, thick int, col colorex.RGBA)

ImageDrawRectangleLines - Draw rectangle lines within an image

func ImageDrawRectangleRec

func ImageDrawRectangleRec(dst *Image, rec rect2.Float32, col colorex.RGBA)

ImageDrawRectangleRec - Draw rectangle within an image

func ImageDrawRectangleV

func ImageDrawRectangleV(dst *Image, position, size vector2.Float32, col colorex.RGBA)

ImageDrawRectangleV - Draw rectangle within an image (Vector version)

func ImageDrawText

func ImageDrawText(dst *Image, posX, posY int32, text string, fontSize int32, col colorex.RGBA)

ImageDrawText - Draw text (default font) within an image (destination)

func ImageDrawTextEx

func ImageDrawTextEx(dst *Image, position vector2.Float32, font Font, text string, fontSize, spacing float32, col colorex.RGBA)

ImageDrawTextEx - Draw text (custom sprite font) within an image (destination)

func ImageDrawTriangle

func ImageDrawTriangle(dst *Image, v1, v2, v3 vector2.Float32, col colorex.RGBA)

ImageDrawTriangle - Draw triangle within an image

func ImageDrawTriangleEx

func ImageDrawTriangleEx(dst *Image, v1, v2, v3 vector2.Float32, c1, c2, c3 colorex.RGBA)

ImageDrawTriangleEx - Draw triangle with interpolated colors within an image

func ImageDrawTriangleFan

func ImageDrawTriangleFan(dst *Image, points []vector2.Float32, col colorex.RGBA)

ImageDrawTriangleFan - Draw a triangle fan defined by points within an image (first vertex is the center)

func ImageDrawTriangleLines

func ImageDrawTriangleLines(dst *Image, v1, v2, v3 vector2.Float32, col colorex.RGBA)

ImageDrawTriangleLines - Draw triangle outline within an image

func ImageDrawTriangleStrip

func ImageDrawTriangleStrip(dst *Image, points []vector2.Float32, col colorex.RGBA)

ImageDrawTriangleStrip - Draw a triangle strip defined by points within an image

func ImageFlipHorizontal

func ImageFlipHorizontal(image *Image)

ImageFlipHorizontal - Flip image horizontally

func ImageFlipVertical

func ImageFlipVertical(image *Image)

ImageFlipVertical - Flip image vertically

func ImageFormat

func ImageFormat(image *Image, newFormat PixelFormat)

ImageFormat - Convert image data to desired format

func ImageKernelConvolution

func ImageKernelConvolution(image *Image, kernel []float32)

ImageKernelConvolution - Apply custom square convolution kernel to image

func ImageMipmaps

func ImageMipmaps(image *Image)

ImageMipmaps - Generate all mipmap levels for a provided image

func ImageResize

func ImageResize(image *Image, newWidth, newHeight int32)

ImageResize - Resize an image (bilinear filtering)

func ImageResizeCanvas

func ImageResizeCanvas(image *Image, newWidth, newHeight, offsetX, offsetY int32, col colorex.RGBA)

ImageResizeCanvas - Resize canvas and fill with color

func ImageResizeNN

func ImageResizeNN(image *Image, newWidth, newHeight int32)

ImageResizeNN - Resize an image (Nearest-Neighbor scaling algorithm)

func ImageRotate

func ImageRotate(image *Image, degrees int32)

ImageRotate - Rotate image by input angle in degrees (-359 to 359)

func ImageRotateCCW

func ImageRotateCCW(image *Image)

ImageRotateCCW - Rotate image counter-clockwise 90deg

func ImageRotateCW

func ImageRotateCW(image *Image)

ImageRotateCW - Rotate image clockwise 90deg

func ImageToPOT

func ImageToPOT(image *Image, fillColor colorex.RGBA)

ImageToPOT - Convert image to POT (power-of-two)

func InitAudioDevice

func InitAudioDevice()

InitAudioDevice - Initialize audio device and context

func InitWindow

func InitWindow[WT, HT IntegerT](width WT, height HT, title string)

InitWindow - Initialize Window and OpenGL Graphics

func IsAudioDeviceReady

func IsAudioDeviceReady() bool

IsAudioDeviceReady - Check if audio device has been initialized successfully

func IsAudioStreamPlaying

func IsAudioStreamPlaying(stream AudioStream) bool

IsAudioStreamPlaying - Check if audio stream is playing

func IsAudioStreamProcessed

func IsAudioStreamProcessed(stream AudioStream) bool

IsAudioStreamProcessed - Check if any audio stream buffers requires refill

func IsAudioStreamValid

func IsAudioStreamValid(stream AudioStream) bool

IsAudioStreamValid - Checks if an audio stream is valid (buffers initialized)

func IsCursorHidden

func IsCursorHidden() bool

IsCursorHidden - Returns true if cursor is not visible

func IsCursorOnScreen

func IsCursorOnScreen() bool

IsCursorOnScreen - Check if cursor is on the current screen.

func IsFileDropped

func IsFileDropped() bool

IsFileDropped - Check if a file have been dropped into window

func IsFontValid

func IsFontValid(font Font) bool

IsFontValid - Check if a font is valid (font data loaded, WARNING: GPU texture not checked)

func IsGamepadAvailable

func IsGamepadAvailable[GT IntegerT](gamepad GT) bool

IsGamepadAvailable - Detect if a gamepad is available

func IsGamepadButtonDown

func IsGamepadButtonDown[GT IntegerT](gamepad GT, button GamepadButtonType) bool

IsGamepadButtonDown - Detect if a gamepad button is being pressed

func IsGamepadButtonPressed

func IsGamepadButtonPressed[GT IntegerT](gamepad GT, button GamepadButtonType) bool

IsGamepadButtonPressed - Detect if a gamepad button has been pressed once

func IsGamepadButtonReleased

func IsGamepadButtonReleased[GT IntegerT](gamepad GT, button GamepadButtonType) bool

IsGamepadButtonReleased - Detect if a gamepad button has been released once

func IsGamepadButtonUp

func IsGamepadButtonUp[GT IntegerT](gamepad GT, button GamepadButtonType) bool

IsGamepadButtonUp - Detect if a gamepad button is NOT being pressed

func IsGestureDetected

func IsGestureDetected(gesture Gestures) bool

IsGestureDetected - Check if a gesture have been detected

func IsImageValid

func IsImageValid(image *Image) bool

IsImageValid - Check if an image is valid (data and parameters)

func IsKeyDown

func IsKeyDown(key KeyType) bool

IsKeyDown - Detect if a key is being pressed

func IsKeyPressed

func IsKeyPressed(key KeyType) bool

IsKeyPressed - Detect if a key has been pressed once

func IsKeyPressedRepeat

func IsKeyPressedRepeat(key KeyType) bool

IsKeyPressedRepeat - Detect if a key has been pressed again (Only PLATFORM_DESKTOP)

func IsKeyReleased

func IsKeyReleased(key KeyType) bool

IsKeyReleased - Detect if a key has been released once

func IsKeyUp

func IsKeyUp(key KeyType) bool

IsKeyUp - Detect if a key is NOT being pressed

func IsMaterialValid

func IsMaterialValid(material Material) bool

IsMaterialValid - Check if a material is valid (shader assigned, map textures loaded in GPU)

func IsModelAnimationValid

func IsModelAnimationValid(model Model, anim ModelAnimation) bool

IsModelAnimationValid - Check model animation skeleton match

func IsModelValid

func IsModelValid(model Model) bool

IsModelValid - Check if a model is valid (loaded in GPU, VAO/VBOs)

func IsMouseButtonDown

func IsMouseButtonDown(button MouseButtonType) bool

IsMouseButtonDown - Detect if a mouse button is being pressed

func IsMouseButtonPressed

func IsMouseButtonPressed(button MouseButtonType) bool

IsMouseButtonPressed - Detect if a mouse button has been pressed once

func IsMouseButtonReleased

func IsMouseButtonReleased(button MouseButtonType) bool

IsMouseButtonReleased - Detect if a mouse button has been released once

func IsMouseButtonUp

func IsMouseButtonUp(button MouseButtonType) bool

IsMouseButtonUp - Detect if a mouse button is NOT being pressed

func IsMusicStreamPlaying

func IsMusicStreamPlaying(music Music) bool

IsMusicStreamPlaying - Check if music is playing

func IsMusicValid

func IsMusicValid(music Music) bool

IsMusicValid - Checks if a music stream is valid (context and buffers initialized)

func IsRenderTextureValid

func IsRenderTextureValid(target *RenderTexture2D) bool

IsRenderTextureValid - Check if a render texture is valid (loaded in GPU)

func IsShaderValid

func IsShaderValid(shader Shader) bool

IsShaderValid - Check if a shader is valid (loaded on GPU)

func IsSoundPlaying

func IsSoundPlaying(sound *Sound) bool

IsSoundPlaying - Check if a sound is currently playing

func IsSoundValid

func IsSoundValid(sound Sound) bool

IsSoundValid - Checks if a sound is valid (data loaded and buffers initialized)

func IsStereoRenderEnabled

func IsStereoRenderEnabled() bool

IsStereoRenderEnabled - Check if stereo render is enabled

func IsTextureValid

func IsTextureValid(texture *Texture2D) bool

IsTextureValid - Check if a texture is valid (loaded in GPU)

func IsWaveValid

func IsWaveValid(wave Wave) bool

IsWaveValid - Checks if wave data is valid (data loaded and parameters)

func IsWindowFocused

func IsWindowFocused() bool

IsWindowFocused - Check if window is currently focused

func IsWindowFullscreen

func IsWindowFullscreen() bool

IsWindowFullscreen - Check if window is currently fullscreen

func IsWindowHidden

func IsWindowHidden() bool

IsWindowHidden - Check if window is currently hidden

func IsWindowMaximized

func IsWindowMaximized() bool

IsWindowMaximized - Check if window is currently maximized

func IsWindowMinimized

func IsWindowMinimized() bool

IsWindowMinimized - Check if window is currently minimized

func IsWindowReady

func IsWindowReady() bool

IsWindowReady - Check if window has been initialized successfully

func IsWindowResized

func IsWindowResized() bool

IsWindowResized - Check if window has been resized

func IsWindowState

func IsWindowState(flag uint32) bool

IsWindowState - Check if one specific window flag is enabled

func LoadComputeShaderProgram

func LoadComputeShaderProgram(shaderID uint32) uint32

LoadComputeShaderProgram -

func LoadDrawCube

func LoadDrawCube()

LoadDrawCube - Load and draw a cube

func LoadDrawQuad

func LoadDrawQuad()

LoadDrawQuad - Load and draw a quad

func LoadDroppedFiles

func LoadDroppedFiles() []string

LoadDroppedFiles - Load dropped filepaths

func LoadFramebuffer

func LoadFramebuffer() uint32

LoadFramebuffer - Load an empty framebuffer

func LoadIdentity

func LoadIdentity()

LoadIdentity - Reset current matrix to identity matrix

func LoadImageColors

func LoadImageColors(img Image) []colorex.RGBA

LoadImageColors - Get pixel data from image as a Color slice

func LoadShaderBuffer

func LoadShaderBuffer(size uint32, data unsafe.Pointer, usageHint int32) uint32

LoadShaderBuffer - Load shader storage buffer object (SSBO)

func LoadShaderCode

func LoadShaderCode(vsCode string, fsCode string) uint32

LoadShaderCode - Load shader from code strings

func LoadShaderProgram

func LoadShaderProgram(vShaderId uint32, fShaderId uint32) uint32

LoadShaderProgram - Load custom shader program

func LoadTextureDepth

func LoadTextureDepth(width, height int32, useRenderBuffer bool) uint32

LoadTextureDepth - Load depth texture/renderbuffer (to be attached to fbo)

func LoadVertexArray

func LoadVertexArray() uint32

LoadVertexArray - Load vertex array (vao) if supported

func LoadWaveSamples

func LoadWaveSamples(wave Wave) []float32

LoadWaveSamples - Get samples data from wave as a floats array

func MatrixMode

func MatrixMode(mode int32)

MatrixMode - Choose the current matrix to be transformed

func MaximizeWindow

func MaximizeWindow()

MaximizeWindow - Set window state: maximized, if resizable

func MeasureText

func MeasureText(text string, fontSize int32) int32

MeasureText - Measure string width for default font

func MeasureTextEx

func MeasureTextEx(font Font, text string, fontSize float32, spacing float32) vector2.Float32

MeasureTextEx - Measure string size for Font

func MinimizeWindow

func MinimizeWindow()

MinimizeWindow - Set window state: minimized, if resizable

func NewColor

func NewColor(r, g, b, a uint8) colorex.RGBA

NewColor - Returns new Color

func NewRectangle

func NewRectangle[XT, YT, WT, HT CoordinateT](x XT, y YT, width WT, height HT) rect2.Float32

NewRectangle - Returns new Rectangle

func NewRectangleWHV

func NewRectangleWHV[WHT rm.SignedNumber](wh vector2.Vector[WHT]) rect2.Float32

func Normal3f

func Normal3f(x float32, y float32, z float32)

Normal3f - Define one vertex (normal) - 3 float

func OpenURL

func OpenURL(url string)

OpenURL - Open URL with default system browser (if available)

func Ortho

func Ortho(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)

Ortho .

func PauseAudioStream

func PauseAudioStream(stream AudioStream)

PauseAudioStream - Pause audio stream

func PauseMusicStream

func PauseMusicStream(music Music)

PauseMusicStream - Pause music playing

func PauseSound

func PauseSound(sound *Sound)

PauseSound - Pause a sound

func PlayAudioStream

func PlayAudioStream(stream AudioStream)

PlayAudioStream - Play audio stream

func PlayAutomationEvent

func PlayAutomationEvent(event AutomationEvent)

PlayAutomationEvent - Play a recorded automation event

func PlayMusicStream

func PlayMusicStream(music Music)

PlayMusicStream - Start music playing

func PlaySound

func PlaySound(sound Sound)

PlaySound - Play a sound

func PollInputEvents

func PollInputEvents()

Register all input events

func PopMatrix

func PopMatrix()

PopMatrix - Pop lattest inserted matrix from stack

func PushMatrix

func PushMatrix()

PushMatrix - Push the current matrix to stack

func ReadAll

func ReadAll(a Asset) ([]byte, error)

func ReadShaderBuffer

func ReadShaderBuffer(id uint32, dest unsafe.Pointer, count uint32, offset uint32)

ReadShaderBuffer - Read SSBO buffer data (GPU->CPU)

func RestoreWindow

func RestoreWindow()

RestoreWindow - Set window state: not minimized/maximized

func ResumeAudioStream

func ResumeAudioStream(stream AudioStream)

ResumeAudioStream - Resume audio stream

func ResumeMusicStream

func ResumeMusicStream(music Music)

ResumeMusicStream - Resume playing paused music

func ResumeSound

func ResumeSound(sound *Sound)

ResumeSound - Resume a paused sound

func Rotatef

func Rotatef(angle float32, x float32, y float32, z float32)

Rotatef - Multiply the current matrix by a rotation matrix

func Scalef

func Scalef(x float32, y float32, z float32)

Scalef - Multiply the current matrix by a scaling matrix

func Scissor

func Scissor(x int32, y int32, width int32, height int32)

Scissor - Scissor test

func SeekMusicStream

func SeekMusicStream(music Music, position float32)

SeekMusicStream - Seek music to a position (in seconds)

func SetAudioStreamBufferSizeDefault

func SetAudioStreamBufferSizeDefault(size int32)

SetAudioStreamBufferSizeDefault - Default size for new audio streams

func SetAudioStreamCallback

func SetAudioStreamCallback(stream AudioStream, callback AudioCallback)

SetAudioStreamCallback - Audio thread callback to request new data

func SetAudioStreamPan

func SetAudioStreamPan(stream AudioStream, pan float32)

SetAudioStreamPan - Set pan for audio stream (0.5 is centered)

func SetAudioStreamPitch

func SetAudioStreamPitch(stream AudioStream, pitch float32)

SetAudioStreamPitch - Set pitch for audio stream (1.0 is base level)

func SetAudioStreamVolume

func SetAudioStreamVolume(stream AudioStream, volume float32)

SetAudioStreamVolume - Set volume for audio stream (1.0 is max level)

func SetAutomationEventBaseFrame

func SetAutomationEventBaseFrame(frame int)

SetAutomationEventBaseFrame - Set automation event internal base frame to start recording

func SetAutomationEventList

func SetAutomationEventList(list *AutomationEventList)

SetAutomationEventList - Set automation event list to record to

func SetBlendColor

func SetBlendColor(c colorex.RGBA)

func SetBlendFactors

func SetBlendFactors(glSrcFactor, glDstFactor BlendFactor, glEquation BlendFunc)

SetBlendFactors - Set blending mode factor and equation (using OpenGL factors)

func SetBlendFactorsSeparate

func SetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha BlendFactor, glEqRGB, glEqAlpha BlendFunc)

SetBlendFactorsSeparate - Set blending mode factors and equations separately (using OpenGL factors)

func SetBlendMode

func SetBlendMode(mode BlendMode)

SetBlendMode - Set blending mode

func SetCallbackFunc

func SetCallbackFunc(func())

SetCallbackFunc - Sets callback function

func SetClipPlanes

func SetClipPlanes(nearPlane, farPlane float64)

SetClipPlanes - Set clip planes distances

func SetClipboardText

func SetClipboardText(data string)

SetClipboardText - Set clipboard text content

func SetConfigFlags

func SetConfigFlags(flags ConfigFlags)

SetConfigFlags - Setup some window configuration flags

func SetCullFace

func SetCullFace(mode int32)

SetCullFace - Set face culling mode

func SetExitKey

func SetExitKey(key KeyType)

SetExitKey - Set a custom key to exit program (default is ESC)

func SetFramebufferHeight

func SetFramebufferHeight(height int32)

SetFramebufferHeight - Set current framebuffer height

func SetFramebufferWidth

func SetFramebufferWidth(width int32)

SetFramebufferWidth - Set current framebuffer width

func SetGamepadMappings

func SetGamepadMappings(mappings string) int32

SetGamepadMappings - Set internal gamepad mappings (SDL_GameControllerDB)

func SetGamepadVibration

func SetGamepadVibration(gamepad int32, leftMotor, rightMotor, duration float32)

SetGamepadVibration - Set gamepad vibration for both motors (duration in seconds)

func SetGesturesEnabled

func SetGesturesEnabled(gestureFlags uint32)

SetGesturesEnabled - Enable a set of gestures using flags

func SetLineWidth

func SetLineWidth(width float32)

SetLineWidth - Set the line drawing width

func SetLoadFileDataCallback

func SetLoadFileDataCallback(fn LoadFileDataCallbackFn)

func SetLoadFileTextCallback

func SetLoadFileTextCallback(fn LoadFileTextCallbackFn)

RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver

func SetMasterVolume

func SetMasterVolume(volume float32)

SetMasterVolume - Set master volume (listener)

func SetMaterialTexture

func SetMaterialTexture(material *Material, mapType int32, texture Texture2D)

SetMaterialTexture - Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)

func SetMatrixModelview

func SetMatrixModelview(view Matrix)

SetMatrixModelview - Set a custom modelview matrix (replaces internal modelview matrix)

func SetMatrixProjection

func SetMatrixProjection(proj Matrix)

SetMatrixProjection - Set a custom projection matrix (replaces internal projection matrix)

func SetMatrixProjectionStereo

func SetMatrixProjectionStereo(right Matrix, left Matrix)

SetMatrixProjectionStereo - Set eyes projection matrices for stereo rendering

func SetMatrixViewOffsetStereo

func SetMatrixViewOffsetStereo(right Matrix, left Matrix)

SetMatrixViewOffsetStereo - Set eyes view offsets matrices for stereo rendering

func SetModelMeshMaterial

func SetModelMeshMaterial(model *Model, meshId int32, materialId int32)

SetModelMeshMaterial - Set material for a mesh

func SetMouseCursor

func SetMouseCursor(cursor MouseCursorType)

SetMouseCursor - Set mouse cursor

func SetMouseOffset

func SetMouseOffset(offsetX, offsetY int)

SetMouseOffset - Set mouse offset

func SetMousePosition

func SetMousePosition(x, y int)

SetMousePosition - Set mouse position XY

func SetMouseScale

func SetMouseScale(scaleX, scaleY float32)

SetMouseScale - Set mouse scaling

func SetMusicPan

func SetMusicPan(music Music, pan float32)

SetMusicPan - Set pan for a music (0.5 is center)

func SetMusicPitch

func SetMusicPitch(music Music, pitch float32)

SetMusicPitch - Set pitch for a music (1.0 is base level)

func SetMusicVolume

func SetMusicVolume(music Music, volume float32)

SetMusicVolume - Set volume for music (1.0 is max level)

func SetRenderBatchActive

func SetRenderBatchActive(batch *RenderBatch)

SetRenderBatchActive - Set the active render batch for rlgl (NULL for default internal)

func SetShaderValue

func SetShaderValue(shader Shader, locIndex int32, value []float32, uniformType ShaderUniformDataType)

SetShaderValue - Set shader uniform value (float)

func SetShaderValueMatrix

func SetShaderValueMatrix(shader Shader, locIndex int32, mat Matrix)

SetShaderValueMatrix - Set shader uniform value (matrix 4x4)

func SetShaderValueTexture

func SetShaderValueTexture(shader Shader, locIndex int32, texture *Texture2D)

SetShaderValueTexture - Set shader uniform value for texture (sampler2d)

func SetShaderValueV

func SetShaderValueV(shader Shader, locIndex int32, value []float32, uniformType ShaderUniformDataType, count int32)

SetShaderValueV - Set shader uniform value (float)

func SetShapesTexture

func SetShapesTexture(texture Texture2D, source rect2.Float32)

SetShapesTexture - Define default texture used to draw shapes

func SetSoundPan

func SetSoundPan(sound Sound, pan float32)

SetSoundPan - Set pan for a sound (0.5 is center)

func SetSoundPitch

func SetSoundPitch(sound Sound, pitch float32)

SetSoundPitch - Set pitch for a sound (1.0 is base level)

func SetSoundVolume

func SetSoundVolume(sound Sound, volume float32)

SetSoundVolume - Set volume for a sound (1.0 is max level)

func SetTargetFPS

func SetTargetFPS[T IntegerT](fps T)

SetTargetFPS - Set target FPS (maximum)

func SetTextLineSpacing

func SetTextLineSpacing(spacing int)

SetTextLineSpacing - Set vertical line spacing when drawing with line-breaks

func SetTexture

func SetTexture(id uint32)

SetTexture - Set current texture for render batch and check buffers limits

func SetTextureFilter

func SetTextureFilter(texture Texture2D, filterMode TextureFilterMode)

SetTextureFilter - Set texture scaling filter mode

func SetTextureWrap

func SetTextureWrap(texture Texture2D, wrapMode TextureWrapMode)

SetTextureWrap - Set texture wrapping mode

func SetTraceLogCallback

func SetTraceLogCallback(fn TraceLogCallbackFun)

SetTraceLogCallback - set a call-back function for trace log

func SetTraceLogLevel

func SetTraceLogLevel(logLevel TraceLogLevel)

SetTraceLogLevel - Set the current threshold (minimum) log level

func SetUniform

func SetUniform(locIndex int32, value []float32, uniformType int32)

SetUniform - Set shader value uniform

func SetUniformMatrices

func SetUniformMatrices(locIndex int32, mat []Matrix)

SetUniformMatrices - Set shader value matrices

func SetUniformMatrix

func SetUniformMatrix(locIndex int32, mat Matrix)

SetUniformMatrix - Set shader value matrix

func SetUniformSampler

func SetUniformSampler(locIndex int32, textureId uint32)

SetUniformSampler - Set shader value sampler

func SetVertexAttributeDivisor

func SetVertexAttributeDivisor(index uint32, divisor int32)

SetVertexAttributeDivisor .

func SetWindowIcon

func SetWindowIcon(image Image)

SetWindowIcon - Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)

func SetWindowIcons

func SetWindowIcons(images []Image, count int32)

SetWindowIcons - Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)

func SetWindowMaxSize

func SetWindowMaxSize(w, h int)

SetWindowMaxSize - Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)

func SetWindowMinSize

func SetWindowMinSize(w, h int)

SetWindowMinSize - Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)

func SetWindowMonitor

func SetWindowMonitor(monitor int)

SetWindowMonitor - Set monitor for the current window (fullscreen mode)

func SetWindowOpacity

func SetWindowOpacity(opacity float32)

SetWindowOpacity - Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)

func SetWindowPosition

func SetWindowPosition(x, y int)

SetWindowPosition - Set window position on screen (only PLATFORM_DESKTOP)

func SetWindowSize

func SetWindowSize(w, h int)

SetWindowSize - Set window dimensions

func SetWindowState

func SetWindowState(flags uint32)

SetWindowState - Set window configuration state using flags

func SetWindowTitle

func SetWindowTitle(title string)

SetWindowTitle - Set title for window (only PLATFORM_DESKTOP)

func ShowCursor

func ShowCursor()

ShowCursor - Shows cursor

func StartAutomationEventRecording

func StartAutomationEventRecording()

StartAutomationEventRecording - Start recording automation events (AutomationEventList must be set)

func StopAudioStream

func StopAudioStream(stream AudioStream)

StopAudioStream - Stop audio stream

func StopAutomationEventRecording

func StopAutomationEventRecording()

StopAutomationEventRecording - Stop recording automation events

func StopMusicStream

func StopMusicStream(music Music)

StopMusicStream - Stop music playing

func StopSound

func StopSound(sound Sound)

StopSound - Stop playing a sound

func SwapScreenBuffer

func SwapScreenBuffer()

SwapScreenBuffer - Swap back buffer to front buffer

func TakeScreenshot

func TakeScreenshot(name string)

TakeScreenshot - Takes a screenshot of current screen (saved a .png)

func TexCoord2f

func TexCoord2f(x float32, y float32)

TexCoord2f - Define one vertex (texture coordinate) - 2 float

func TextureParameters

func TextureParameters(id uint32, param int32, value int32)

TextureParameters - Set texture parameters (filter, wrap)

func ToggleBorderlessWindowed

func ToggleBorderlessWindowed()

ToggleBorderlessWindowed - Borderless fullscreen toggle (only PLATFORM_DESKTOP)

func ToggleFullscreen

func ToggleFullscreen()

ToggleFullscreen - Fullscreen toggle (only PLATFORM_DESKTOP)

func TraceLog

func TraceLog(logLevel TraceLogLevel, text string, v ...interface{})

TraceLog - Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)

func Translatef

func Translatef(x float32, y float32, z float32)

Translatef - Multiply the current matrix by a translation matrix

func UnloadAudioStream

func UnloadAudioStream(stream *AudioStream)

UnloadAudioStream - Unload audio stream and free memory

func UnloadAutomationEventList

func UnloadAutomationEventList(list *AutomationEventList)

UnloadAutomationEventList - Unload automation events list from file

func UnloadDroppedFiles

func UnloadDroppedFiles()

UnloadDroppedFiles - Unload dropped filepaths

func UnloadFont

func UnloadFont(font *Font)

UnloadFont - Unload Font from GPU memory (VRAM)

func UnloadFontData

func UnloadFontData(glyphs []GlyphInfo)

UnloadFontData - Unload font chars info data (RAM)

func UnloadFramebuffer

func UnloadFramebuffer(id uint32)

UnloadFramebuffer - Delete framebuffer from GPU

func UnloadImage

func UnloadImage(image *Image)

UnloadImage - Unload image from CPU memory (RAM)

func UnloadImageColors

func UnloadImageColors(cols []colorex.RGBA)

UnloadImageColors - Unload color data loaded with LoadImageColors()

func UnloadMaterial

func UnloadMaterial(material *Material)

UnloadMaterial - Unload material textures from VRAM

func UnloadMesh

func UnloadMesh(mesh *Mesh)

UnloadMesh - Unload mesh from memory (RAM and/or VRAM)

func UnloadModel

func UnloadModel(model *Model)

UnloadModel - Unload model from memory (RAM and/or VRAM)

func UnloadModelAnimation

func UnloadModelAnimation(anim *ModelAnimation)

UnloadModelAnimation - Unload animation data

func UnloadModelAnimations

func UnloadModelAnimations(animations []ModelAnimation)

UnloadModelAnimations - Unload animation array data

func UnloadMusicStream

func UnloadMusicStream(music *Music)

UnloadMusicStream - Unload music stream

func UnloadRenderBatch

func UnloadRenderBatch(batch RenderBatch)

UnloadRenderBatch - Unload render batch system

func UnloadRenderTexture

func UnloadRenderTexture(target *RenderTexture2D)

UnloadRenderTexture - Unload render texture from GPU memory

func UnloadShader

func UnloadShader(shader *Shader)

UnloadShader - Unload a custom shader from memory

func UnloadShaderBuffer

func UnloadShaderBuffer(id uint32)

UnloadShaderBuffer - Unload shader storage buffer object (SSBO)

func UnloadShaderProgram

func UnloadShaderProgram(id uint32)

UnloadShaderProgram - Unload shader program

func UnloadSound

func UnloadSound(sound *Sound)

UnloadSound - Unload sound

func UnloadSoundAlias

func UnloadSoundAlias(sound Sound)

UnloadSoundAlias - Unload a sound alias (does not deallocate sample data)

func UnloadTexture

func UnloadTexture(texture *Texture2D)

UnloadTexture - Unload texture from GPU memory

func UnloadVertexBuffer

func UnloadVertexBuffer(vboId uint32)

UnloadVertexBuffer .

func UnloadVrStereoConfig

func UnloadVrStereoConfig(config VrStereoConfig)

UnloadVrStereoConfig - Unload VR stereo config

func UnloadWave

func UnloadWave(wave *Wave)

UnloadWave - Unload wave data

func UnloadWaveSamples

func UnloadWaveSamples(samples []float32)

UnloadWaveSamples - Unload samples data loaded with LoadWaveSamples()

func UpdateAudioStream

func UpdateAudioStream(stream AudioStream, data []float32)

UpdateAudioStream - Update audio stream buffers with data

func UpdateMeshBuffer

func UpdateMeshBuffer(mesh Mesh, index int, data []byte, offset int)

UpdateMeshBuffer - Update mesh vertex data in GPU for a specific buffer index

func UpdateModelAnimation

func UpdateModelAnimation(model Model, anim ModelAnimation, frame int32)

UpdateModelAnimation - Update model animation pose (CPU)

func UpdateModelAnimationBones

func UpdateModelAnimationBones(model Model, anim ModelAnimation, frame int32)

UpdateModelAnimationBones - Update model animation mesh bone matrices (GPU skinning)

func UpdateMusicStream

func UpdateMusicStream(music Music)

UpdateMusicStream - Updates buffers for music streaming

func UpdateShaderBuffer

func UpdateShaderBuffer(id uint32, data unsafe.Pointer, dataSize uint32, offset uint32)

UpdateShaderBuffer - Update SSBO buffer data

func UpdateSound

func UpdateSound(sound Sound, data []byte, samplesCount int32)

UpdateSound - Update sound buffer with new data

func UpdateTexture

func UpdateTexture(texture *Texture2D, pixels []colorex.RGBA)

UpdateTexture - Update GPU texture with new data

func UpdateTextureFromImage

func UpdateTextureFromImage(texture Texture2D, image Image)

#cgo noescape UpdateTexture #cgo nocallback UpdateTexture

func UpdateTextureRec

func UpdateTextureRec(texture Texture2D, rec rect2.Float32, pixels []colorex.RGBA)

UpdateTextureRec - Update GPU texture rectangle with new data

func UploadMesh

func UploadMesh(mesh *Mesh, dynamic bool)

UploadMesh - Upload vertex data into a VAO (if supported) and VBO

func Vector3ToFloat

func Vector3ToFloat(vec vector3.Float32) []float32

Vector3ToFloat - Converts Vector3 to float32 slice

func Vertex2f

func Vertex2f(x float32, y float32)

Vertex2f - Define one vertex (position) - 2 float

func Vertex2i

func Vertex2i(x int32, y int32)

Vertex2i - Define one vertex (position) - 2 int

func Vertex3f

func Vertex3f(x float32, y float32, z float32)

Vertex3f - Define one vertex (position) - 3 float

func Viewport

func Viewport(x int32, y int32, width int32, height int32)

Viewport - Set the viewport area

func WaitTime

func WaitTime(seconds float64)

WaitTime - Wait for some time (halt program execution)

func WaveCrop

func WaveCrop(wave *Wave, initFrame int32, finalFrame int32)

WaveCrop - Crop a wave to defined frames range

func WaveFormat

func WaveFormat(wave *Wave, sampleRate int32, sampleSize int32, channels int32)

WaveFormat - Convert wave data to desired format

func WindowShouldClose

func WindowShouldClose() bool

WindowShouldClose - Check if KeyEscape pressed or Close icon pressed

Types

type Asset

type Asset interface {
	io.ReadSeeker
	io.Closer

	Size() int64
}

Asset file

func OpenAsset

func OpenAsset(name string) (Asset, error)

OpenAsset - Open asset

type AudioBuffer

type AudioBuffer struct {
	Converter            maDataConverter
	Callback             *[0]byte
	Processor            *AudioProcessor
	Volume               float32
	Pitch                float32
	Pan                  float32
	Playing              bool
	Paused               bool
	Looping              bool
	Usage                int32
	IsSubBufferProcessed [2]bool
	SizeInFrames         uint32
	FrameCursorPos       uint32
	FramesProcessed      uint32
	Data                 *uint8
	Next                 *AudioBuffer
	Prev                 *AudioBuffer
}

type AudioCallback

type AudioCallback func(data []float32, frames int)

AudioCallback function.

type AudioProcessor

type AudioProcessor struct {
	Process *[0]byte
	Next    *AudioProcessor
	Prev    *AudioProcessor
}

type AudioStream

type AudioStream struct {
	// Buffer
	Buffer *AudioBuffer
	// Processor
	Processor *AudioProcessor
	// Frequency (samples per second)
	SampleRate uint32
	// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
	SampleSize uint32
	// Number of channels (1-mono, 2-stereo)
	Channels uint32
	// contains filtered or unexported fields
}

AudioStream type NOTE: Useful to create custom audio streams not bound to a specific file

func LoadAudioStream

func LoadAudioStream(sampleRate uint32, sampleSize uint32, channels uint32) AudioStream

LoadAudioStream - Load audio stream (to stream raw audio pcm data)

func (AudioStream) IsValid

func (s AudioStream) IsValid() bool

Checks if an audio stream is valid (buffers initialized)

type AutomationEvent

type AutomationEvent C.AutomationEvent

AutomationEvent - Automation event

type AutomationEventList

type AutomationEventList C.AutomationEventList

func LoadAutomationEventList

func LoadAutomationEventList(fileName string) AutomationEventList

LoadAutomationEventList - Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS

type BlendFactor

type BlendFactor int32
const (
	BlendZero BlendFactor = iota // 0: GL_ZERO
	BlendOne                     // 1: GL_ONE
)

GL blending factors

const (
	BlendSrcColor         BlendFactor = iota + 0x0300 // 0x0300: GL_SRC_COLOR
	BlendOneMinusSrcColor                             // 0x0301: GL_ONE_MINUS_SRC_COLOR
	BlendSrcAlpha                                     // 0x0302: GL_SRC_ALPHA
	BlendOneMinusSrcAlpha                             // 0x0303: GL_ONE_MINUS_SRC_ALPHA
	BlendDstAlpha                                     // 0x0304: GL_DST_ALPHA
	BlendOneMinusDstAlpha                             // 0x0305: GL_ONE_MINUS_DST_ALPHA
	BlendDstColor                                     // 0x0306: GL_DST_COLOR
	BlendOneMinusDstColor                             // 0x0307: GL_ONE_MINUS_DST_COLOR
	BlendSrcAlphaSaturate                             // 0x0308: GL_SRC_ALPHA_SATURATE
)
const (
	BlendConstantColor         BlendFactor = iota + 0x8001 // 0x8001: GL_CONSTANT_COLOR
	BlendOneMinusConstantColor                             // 0x8002: GL_ONE_MINUS_CONSTANT_COLOR
	BlendConstantAlpha                                     // 0x8003: GL_CONSTANT_ALPHA
	BlendOneMinusConstantAlpha                             // 0x8004: GL_ONE_MINUS_CONSTANT_ALPHA
)

type BlendFunc

type BlendFunc int32
const (
	// GL blending functions/equations
	BlendFuncAdd             BlendFunc = 0x8006 // GL_FUNC_ADD
	BlendMin                 BlendFunc = 0x8007 // GL_MIN
	BlendMax                 BlendFunc = 0x8008 // GL_MAX
	BlendFuncSubtract        BlendFunc = 0x800A // GL_FUNC_SUBTRACT
	BlendFuncReverseSubtract BlendFunc = 0x800B // GL_FUNC_REVERSE_SUBTRACT
)

type BlendMode

type BlendMode int32

BlendMode type

const (
	BlendAlpha            BlendMode = iota // Blend textures considering alpha (default)
	BlendAdditive                          // Blend textures adding colors
	BlendMultiplied                        // Blend textures multiplying colors
	BlendAddColors                         // Blend textures adding colors (alternative)
	BlendSubtractColors                    // Blend textures subtracting colors (alternative)
	BlendAlphaPremultiply                  // Blend premultiplied textures considering alpha
	BlendCustom                            // Blend textures using custom src/dst factors
	BlendCustomSeparate                    // Blend textures using custom rgb/alpha separate src/dst factors
)

Color blending modes (pre-defined)

type BoneInfo

type BoneInfo struct {
	Name   [32]int8
	Parent int32
}

BoneInfo type

type BoundingBox

type BoundingBox struct {
	// Minimum vertex box-corner
	Min vector3.Float32
	// Maximum vertex box-corner
	Max vector3.Float32
}

BoundingBox type

func GetMeshBoundingBox

func GetMeshBoundingBox(mesh Mesh) BoundingBox

GetMeshBoundingBox - Compute mesh bounding box limits

func GetModelBoundingBox

func GetModelBoundingBox(model Model) BoundingBox

GetModelBoundingBox - Compute model bounding box limits (considers all meshes

func NewBoundingBox

func NewBoundingBox(min, max vector3.Float32) BoundingBox

NewBoundingBox - Returns new BoundingBox

type Camera

type Camera = Camera3D

Camera type fallback, defaults to Camera3D

type Camera2D

type Camera2D struct {
	// Camera offset (displacement from target)
	Offset vector2.Float32
	// Camera target (rotation and zoom origin)
	Target vector2.Float32
	// Camera rotation in degrees
	Rotation float32
	// Camera zoom (scaling), should be 1.0f by default
	Zoom float32
}

Camera2D type, defines a 2d camera

func NewCamera2D

func NewCamera2D(offset, target vector2.Float32, rotation, zoom float32) Camera2D

NewCamera2D - Returns new Camera2D

type Camera3D

type Camera3D struct {
	// Camera position
	Position vector3.Float32
	// Camera target it looks-at
	Target vector3.Float32
	// Camera up vector (rotation over its axis)
	Up vector3.Float32
	// Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
	Fovy float32
	// Camera type, controlling projection type, either CameraPerspective or CameraOrthographic.
	Projection CameraProjection
}

Camera3D type, defines a camera position/orientation in 3d space

func NewCamera3D

func NewCamera3D(pos, target, up vector3.Float32, fovy float32, ct CameraProjection) Camera3D

NewCamera3D - Returns new Camera3D

type CameraMode

type CameraMode int32

CameraMode type

const (
	CameraCustom CameraMode = iota
	CameraFree
	CameraOrbital
	CameraFirstPerson
	CameraThirdPerson
)

Camera system modes

type CameraProjection

type CameraProjection int32

CameraProjection type

const (
	CameraPerspective CameraProjection = iota
	CameraOrthographic
)

Camera projection modes

type ConfigFlags

type ConfigFlags = uint32
const (
	FlagVsyncHint              ConfigFlags = 0x00000040 // Set to try enabling V-Sync on GPU
	FlagFullscreenMode         ConfigFlags = 0x00000002 // Set to run program in fullscreen
	FlagWindowResizable        ConfigFlags = 0x00000004 // Set to allow resizable window
	FlagWindowUndecorated      ConfigFlags = 0x00000008 // Set to disable window decoration (frame and buttons)
	FlagWindowHidden           ConfigFlags = 0x00000080 // Set to hide window
	FlagWindowMinimized        ConfigFlags = 0x00000200 // Set to minimize window (iconify)
	FlagWindowMaximized        ConfigFlags = 0x00000400 // Set to maximize window (expanded to monitor)
	FlagWindowUnfocused        ConfigFlags = 0x00000800 // Set to window non focused
	FlagWindowTopmost          ConfigFlags = 0x00001000 // Set to window always on top
	FlagWindowAlwaysRun        ConfigFlags = 0x00000100 // Set to allow windows running while minimized
	FlagWindowTransparent      ConfigFlags = 0x00000010 // Set to allow transparent window
	FlagWindowHighdpi          ConfigFlags = 0x00002000 // Set to support HighDPI
	FlagWindowMousePassthrough ConfigFlags = 0x00004000 // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
	FlagBorderlessWindowedMode ConfigFlags = 0x00008000 // Set to run program in borderless windowed mode
	FlagMsaa4xHint             ConfigFlags = 0x00000020 // Set to try enabling MSAA 4X
	FlagInterlacedHint         ConfigFlags = 0x00010000 // Set to try enabling interlaced video format (for V3D)
)

type CoordinateT

type CoordinateT interface {
	NumberT
}

type DrawCall

type DrawCall struct {
	Mode            int32
	VertexCount     int32
	VertexAlignment int32
	TextureId       uint32
}

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)

type FloatT

type FloatT interface {
	float32 | float64
}

type Font

type Font struct {
	// Base size (default chars height)
	BaseSize int32
	// Number of characters
	GlyphCount int32
	// Padding around the chars
	GlyphPadding int32
	// Characters texture atlas
	Texture Texture2D
	// Characters rectangles in texture
	Recs *rect2.Float32
	// Characters info data
	Glyphs *GlyphInfo
}

Font type, includes texture and charSet array data

func GetFontDefault

func GetFontDefault() Font

GetFontDefault - Get the default Font

func LoadFont

func LoadFont(fileName string) Font

LoadFont - Load a Font image into GPU memory (VRAM)

func LoadFontEx

func LoadFontEx(fileName string, fontSize int32, fontChars []rune, runesNumber ...int32) Font

LoadFontEx - Load Font from file with extended parameters

func LoadFontFromImage

func LoadFontFromImage(image Image, key colorex.RGBA, firstChar int32) Font

LoadFontFromImage - Loads an Image font file (XNA style)

func LoadFontFromMemory

func LoadFontFromMemory(fileType string, fileData []byte, fontSize int32, codepoints []rune) Font

LoadFontFromMemory - Load font from memory buffer, fileType refers to extension: i.e. ".ttf"

func (Font) DrawEx

func (f Font) DrawEx(text string, position vector2.Float32, fontSize float32, spacing float32, tint colorex.RGBA)

DrawTextEx - Draw text using Font and additional parameters

func (Font) DrawLayout

func (f Font) DrawLayout(text string, fontSize float32, spacing float32, tint colorex.RGBA, layoutFn func(wh vector2.Float32) rect2.Float32)

func (Font) GetRecs

func (f Font) GetRecs() []rect2.Float32

func (Font) IsValid

func (f Font) IsValid() bool

func (Font) MeasureEx

func (f Font) MeasureEx(text string, fontSize float32, spacing float32) vector2.Float32

MeasureTextEx - Measure string size for Font

type FontPreset

type FontPreset struct {
	Font

	FontSize float32
	Spacing  float32
}

Font type, includes texture and charSet array data

func (FontPreset) DrawEx

func (f FontPreset) DrawEx(text string, position vector2.Float32, tint colorex.RGBA)

func (FontPreset) DrawLayout

func (f FontPreset) DrawLayout(text string, tint colorex.RGBA, layoutFn func(wh vector2.Float32) rect2.Float32)

func (FontPreset) MeasureEx

func (f FontPreset) MeasureEx(text string) vector2.Float32

MeasureTextEx - Measure string size for Font

type FramebufferAttachTextureType

type FramebufferAttachTextureType = int32

FramebufferAttachTextureType type

type FramebufferAttachType

type FramebufferAttachType = int32

FramebufferAttachType type

type GamepadAxisType

type GamepadAxisType int32

Gamepad Axis

const (
	GamepadAxisLeftX        GamepadAxisType = iota // Gamepad left stick X axis
	GamepadAxisLeftY                               // Gamepad left stick Y axis
	GamepadAxisRightX                              // Gamepad right stick X axis
	GamepadAxisRightY                              // Gamepad right stick Y axis
	GamepadAxisLeftTrigger                         // Gamepad back trigger left, pressure level: [1..-1]
	GamepadAxisRightTrigger                        // Gamepad back trigger right, pressure level: [1..-1]
)

type GamepadButtonType

type GamepadButtonType int32

Gamepad Buttons

const (
	GamepadButtonUnknown        GamepadButtonType = iota // Unknown button, just for error checking
	GamepadButtonLeftFaceUp                              // Gamepad left DPAD up button
	GamepadButtonLeftFaceRight                           // Gamepad left DPAD right button
	GamepadButtonLeftFaceDown                            // Gamepad left DPAD down button
	GamepadButtonLeftFaceLeft                            // Gamepad left DPAD left button
	GamepadButtonRightFaceUp                             // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
	GamepadButtonRightFaceRight                          // Gamepad right button right (i.e. PS3: Square, Xbox: X)
	GamepadButtonRightFaceDown                           // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
	GamepadButtonRightFaceLeft                           // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
	GamepadButtonLeftTrigger1                            // Gamepad top/back trigger left (first), it could be a trailing button
	GamepadButtonLeftTrigger2                            // Gamepad top/back trigger left (second), it could be a trailing button
	GamepadButtonRightTrigger1                           // Gamepad top/back trigger right (one), it could be a trailing button
	GamepadButtonRightTrigger2                           // Gamepad top/back trigger right (second), it could be a trailing button
	GamepadButtonMiddleLeft                              // Gamepad center buttons, left one (i.e. PS3: Select)
	GamepadButtonMiddle                                  // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
	GamepadButtonMiddleRight                             // Gamepad center buttons, right one (i.e. PS3: Start)
	GamepadButtonLeftThumb                               // Gamepad joystick pressed button left
	GamepadButtonRightThumb                              // Gamepad joystick pressed button right
)

type Gestures

type Gestures uint32

Gestures type

const (
	GestureNone       Gestures = 0
	GestureTap        Gestures = 1
	GestureDoubleTap  Gestures = 2
	GestureHold       Gestures = 4
	GestureDrag       Gestures = 8
	GestureSwipeRight Gestures = 16
	GestureSwipeLeft  Gestures = 32
	GestureSwipeUp    Gestures = 64
	GestureSwipeDown  Gestures = 128
	GesturePinchIn    Gestures = 256
	GesturePinchOut   Gestures = 512
)

Gestures types NOTE: It could be used as flags to enable only some gestures

func GetGestureDetected

func GetGestureDetected() Gestures

GetGestureDetected - Get latest detected gesture

type GlVersion

type GlVersion = int32

GlVersion type

type GlyphInfo

type GlyphInfo struct {
	// Character value (Unicode)
	Value int32
	// Character offset X when drawing
	OffsetX int32
	// Character offset Y when drawing
	OffsetY int32
	// Character advance position X
	AdvanceX int32
	// Character image data
	Image Image
}

GlyphInfo - Font character info

func GetGlyphInfo

func GetGlyphInfo(font Font, codepoint int32) GlyphInfo

GetGlyphInfo - Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found

func LoadFontData

func LoadFontData(fileData []byte, fontSize int32, codePoints []rune, codepointCount, typ int32) []GlyphInfo

LoadFontData - Load font data for further use

func NewGlyphInfo

func NewGlyphInfo(value int32, offsetX, offsetY, advanceX int32, image Image) GlyphInfo

NewGlyphInfo - Returns new CharInfo

type Image

type Image struct {
	// Image raw Data
	Data unsafe.Pointer
	// Image base width
	Width int32
	// Image base height
	Height int32
	// Mipmap levels, 1 by default
	Mipmaps int32
	// Data format (PixelFormat)
	Format PixelFormat
}

Image type, bpp always RGBA (32bit) NOTE: Data stored in CPU memory (RAM)

func GenImageCellular

func GenImageCellular(width, height, tileSize int) Image

GenImageCellular - Generate image: cellular algorithm. Bigger tileSize means bigger cells

func GenImageChecked

func GenImageChecked(width, height, checksX, checksY int, col1, col2 colorex.RGBA) Image

GenImageChecked - Generate image: checked

func GenImageColor

func GenImageColor(width, height int, col colorex.RGBA) Image

GenImageColor - Generate image: plain color

func GenImageFontAtlas

func GenImageFontAtlas(glyphs []GlyphInfo, glyphRecs []*rect2.Float32, fontSize int32, padding int32, packMethod int32) Image

GenImageFontAtlas - Generate image font atlas using chars info

func GenImageGradientLinear

func GenImageGradientLinear(width, height, direction int, start, end colorex.RGBA) Image

GenImageGradientLinear - Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient

func GenImageGradientRadial

func GenImageGradientRadial(width, height int, density float32, inner, outer colorex.RGBA) Image

GenImageGradientRadial - Generate image: radial gradient

func GenImageGradientSquare

func GenImageGradientSquare(width, height int, density float32, inner, outer colorex.RGBA) Image

GenImageGradientSquare - Generate image: square gradient

func GenImagePerlinNoise

func GenImagePerlinNoise(width, height, offsetX, offsetY int, scale float32) Image

GenImagePerlinNoise - Generate image: perlin noise

func GenImageText

func GenImageText(width, height int, text string) Image

GenImageText - Generate image: grayscale image from text data

func GenImageWhiteNoise

func GenImageWhiteNoise(width, height int, factor float32) Image

GenImageWhiteNoise - Generate image: white noise

func GetClipboardImage

func GetClipboardImage() Image

GetClipboardImage - Get clipboard image content

Only works with SDL3 backend or Windows with GLFW/RGFW

func ImageCopy

func ImageCopy(image *Image) Image

ImageCopy - Create an image duplicate (useful for transformations)

func ImageFromChannel

func ImageFromChannel(image Image, selectedChannel int32) Image

ImageFromChannel - Create an image from a selected channel of another image (GRAYSCALE)

func ImageFromImage

func ImageFromImage(image *Image, rec rect2.Float32) Image

Create an image from another image piece

func ImageText

func ImageText(text string, fontSize int32, col colorex.RGBA) Image

ImageText - Create an image from text (default font)

func ImageTextEx

func ImageTextEx(font Font, text string, fontSize, spacing float32, tint colorex.RGBA) Image

ImageTextEx - Create an image from text (custom sprite font)

func LoadImage

func LoadImage(fileName string) Image

LoadImage - Load an image into CPU memory (RAM)

func LoadImageAnim

func LoadImageAnim(fileName string, frames *int32) Image

LoadImageAnim - Load image sequence from file (frames appended to image.data)

func LoadImageAnimFromMemory

func LoadImageAnimFromMemory(fileType string, fileData []byte, dataSize int32, frames *int32) *Image

LoadImageAnimFromMemory - Load image sequence from memory buffer

func LoadImageFromMemory

func LoadImageFromMemory(fileType string, fileData []byte, dataSize int32) Image

LoadImageFromMemory - Load image from memory buffer, fileType refers to extension: i.e. ".png"

func LoadImageFromScreen

func LoadImageFromScreen() Image

LoadImageFromScreen - Load image from screen buffer (screenshot)

func LoadImageFromTexture

func LoadImageFromTexture(texture Texture2D) Image

#cgo noescape LoadImageFromTexture #cgo nocallback LoadImageFromTexture LoadImageFromTexture - Get pixel data from GPU texture and return an Image

func LoadImageRaw

func LoadImageRaw(fileName string, width, height int32, format PixelFormat, headerSize int32) Image

LoadImageRaw - Load image data from RAW file

func NewImage

func NewImage(data []byte, width, height, mipmaps int32, format PixelFormat) *Image

NewImage - Returns new Image

func NewImageFromImage

func NewImageFromImage(img image.Image) Image

NewImageFromImage - Returns new Image from Go image.Image

func ReloadImageFromTexture

func ReloadImageFromTexture(texture Texture2D, image Image) Image

#cgo noescape ReloadImageFromTexture #cgo nocallback ReloadImageFromTexture

func (*Image) DrawDef

func (i *Image) DrawDef(dst *Image, dstRect rect2.Float32)

func (Image) GetRect

func (i Image) GetRect() rect2.Float32

func (Image) GetSize

func (i Image) GetSize() vector2.Float32

func (Image) IsNull

func (t Image) IsNull() bool

func (Image) IsReady

func (t Image) IsReady() bool

func (Image) IsValid

func (image Image) IsValid() bool

IsImageValid - Check if an image is valid (data and parameters)

func (*Image) ToImage

func (i *Image) ToImage() image.Image

ToImage converts a Image to Go image.Image

func (*Image) Unload

func (i *Image) Unload()

type ImageAtlas

type ImageAtlas struct {
	Image Image
	Atlas []rect2.Float32
}

func LoadImageAtlas

func LoadImageAtlas(width, height int, fileNames ...string) (ImageAtlas, error)

func LoadImageAtlasEx

func LoadImageAtlasEx(width, height int, imgFn func(path string) Image, fileNames ...string) (ImageAtlas, error)

func (*ImageAtlas) Unload

func (i *ImageAtlas) Unload()

type IntegerT

type IntegerT interface {
	int | int8 | int16 | int32 | int64
}

type KeyType

type KeyType int32
const (
	// KeyNull is used for no key pressed
	KeyNull KeyType = 0

	// Keyboard Function Keys
	KeySpace        KeyType = 32
	KeyEscape       KeyType = 256
	KeyEnter        KeyType = 257
	KeyTab          KeyType = 258
	KeyBackspace    KeyType = 259
	KeyInsert       KeyType = 260
	KeyDelete       KeyType = 261
	KeyRight        KeyType = 262
	KeyLeft         KeyType = 263
	KeyDown         KeyType = 264
	KeyUp           KeyType = 265
	KeyPageUp       KeyType = 266
	KeyPageDown     KeyType = 267
	KeyHome         KeyType = 268
	KeyEnd          KeyType = 269
	KeyCapsLock     KeyType = 280
	KeyScrollLock   KeyType = 281
	KeyNumLock      KeyType = 282
	KeyPrintScreen  KeyType = 283
	KeyPause        KeyType = 284
	KeyF1           KeyType = 290
	KeyF2           KeyType = 291
	KeyF3           KeyType = 292
	KeyF4           KeyType = 293
	KeyF5           KeyType = 294
	KeyF6           KeyType = 295
	KeyF7           KeyType = 296
	KeyF8           KeyType = 297
	KeyF9           KeyType = 298
	KeyF10          KeyType = 299
	KeyF11          KeyType = 300
	KeyF12          KeyType = 301
	KeyLeftShift    KeyType = 340
	KeyLeftControl  KeyType = 341
	KeyLeftAlt      KeyType = 342
	KeyLeftSuper    KeyType = 343
	KeyRightShift   KeyType = 344
	KeyRightControl KeyType = 345
	KeyRightAlt     KeyType = 346
	KeyRightSuper   KeyType = 347
	KeyKbMenu       KeyType = 348
	KeyLeftBracket  KeyType = 91
	KeyBackSlash    KeyType = 92
	KeyRightBracket KeyType = 93
	KeyGrave        KeyType = 96

	// Keyboard Number Pad Keys
	KeyKp0        KeyType = 320
	KeyKp1        KeyType = 321
	KeyKp2        KeyType = 322
	KeyKp3        KeyType = 323
	KeyKp4        KeyType = 324
	KeyKp5        KeyType = 325
	KeyKp6        KeyType = 326
	KeyKp7        KeyType = 327
	KeyKp8        KeyType = 328
	KeyKp9        KeyType = 329
	KeyKpDecimal  KeyType = 330
	KeyKpDivide   KeyType = 331
	KeyKpMultiply KeyType = 332
	KeyKpSubtract KeyType = 333
	KeyKpAdd      KeyType = 334
	KeyKpEnter    KeyType = 335
	KeyKpEqual    KeyType = 336

	// Keyboard Alpha Numeric Keys
	KeyApostrophe KeyType = 39
	KeyComma      KeyType = 44
	KeyMinus      KeyType = 45
	KeyPeriod     KeyType = 46
	KeySlash      KeyType = 47
	KeyZero       KeyType = 48
	KeyOne        KeyType = 49
	KeyTwo        KeyType = 50
	KeyThree      KeyType = 51
	KeyFour       KeyType = 52
	KeyFive       KeyType = 53
	KeySix        KeyType = 54
	KeySeven      KeyType = 55
	KeyEight      KeyType = 56
	KeyNine       KeyType = 57
	KeySemicolon  KeyType = 59
	KeyEqual      KeyType = 61
	KeyA          KeyType = 65
	KeyB          KeyType = 66
	KeyC          KeyType = 67
	KeyD          KeyType = 68
	KeyE          KeyType = 69
	KeyF          KeyType = 70
	KeyG          KeyType = 71
	KeyH          KeyType = 72
	KeyI          KeyType = 73
	KeyJ          KeyType = 74
	KeyK          KeyType = 75
	KeyL          KeyType = 76
	KeyM          KeyType = 77
	KeyN          KeyType = 78
	KeyO          KeyType = 79
	KeyP          KeyType = 80
	KeyQ          KeyType = 81
	KeyR          KeyType = 82
	KeyS          KeyType = 83
	KeyT          KeyType = 84
	KeyU          KeyType = 85
	KeyV          KeyType = 86
	KeyW          KeyType = 87
	KeyX          KeyType = 88
	KeyY          KeyType = 89
	KeyZ          KeyType = 90

	// Android keys
	KeyBack       KeyType = 4
	KeyMenu       KeyType = 5
	KeyVolumeUp   KeyType = 24
	KeyVolumeDown KeyType = 25
)

func GetCharPressed

func GetCharPressed() KeyType

GetCharPressed - Get the last char pressed

func GetKeyPressed

func GetKeyPressed() KeyType

GetKeyPressed - Get latest key pressed

type LoadFileDataCallbackFn

type LoadFileDataCallbackFn func(fileName string) []byte

type LoadFileTextCallbackFn

type LoadFileTextCallbackFn func(fileName string) string

type Mat2

type Mat2 struct {
	M00 float32
	M01 float32
	M10 float32
	M11 float32
}

Mat2 type (used for polygon shape rotation matrix)

func NewMat2

func NewMat2(m0, m1, m10, m11 float32) Mat2

NewMat2 - Returns new Mat2

type Material

type Material struct {
	// Shader
	Shader Shader
	// Maps
	Maps *MaterialMap
	// Generic parameters (if required)
	Params [4]float32
}

Material type

func LoadMaterialDefault

func LoadMaterialDefault() Material

LoadMaterialDefault - Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)

func LoadMaterials

func LoadMaterials(fileName string) []Material

LoadMaterials - Load material data (.MTL)

func (Material) GetMap

func (mt Material) GetMap(index int32) *MaterialMap

GetMap - Get pointer to MaterialMap by map type

func (Material) IsValid

func (material Material) IsValid() bool

IsMaterialValid - Check if a material is valid (shader assigned, map textures loaded in GPU)

type MaterialMap

type MaterialMap struct {
	// Texture
	Texture Texture2D
	// Color
	Color colorex.RGBA
	// Value
	Value float32
}

MaterialMap type

type Matrix

type Matrix struct {
	M0, M4, M8, M12  float32
	M1, M5, M9, M13  float32
	M2, M6, M10, M14 float32
	M3, M7, M11, M15 float32
}

Matrix type (OpenGL style 4x4 - right handed, column major)

func GetCameraMatrix

func GetCameraMatrix(camera Camera) Matrix

GetCameraMatrix - Returns camera transform matrix (view matrix)

func GetCameraMatrix2D

func GetCameraMatrix2D(camera Camera2D) Matrix

GetCameraMatrix2D - Returns camera 2d transform matrix

func GetMatrixModelview

func GetMatrixModelview() Matrix

GetMatrixModelview - Get internal modelview matrix

func GetMatrixProjection

func GetMatrixProjection() Matrix

GetMatrixProjection - Get internal projection matrix

func GetMatrixProjectionStereo

func GetMatrixProjectionStereo(eye int32) Matrix

GetMatrixProjectionStereo - Get internal projection matrix for stereo render (selected eye)

func GetMatrixTransform

func GetMatrixTransform() Matrix

GetMatrixTransform - Get internal accumulated transform matrix

func GetMatrixViewOffsetStereo

func GetMatrixViewOffsetStereo(eye int32) Matrix

GetMatrixViewOffsetStereo - Get internal view offset matrix for stereo render (selected eye)

func NewMatrix

func NewMatrix(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15 float32) Matrix

NewMatrix - Returns new Matrix

type Mesh

type Mesh struct {
	// Number of vertices stored in arrays
	VertexCount int32
	// Number of triangles stored (indexed or not)
	TriangleCount int32
	// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
	Vertices *float32
	// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
	Texcoords *float32
	// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
	Texcoords2 *float32
	// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
	Normals *float32
	// Vertex tangents (XYZ - 3 components per vertex) (shader-location = 4)
	Tangents *float32
	// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
	Colors *uint8
	// Vertex indices (in case vertex data comes indexed)
	Indices *uint16
	// AnimVertices
	AnimVertices *float32
	// AnimNormals
	AnimNormals *float32
	// BoneIds
	BoneIds *int32
	// BoneWeights
	BoneWeights *float32
	// Bones animated transformation matrices
	BoneMatrices *Matrix
	// Number of bones
	BoneCount int32
	// OpenGL Vertex Array Object id
	VaoID uint32
	// OpenGL Vertex Buffer Objects id (7 types of vertex data)
	VboID *uint32
}

Mesh - Vertex data definning a mesh

func GenMeshCone

func GenMeshCone(radius, height float32, slices int) Mesh

GenMeshCone - Generate cone/pyramid mesh

func GenMeshCube

func GenMeshCube(width, height, length float32) Mesh

GenMeshCube - Generate cuboid mesh

func GenMeshCubicmap

func GenMeshCubicmap(cubicmap Image, size vector3.Float32) Mesh

GenMeshCubicmap - Generate cubes-based map mesh from image data

func GenMeshCylinder

func GenMeshCylinder(radius, height float32, slices int) Mesh

GenMeshCylinder - Generate cylinder mesh

func GenMeshHeightmap

func GenMeshHeightmap(heightmap Image, size vector3.Float32) Mesh

GenMeshHeightmap - Generate heightmap mesh from image data

func GenMeshHemiSphere

func GenMeshHemiSphere(radius float32, rings, slices int) Mesh

GenMeshHemiSphere - Generate half-sphere mesh (no bottom cap)

func GenMeshKnot

func GenMeshKnot(radius, size float32, radSeg, sides int) Mesh

GenMeshKnot - Generate trefoil knot mesh

func GenMeshPlane

func GenMeshPlane(width, length float32, resX, resZ int) Mesh

GenMeshPlane - Generate plane mesh (with subdivisions)

func GenMeshPoly

func GenMeshPoly(sides int, radius float32) Mesh

GenMeshPoly - Generate polygonal mesh

func GenMeshSphere

func GenMeshSphere(radius float32, rings, slices int) Mesh

GenMeshSphere - Generate sphere mesh (standard sphere)

func GenMeshTorus

func GenMeshTorus(radius, size float32, radSeg, sides int) Mesh

GenMeshTorus - Generate torus mesh

func (Mesh) IsValid

func (m Mesh) IsValid() bool

type Model

type Model struct {
	// Local transform matrix
	Transform Matrix
	// Number of meshes
	MeshCount int32
	// Number of materials
	MaterialCount int32
	// Meshes array (c array)
	//
	// Use Model.GetMeshes instead (go slice)
	Meshes *Mesh
	// Materials array (c array)
	//
	// Use Model.GetMaterials instead (go slice)
	Materials *Material
	// Mesh material number
	MeshMaterial *int32
	// Number of bones
	BoneCount int32
	// Bones information (skeleton) (c array)
	//
	// Use Model.GetBones instead (go slice)
	Bones *BoneInfo
	// Bones base transformation (pose) (c array)
	//
	// Use Model.GetBindPose instead (go slice)
	BindPose *Transform
}

Model is struct of model, meshes, materials and animation data

func LoadModel

func LoadModel(fileName string) Model

LoadModel - Load model from file

func LoadModelFromMesh

func LoadModelFromMesh(data Mesh) Model

LoadModelFromMesh - Load model from mesh data

func (Model) GetBindPose

func (m Model) GetBindPose() []Transform

GetBindPose returns the bones base transformation of a model as go slice

func (Model) GetBones

func (m Model) GetBones() []BoneInfo

GetBones returns the bones information (skeleton) of a model as go slice

func (Model) GetMaterials

func (m Model) GetMaterials() []Material

GetMaterials returns the materials of a model as go slice

func (Model) GetMeshes

func (m Model) GetMeshes() []Mesh

GetMeshes returns the meshes of a model as go slice

func (Model) IsValid

func (model Model) IsValid() bool

type ModelAnimation

type ModelAnimation struct {
	BoneCount  int32
	FrameCount int32
	Bones      *BoneInfo
	FramePoses **Transform
	Name       [32]uint8
}

ModelAnimation type

func LoadModelAnimations

func LoadModelAnimations(fileName string) []ModelAnimation

LoadModelAnimations - Load model animations from file

func (ModelAnimation) GetBones

func (m ModelAnimation) GetBones() []BoneInfo

GetBones returns the bones information (skeleton) of a ModelAnimation as go slice

func (ModelAnimation) GetFramePose

func (m ModelAnimation) GetFramePose(frame, bone int) Transform

GetFramePose returns the Transform for a specific bone at a specific frame

func (ModelAnimation) GetName

func (m ModelAnimation) GetName() string

GetName returns the ModelAnimation's name as go string

type MouseButtonType

type MouseButtonType int32

Mouse Buttons

const (
	MouseButtonLeft MouseButtonType = iota
	MouseButtonRight
	MouseButtonMiddle
	MouseButtonSide
	MouseButtonExtra
	MouseButtonForward
	MouseButtonBack
	MouseButtonNone // keep last

	MouseLeftButton   = MouseButtonLeft
	MouseRightButton  = MouseButtonRight
	MouseMiddleButton = MouseButtonMiddle
)

type MouseCursorType

type MouseCursorType int32

Mouse cursor

const (
	MouseCursorDefault      MouseCursorType = iota // Default pointer shape
	MouseCursorArrow                               // Arrow shape
	MouseCursorIBeam                               // Text writing cursor shape
	MouseCursorCrosshair                           // Cross shape
	MouseCursorPointingHand                        // Pointing hand cursor
	MouseCursorResizeEW                            // Horizontal resize/move arrow shape
	MouseCursorResizeNS                            // Vertical resize/move arrow shape
	MouseCursorResizeNWSE                          // Top-left to bottom-right diagonal resize/move arrow shape
	MouseCursorResizeNESW                          // The top-right to bottom-left diagonal resize/move arrow shape
	MouseCursorResizeAll                           // The omni-directional resize/move cursor shape
	MouseCursorNotAllowed                          // The operation-not-allowed shape
)

type Music

type Music struct {
	Stream     AudioStream
	FrameCount uint32
	Looping    bool
	CtxType    int32
	CtxData    unsafe.Pointer
}

Music type (file streaming from memory) NOTE: Anything longer than ~10 seconds should be streamed

func LoadMusicStream

func LoadMusicStream(fileName string) Music

LoadMusicStream - Load music stream from file

func LoadMusicStreamFromMemory

func LoadMusicStreamFromMemory(fileType string, fileData []byte, dataSize int32) Music

LoadMusicStreamFromMemory - Load music stream from data

func (Music) IsValid

func (m Music) IsValid() bool

Checks if a music stream is valid (context and buffers initialized)

type NPatchInfo

type NPatchInfo struct {
	Source rect2.Float32 // Texture source rectangle
	Left   int32         // Left border offset
	Top    int32         // Top border offset
	Right  int32         // Right border offset
	Bottom int32         // Bottom border offset
	Layout NPatchLayout  // Layout of the n-patch: 3x3, 1x3 or 3x1
}

NPatchInfo type, n-patch layout info

type NPatchLayout

type NPatchLayout int32

N-patch layout

const (
	NPatchNinePatch            NPatchLayout = iota // Npatch layout: 3x3 tiles
	NPatchThreePatchVertical                       // Npatch layout: 1x3 tiles
	NPatchThreePatchHorizontal                     // Npatch layout: 3x1 tiles
)

type NumberT

type NumberT interface {
	IntegerT | FloatT
}

type PackContext

type PackContext struct {
	// contains filtered or unexported fields
}

func NewPackContext

func NewPackContext(width, height, size int) *PackContext

func (*PackContext) PackRects

func (ctx *PackContext) PackRects(rects ...PackRect) ([]PackRect, error)

type PackRect

type PackRect C.stbrp_rect

func NewRect

func NewRect(id int, w, h int) PackRect

func PackRects

func PackRects(width, height int, rects ...PackRect) ([]PackRect, error)

func (PackRect) H

func (r PackRect) H() int

func (PackRect) Id

func (r PackRect) Id() int

func (PackRect) Rect

func (r PackRect) Rect() rect2.Float32

func (PackRect) W

func (r PackRect) W() int

func (PackRect) X

func (r PackRect) X() int

func (PackRect) Y

func (r PackRect) Y() int

type PixelFormat

type PixelFormat int32

PixelFormat - Texture format

const (
	// 8 bit per pixel (no alpha)
	UncompressedGrayscale PixelFormat = iota + 1
	// 8*2 bpp (2 channels)
	UncompressedGrayAlpha
	// 16 bpp
	UncompressedR5g6b5
	// 24 bpp
	UncompressedR8g8b8
	// 16 bpp (1 bit alpha)
	UncompressedR5g5b5a1
	// 16 bpp (4 bit alpha)
	UncompressedR4g4b4a4
	// 32 bpp
	UncompressedR8g8b8a8
	// 32 bpp (1 channel - float)
	UncompressedR32
	// 32*3 bpp (3 channels - float)
	UncompressedR32g32b32
	// 32*4 bpp (4 channels - float)
	UncompressedR32g32b32a32
	// 4 bpp (no alpha)
	CompressedDxt1Rgb
	// 4 bpp (1 bit alpha)
	CompressedDxt1Rgba
	// 8 bpp
	CompressedDxt3Rgba
	// 8 bpp
	CompressedDxt5Rgba
	// 4 bpp
	CompressedEtc1Rgb
	// 4 bpp
	CompressedEtc2Rgb
	// 8 bpp
	CompressedEtc2EacRgba
	// 4 bpp
	CompressedPvrtRgb
	// 4 bpp
	CompressedPvrtRgba
	// 8 bpp
	CompressedAstc4x4Rgba
	// 2 bpp
	CompressedAstc8x8Rgba
)

Texture formats NOTE: Support depends on OpenGL version and platform

type Quaternion

type Quaternion = vector4.Float32

Quaternion, 4 components (Vector4 alias)

func NewQuaternion

func NewQuaternion(x, y, z, w float32) Quaternion

NewQuaternion - Returns new Quaternion

type Ray

type Ray struct {
	// Ray position (origin)
	Position vector3.Float32
	// Ray direction
	Direction vector3.Float32
}

Ray type (useful for raycast)

func GetMouseRay deprecated

func GetMouseRay(mousePosition vector2.Float32, camera Camera) Ray

GetMouseRay - Get a ray trace from mouse position

Deprecated: Use GetScreenToWorldRay instead.

func GetScreenToWorldRay

func GetScreenToWorldRay(position vector2.Float32, camera Camera) Ray

GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)

func GetScreenToWorldRayEx

func GetScreenToWorldRayEx(position vector2.Float32, camera Camera, width, height int32) Ray

GetScreenToWorldRayEx - Get a ray trace from screen position (i.e mouse) in a viewport

func NewRay

func NewRay(position, direction vector3.Float32) Ray

NewRay - Returns new Ray

type RayCollision

type RayCollision struct {
	Hit      bool
	Distance float32
	Point    vector3.Float32
	Normal   vector3.Float32
}

RayCollision type - ray hit information

func GetRayCollisionBox

func GetRayCollisionBox(ray Ray, box BoundingBox) RayCollision

GetRayCollisionBox - Get collision info between ray and box

func GetRayCollisionMesh

func GetRayCollisionMesh(ray Ray, mesh Mesh, transform Matrix) RayCollision

GetRayCollisionMesh - Get collision info between ray and mesh

func GetRayCollisionQuad

func GetRayCollisionQuad(ray Ray, p1, p2, p3, p4 vector3.Float32) RayCollision

GetRayCollisionQuad - Get collision info between ray and quad

func GetRayCollisionSphere

func GetRayCollisionSphere(ray Ray, center vector3.Float32, radius float32) RayCollision

GetRayCollisionSphere - Get collision info between ray and sphere

func GetRayCollisionTriangle

func GetRayCollisionTriangle(ray Ray, p1, p2, p3 vector3.Float32) RayCollision

GetRayCollisionTriangle - Get collision info between ray and triangle

func NewRayCollision

func NewRayCollision(hit bool, distance float32, point, normal vector3.Float32) RayCollision

NewRayCollision - Returns new RayCollision

type RectangleInt32

type RectangleInt32 = rect2.Int32

Rectangle type

type RenderBatch

type RenderBatch struct {
	BufferCount   int32
	CurrentBuffer int32
	VertexBuffer  *VertexBuffer
	Draws         *DrawCall
	DrawCounter   int32
	DurrentDepth  float32
}

RenderBatch type

func LoadRenderBatch

func LoadRenderBatch(numBuffers int32, bufferElements int32) RenderBatch

LoadRenderBatch - Load a render batch system

type RenderTexture2D

type RenderTexture2D struct {
	// Render texture (fbo) id
	ID uint32
	// Color buffer attachment texture
	Texture Texture2D
	// Depth buffer attachment texture
	Depth Texture2D
}

RenderTexture2D type, for texture rendering

func LoadRenderTexture

func LoadRenderTexture[WT, HT IntegerT](width WT, height HT) RenderTexture2D

LoadRenderTexture - Load a texture to be used for rendering

func LoadRenderTextureV

func LoadRenderTextureV[T IntegerT](wh vector2.Vector[T]) RenderTexture2D

func NewRenderTexture2D

func NewRenderTexture2D(id uint32, texture, depth Texture2D) *RenderTexture2D

NewRenderTexture2D - Returns new RenderTexture2D

func (RenderTexture2D) IsValid

func (r RenderTexture2D) IsValid() bool

func (*RenderTexture2D) Unload

func (r *RenderTexture2D) Unload()

type Shader

type Shader struct {
	// Shader program id
	ID uint32
	// Shader locations array
	Locs *int32
}

Shader type (generic shader)

func LoadShader

func LoadShader(vsFileName string, fsFileName string) Shader

LoadShader - Load a custom shader and bind default locations

func LoadShaderFromMemory

func LoadShaderFromMemory(vsCode string, fsCode string) Shader

LoadShaderFromMemory - Load shader from code strings and bind default locations

func NewShader

func NewShader(id uint32, locs *int32) Shader

NewShader - Returns new Shader

func (Shader) GetLocation

func (s Shader) GetLocation(index int32) int32

GetLocation - Get shader value's location

func (Shader) IsValid

func (s Shader) IsValid() bool

func (*Shader) UpdateLocation

func (s *Shader) UpdateLocation(index int32, loc int32)

UpdateLocation - Update shader value's location

type ShaderAttributeDataType

type ShaderAttributeDataType = int32

ShaderAttributeDataType type

type ShaderUniformDataType

type ShaderUniformDataType int32

ShaderUniformDataType type

const (
	// Shader uniform type: float
	ShaderUniformFloat ShaderUniformDataType = iota
	// Shader uniform type: vec2 (2 float)
	ShaderUniformVec2
	// Shader uniform type: vec3 (3 float)
	ShaderUniformVec3
	// Shader uniform type: vec4 (4 float)
	ShaderUniformVec4
	// Shader uniform type: int
	ShaderUniformInt
	// Shader uniform type: ivec2 (2 int)
	ShaderUniformIvec2
	// Shader uniform type: ivec2 (3 int)
	ShaderUniformIvec3
	// Shader uniform type: ivec2 (4 int)
	ShaderUniformIvec4
	// Shader uniform type: unsigned int
	ShaderUniformUint
	// Shader uniform type: uivec2 (2 unsigned int)
	ShaderUniformUivec2
	// Shader uniform type: uivec3 (3 unsigned int)
	ShaderUniformUivec3
	// Shader uniform type: uivec4 (4 unsigned int)
	ShaderUniformUivec4
	// Shader uniform type: sampler2d
	ShaderUniformSampler2d
)

ShaderUniformDataType enumeration

type Sound

type Sound struct {
	Stream     AudioStream
	FrameCount uint32
	// contains filtered or unexported fields
}

Sound source type

func LoadSound

func LoadSound(fileName string) Sound

LoadSound - Load sound to memory

func LoadSoundAlias

func LoadSoundAlias(source Sound) Sound

LoadSoundAlias - Create a new sound that shares the same sample data as the source sound, does not own the sound data

func LoadSoundFromWave

func LoadSoundFromWave(wave Wave) Sound

LoadSoundFromWave - Load sound to memory from wave data

func (Sound) IsValid

func (s Sound) IsValid() bool

Checks if a sound is valid (data loaded and buffers initialized)

type Texture2D

type Texture2D struct {
	// OpenGL texture id
	ID uint32
	// Texture base width
	Width int32
	// Texture base height
	Height int32
	// Mipmap levels, 1 by default
	Mipmaps int32
	// Data format (PixelFormat)
	Format PixelFormat
}

Texture2D type, bpp always RGBA (32bit) NOTE: Data stored in GPU memory

func GetShapesTexture

func GetShapesTexture() Texture2D

GetShapesTexture - Get texture that is used for shapes drawing

func LoadTexture

func LoadTexture(fileName string) Texture2D

LoadTexture - Load an image as texture into GPU memory

func LoadTextureCubemap

func LoadTextureCubemap(image Image, layout int32) Texture2D

LoadTextureCubemap - Loads a texture for a cubemap using given layout

func LoadTextureFromImage

func LoadTextureFromImage(image Image) Texture2D

#cgo noescape LoadTextureFromImage #cgo nocallback LoadTextureFromImage LoadTextureFromImage - Load a texture from image data

func NewTexture2D

func NewTexture2D(id uint32, width, height, mipmaps int32, format PixelFormat) *Texture2D

NewTexture2D - Returns new Texture2D

func ReloadTextureFromImage

func ReloadTextureFromImage(image Image, texture Texture2D) Texture2D

func (Texture2D) Draw

func (t Texture2D) Draw(posX int, posY int, tint colorex.RGBA)

func (Texture2D) DrawDef

func (t Texture2D) DrawDef(posX int, posY int)

func (Texture2D) DrawEx

func (t Texture2D) DrawEx(position vector2.Float32, rotation, scale float32, tint colorex.RGBA)

func (Texture2D) DrawExDef

func (t Texture2D) DrawExDef(position vector2.Float32)

func (Texture2D) DrawFlippedPro

func (t Texture2D) DrawFlippedPro(sourceRec, destRec rect2.Float32, origin vector2.Float32, rotation float32, tint colorex.RGBA)

func (Texture2D) DrawPro

func (t Texture2D) DrawPro(sourceRec, destRec rect2.Float32, origin vector2.Float32, rotation float32, tint colorex.RGBA)

func (Texture2D) DrawProDef

func (t Texture2D) DrawProDef(destRec rect2.Float32)

func (Texture2D) DrawProFlippedDef

func (t Texture2D) DrawProFlippedDef(destRec rect2.Float32)

func (Texture2D) DrawRec

func (t Texture2D) DrawRec(sourceRec rect2.Float32, position vector2.Float32, tint colorex.RGBA)

func (Texture2D) DrawTiled

func (t Texture2D) DrawTiled(source, dest rect2.Float32, origin vector2.Float32, rotation, scale float32, tint colorex.RGBA)

func (Texture2D) DrawTiledDef

func (t Texture2D) DrawTiledDef(dest rect2.Float32)

func (Texture2D) DrawV

func (t Texture2D) DrawV(position vector2.Float32, tint colorex.RGBA)

func (Texture2D) DrawVDef

func (t Texture2D) DrawVDef(position vector2.Float32)

func (Texture2D) GetRect

func (t Texture2D) GetRect() rect2.Float32

func (Texture2D) GetSize

func (t Texture2D) GetSize() vector2.Float32

func (Texture2D) IsValid

func (t Texture2D) IsValid() bool

func (*Texture2D) Unload

func (t *Texture2D) Unload()

type TextureAtlas

type TextureAtlas struct {
	Texture Texture2D
	Atlas   []rect2.Float32
}

func LoadTextureAtlas

func LoadTextureAtlas(width, height int, fileNames ...string) (TextureAtlas, error)

func LoadTextureAtlasEx

func LoadTextureAtlasEx(width, height int, imgFn func(path string) Image, fileNames ...string) (TextureAtlas, error)

func (*TextureAtlas) GetItem

func (t *TextureAtlas) GetItem(id int) TextureAtlasItem

func (*TextureAtlas) GetItemSet

func (t *TextureAtlas) GetItemSet(ids ...int) []TextureAtlasItem

func (*TextureAtlas) GetItemSetIter

func (t *TextureAtlas) GetItemSetIter(ids iter.Seq[int]) iter.Seq[TextureAtlasItem]

func (*TextureAtlas) ToItemSet

func (t *TextureAtlas) ToItemSet() []TextureAtlasItem

func (*TextureAtlas) Unload

func (t *TextureAtlas) Unload()

type TextureAtlasItem

type TextureAtlasItem struct {
	Texture *Texture2D
	Rect    rect2.Float32
}

func (TextureAtlasItem) DrawExDef

func (t TextureAtlasItem) DrawExDef(position vector2.Float32)

func (TextureAtlasItem) DrawProDef

func (t TextureAtlasItem) DrawProDef(destRec rect2.Float32)

func (TextureAtlasItem) DrawProTintedDef

func (t TextureAtlasItem) DrawProTintedDef(destRec rect2.Float32, tint colorex.RGBA)

type TextureFilterMode

type TextureFilterMode int32

TextureFilterMode - Texture filter mode

const (
	// No filter, just pixel aproximation
	FilterPoint TextureFilterMode = iota
	// Linear filtering
	FilterBilinear
	// Trilinear filtering (linear with mipmaps)
	FilterTrilinear
	// Anisotropic filtering 4x
	FilterAnisotropic4x
	// Anisotropic filtering 8x
	FilterAnisotropic8x
	// Anisotropic filtering 16x
	FilterAnisotropic16x
)

Texture parameters: filter mode NOTE 1: Filtering considers mipmaps if available in the texture NOTE 2: Filter is accordingly set for minification and magnification

type TextureWrapMode

type TextureWrapMode int32

TextureWrapMode - Texture wrap mode

const (
	WrapRepeat TextureWrapMode = iota
	WrapClamp
	WrapMirrorRepeat
	WrapMirrorClamp
)

Texture parameters: wrap mode

type TraceLogCallbackFun

type TraceLogCallbackFun func(int, string)

TraceLogCallbackFun - function that will recive the trace log messages

type TraceLogLevel

type TraceLogLevel int

TraceLogLevel parameter of trace log message

const (
	// Display all logs
	LogAll TraceLogLevel = iota
	// Trace logging, intended for internal use only
	LogTrace
	// Debug logging, used for internal debugging, it should be disabled on release builds
	LogDebug
	// Info logging, used for program execution info
	LogInfo
	// Warning logging, used on recoverable failures
	LogWarning
	// Error logging, used on unrecoverable failures
	LogError
	// Fatal logging, used to abort program: exit(EXIT_FAILURE)
	LogFatal
	// Disable logging
	LogNone
)

Trace log level NOTE: Organized by priority level

func GetTraceLogLevel

func GetTraceLogLevel() TraceLogLevel

SetTraceLogLevel - Set the current threshold (minimum) log level

type Transform

type Transform struct {
	Translation vector3.Float32
	Rotation    Quaternion
	Scale       vector3.Float32
}

Transform type

type Vector2T

type Vector2T interface {
	vector2.Float32 | vector2.Int
}

type Vector4

type Vector4 = vector4.Float32

type VertexBuffer

type VertexBuffer struct {
	ElementCount int32     // Number of elements in the buffer (QUADS)
	Vertices     *float32  // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
	Texcoords    *float32  // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
	Normals      *float32  // Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
	Colors       *uint8    // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
	Indices      *uint32   // Vertex indices (in case vertex data comes indexed) (6 indices per quad)
	VaoId        uint32    // OpenGL Vertex Array Object id
	VboId        [5]uint32 // OpenGL Vertex Buffer Objects id (5 types of vertex data)
}

VertexBuffer - Dynamic vertex buffers (position + texcoords + colors + indices arrays)

type VrDeviceInfo

type VrDeviceInfo struct {
	HResolution            int32      // Horizontal resolution in pixels
	VResolution            int32      // Vertical resolution in pixels
	HScreenSize            float32    // Horizontal size in meters
	VScreenSize            float32    // Vertical size in meters
	VScreenCenter          float32    // Screen center in meters
	EyeToScreenDistance    float32    // Distance between eye and display in meters
	LensSeparationDistance float32    // Lens separation distance in meters
	InterpupillaryDistance float32    // IPD (distance between pupils) in meters
	LensDistortionValues   [4]float32 // Lens distortion constant parameters
	ChromaAbCorrection     [4]float32 // Chromatic aberration correction parameters
}

VrDeviceInfo, Head-Mounted-Display device parameters

type VrStereoConfig

type VrStereoConfig struct {
	Projection        [2]Matrix  // VR projection matrices (per eye)
	ViewOffset        [2]Matrix  // VR view offset matrices (per eye)
	LeftLensCenter    [2]float32 // VR left lens center
	RightLensCenter   [2]float32 // VR right lens center
	LeftScreenCenter  [2]float32 // VR left screen center
	RightScreenCenter [2]float32 // VR right screen center
	Scale             [2]float32 // VR distortion scale
	ScaleIn           [2]float32 // VR distortion scale in
}

VrStereoConfig, VR stereo rendering configuration for simulator

func LoadVrStereoConfig

func LoadVrStereoConfig(device VrDeviceInfo) VrStereoConfig

LoadVrStereoConfig - Load VR stereo config for VR simulator device parameters

type Wave

type Wave struct {
	// Number of samples
	FrameCount uint32
	// Frequency (samples per second)
	SampleRate uint32
	// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
	SampleSize uint32
	// Number of channels (1-mono, 2-stereo)
	Channels uint32
	// Buffer data pointer
	Data unsafe.Pointer
}

Wave type, defines audio wave data

func LoadWave

func LoadWave(fileName string) Wave

LoadWave - Load wave data from file into RAM

func LoadWaveFromMemory

func LoadWaveFromMemory(fileType string, fileData []byte, dataSize int32) Wave

LoadWaveFromMemory - Load wave from memory buffer, fileType refers to extension: i.e. ".wav"

func NewWave

func NewWave(sampleCount, sampleRate, sampleSize, channels uint32, data []byte) Wave

NewWave - Returns new Wave

func WaveCopy

func WaveCopy(wave Wave) Wave

WaveCopy - Copy a wave to a new wave

func (Wave) IsValid

func (w Wave) IsValid() bool

Checks if wave data is valid (data loaded and parameters)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL