Documentation ¶
Overview ¶
Package raylib - Go bindings for raylib, a simple and easy-to-use library to learn 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.
Example:
package main import "github.com/gen2brain/raylib-go/raylib" func main() { rl.InitWindow(800, 450, "raylib [core] example - basic window") rl.SetTargetFPS(60) for !rl.WindowShouldClose() { rl.BeginDrawing() rl.ClearBackground(rl.RayWhite) rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LightGray) rl.EndDrawing() } rl.CloseWindow() }
Index ¶
- Constants
- Variables
- func BeginBlendMode(mode BlendMode)
- func BeginDrawing()
- func BeginMode2D[T Number](camera Camera2D[T])
- func BeginMode3D(camera Camera)
- func BeginScissorMode(x, y, width, height int32)
- func BeginShaderMode(shader Shader)
- func BeginTextureMode(target RenderTexture2D)
- func CheckCollisionBoxSphere(box BoundingBox, centerSphere Vector3, radiusSphere float32) bool
- func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
- func CheckCollisionCircleRec[T Number](center Vector2[T], radius float32, rec Rectangle) bool
- func CheckCollisionCircles[T Number](center1 Vector2[T], radius1 float32, center2 Vector2[T], radius2 float32) bool
- func CheckCollisionLines[T Number](startPos1, endPos1, startPos2, endPos2 Vector2[T], point *Vector2[T]) bool
- func CheckCollisionPointCircle[T Number](point Vector2[T], center Vector2[T], radius float32) bool
- func CheckCollisionPointLine[T Number](point, p1, p2 Vector2[T], threshold int32) bool
- func CheckCollisionPointRec[T Number](point Vector2[T], rec Rectangle) bool
- func CheckCollisionPointTriangle[T Number](point, p1, p2, p3 Vector2[T]) bool
- func CheckCollisionRecs(rec1, rec2 Rectangle) bool
- func CheckCollisionSpheres(centerA Vector3, radiusA float32, centerB Vector3, radiusB float32) bool
- func Clamp(value, min, max float32) float32
- func ClearBackground(col color.RGBA)
- func ClearWindowState(flags uint32)
- func CloseAudioDevice()
- func CloseWindow()
- func ColorAlpha(col color.RGBA, alpha float32) color.RGBA
- func ColorAlphaBlend(src, dst, tint color.RGBA) color.RGBA
- func ColorFromHSV(hue, saturation, value float32) color.RGBA
- func ColorFromNormalized(normalized Vector4) color.RGBA
- func ColorToInt(col color.RGBA) int32
- func DisableCursor()
- func DisableEventWaiting()
- func DrawBillboard(camera Camera, texture Texture2D, center Vector3, size float32, ...)
- func DrawBillboardRec[T Number](camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, ...)
- func DrawBoundingBox(box BoundingBox, col color.RGBA)
- func DrawCircle(centerX, centerY int32, radius float32, col color.RGBA)
- func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawCircleGradient(centerX, centerY int32, radius float32, col1, col2 color.RGBA)
- func DrawCircleLines(centerX, centerY int32, radius float32, col color.RGBA)
- func DrawCircleSector[T Number](center Vector2[T], radius, startAngle, endAngle float32, segments int32, ...)
- func DrawCircleSectorLines[T Number](center Vector2[T], radius, startAngle, endAngle float32, segments int32, ...)
- func DrawCircleV[T, U Number](center Vector2[T], radius U, col color.RGBA)
- func DrawCube(position Vector3, width float32, height float32, length float32, ...)
- func DrawCubeTexture(texture Texture2D, position Vector3, width float32, height float32, ...)
- func DrawCubeV(position Vector3, size Vector3, col color.RGBA)
- func DrawCubeWires(position Vector3, width float32, height float32, length float32, ...)
- func DrawCubeWiresV(position Vector3, size Vector3, col color.RGBA)
- func DrawCylinder(position Vector3, radiusTop float32, radiusBottom float32, height float32, ...)
- func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, ...)
- func DrawEllipse(centerX, centerY int32, radiusH, radiusV float32, col color.RGBA)
- func DrawEllipseLines(centerX, centerY int32, radiusH, radiusV float32, col color.RGBA)
- func DrawFPS[X, Y Number](posX X, posY Y)
- func DrawGrid(slices int32, spacing float32)
- func DrawLine[T, U, X, Y Number](startPosX T, startPosY U, endPosX X, endPosY Y, col color.RGBA)
- func DrawLine3D(startPos Vector3, endPos Vector3, col color.RGBA)
- func DrawLineBezier[T Number](startPos, endPos Vector2[T], thick float32, col color.RGBA)
- func DrawLineBezierCubic[T Number](startPos Vector2[T], endPos Vector2[T], startControlPos Vector2[T], ...)
- func DrawLineBezierQuad[T Number](startPos Vector2[T], endPos Vector2[T], controlPos Vector2[T], thick float32, ...)
- func DrawLineEx[T Number](startPos, endPos Vector2[T], thick float32, col color.RGBA)
- func DrawLineStrip[T Number](points []Vector2[T], pointCount int32, col color.RGBA)
- func DrawLineV[T Number](startPos, endPos Vector2[T], col color.RGBA)
- func DrawMesh(mesh Mesh, material Material, transform Matrix)
- func DrawMeshInstanced(mesh Mesh, material Material, transforms []Matrix, instances int)
- func DrawModel(model Model, position Vector3, scale float32, tint color.RGBA)
- func DrawModelEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawModelWires(model Model, position Vector3, scale float32, tint color.RGBA)
- func DrawModelWiresEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawPixel(posX, posY int32, col color.RGBA)
- func DrawPixelV[T Number](position Vector2[T], col color.RGBA)
- func DrawPlane[T Number](centerPos Vector3, size Vector2[T], col color.RGBA)
- func DrawPoint3D(position Vector3, col color.RGBA)
- func DrawPoly[T Number](center Vector2[T], sides int32, radius, rotation float32, col color.RGBA)
- func DrawPolyLines[T Number](center Vector2[T], sides int32, radius, rotation float32, col color.RGBA)
- func DrawPolyLinesEx[T Number](center Vector2[T], sides int32, radius float32, rotation float32, ...)
- func DrawRay(ray Ray, col color.RGBA)
- func DrawRectangle[X, Y, W, H Number](posX X, posY Y, width W, height H, col color.RGBA)
- func DrawRectangleGradientEx(rec Rectangle, col1, col2, col3, col4 color.RGBA)
- func DrawRectangleGradientH(posX, posY, width, height int32, col1, col2 color.RGBA)
- func DrawRectangleGradientV(posX, posY, width, height int32, col1, col2 color.RGBA)
- func DrawRectangleLines(posX, posY, width, height int32, col color.RGBA)
- func DrawRectangleLinesEx(rec Rectangle, lineThick float32, col color.RGBA)
- func DrawRectanglePro[T Number](rec Rectangle, origin Vector2[T], rotation float32, col color.RGBA)
- func DrawRectangleRec(rec Rectangle, col color.RGBA)
- func DrawRectangleRounded(rec Rectangle, roundness float32, segments int32, col color.RGBA)
- func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments, lineThick float32, col color.RGBA)
- func DrawRectangleV[T Number](position Vector2[T], size Vector2[T], col color.RGBA)
- func DrawRing[T Number](center Vector2[T], innerRadius, outerRadius, startAngle, endAngle float32, ...)
- func DrawRingLines[T Number](center Vector2[T], innerRadius, outerRadius, startAngle, endAngle float32, ...)
- func DrawSphere(centerPos Vector3, radius float32, col color.RGBA)
- func DrawSphereEx(centerPos Vector3, radius float32, rings int32, slices int32, col color.RGBA)
- func DrawSphereWires(centerPos Vector3, radius float32, rings int32, slices int32, col color.RGBA)
- func DrawText[X, Y, T Number](text string, posX X, posY Y, fontSize T, col color.RGBA)
- func DrawTextEx[T Number](font Font, text string, position Vector2[T], fontSize float32, spacing float32, ...)
- func DrawTexture(texture Texture2D, posX int32, posY int32, tint color.RGBA)
- func DrawTextureEx[T Number](texture Texture2D, position Vector2[T], rotation, scale float32, ...)
- func DrawTexturePro[T Number](texture Texture2D, sourceRec, destRec Rectangle, origin Vector2[T], ...)
- func DrawTextureQuad[T Number](texture Texture2D, tiling, offset Vector2[T], rectangle Rectangle, ...)
- func DrawTextureRec[T Number](texture Texture2D, sourceRec Rectangle, position Vector2[T], tint color.RGBA)
- func DrawTextureTiled[T Number](texture Texture2D, sourceRec, destRec Rectangle, origin Vector2[T], ...)
- func DrawTextureV[T Number](texture Texture2D, position Vector2[T], tint color.RGBA)
- func DrawTriangle[T Number](v1, v2, v3 Vector2[T], col color.RGBA)
- func DrawTriangleFan[T Number](points []Vector2[T], col color.RGBA)
- func DrawTriangleLines[T Number](v1, v2, v3 Vector2[T], col color.RGBA)
- func DrawTriangleStrip[T Number](points []Vector2[T], col color.RGBA)
- func EnableCursor()
- func EnableEventWaiting()
- func EndBlendMode()
- func EndDrawing()
- func EndMode2D()
- func EndMode3D()
- func EndScissorMode()
- func EndShaderMode()
- func EndTextureMode()
- func ExportImage(image Image, name string)
- func ExportMesh(mesh Mesh, fileName string)
- func ExportWave(wave Wave, fileName string)
- func Fade(col color.RGBA, alpha float32) color.RGBA
- func GenTextureMipmaps(texture *Texture2D)
- func GetCharPressed() int32
- func GetClipboardText() string
- func GetColor(hexValue uint) color.RGBA
- func GetCurrentMonitor() int
- func GetFPS() float32
- func GetFrameTime() float32
- func GetGamepadAxisCount(gamepad int32) int32
- func GetGamepadAxisMovement(gamepad, axis int32) float32
- func GetGamepadButtonPressed() int32
- func GetGamepadName(gamepad int32) string
- func GetGestureDragAngle() float32
- func GetGestureHoldDuration() float32
- func GetGesturePinchAngle() float32
- func GetGlyphIndex[T Number](font Font, codepoint T) int32
- func GetImageColor(image Image, x, y int32) color.RGBA
- func GetKeyPressed() int32
- func GetMonitorCount() int
- func GetMonitorHeight(monitor int) int
- func GetMonitorName(monitor int) string
- func GetMonitorPhysicalHeight(monitor int) int
- func GetMonitorPhysicalWidth(monitor int) int
- func GetMonitorRefreshRate(monitor int) int
- func GetMonitorWidth(monitor int) int
- func GetMouseWheelMove() float32
- func GetMouseX() int32
- func GetMouseY() int32
- func GetMusicTimeLength(music Music) float32
- func GetMusicTimePlayed(music Music) float32
- func GetPixelDataSize(width, height, format int32) int32
- func GetRandomValue(min, max int32) int32
- func GetRenderHeight() int
- func GetRenderWidth() int
- func GetScreenHeight() int
- func GetScreenWidth() int
- func GetShaderLocation(shader Shader, uniformName string) int32
- func GetShaderLocationAttrib(shader Shader, attribName string) int32
- func GetSoundsPlaying() int
- func GetTime() float64
- func GetTouchPointCount() int32
- func GetTouchPointId(index int32) int32
- func GetTouchX() int32
- func GetTouchY() int32
- func GetWindowHandle() unsafe.Pointer
- func HideCursor()
- func HomeDir() string
- func ImageAlphaClear(image *Image, col color.RGBA, threshold float32)
- func ImageAlphaCrop(image *Image, threshold float32)
- func ImageAlphaMask(image, alphaMask *Image)
- func ImageAlphaPremultiply(image *Image)
- func ImageClearBackground(dst *Image, col color.RGBA)
- func ImageColorBrightness(image *Image, brightness int32)
- func ImageColorContrast(image *Image, contrast float32)
- func ImageColorGrayscale(image *Image)
- func ImageColorInvert(image *Image)
- func ImageColorReplace(image *Image, col, replace color.RGBA)
- func ImageColorTint(image *Image, col color.RGBA)
- func ImageCrop(image *Image, crop Rectangle)
- func ImageDither(image *Image, rBpp, gBpp, bBpp, aBpp int32)
- func ImageDraw(dst, src *Image, srcRec, dstRec Rectangle, tint color.RGBA)
- func ImageDrawCircle(dst *Image, centerX, centerY, radius int32, col color.RGBA)
- func ImageDrawCircleV[T Number](dst *Image, center Vector2[T], radius int32, col color.RGBA)
- func ImageDrawPixel(dst *Image, posX, posY int32, col color.RGBA)
- func ImageDrawPixelV[T Number](dst *Image, position Vector2[T], col color.RGBA)
- func ImageDrawRectangle(dst *Image, x, y, width, height int32, col color.RGBA)
- func ImageDrawRectangleLines(dst *Image, rec Rectangle, thick int, col color.RGBA)
- func ImageDrawRectangleRec(dst *Image, rec Rectangle, col color.RGBA)
- func ImageDrawRectangleV[T Number](dst *Image, position, size Vector2[T], col color.RGBA)
- func ImageDrawText(dst *Image, posX, posY int32, text string, fontSize int32, col color.RGBA)
- func ImageDrawTextEx[T Number](dst *Image, position Vector2[T], font Font, text string, ...)
- func ImageFlipHorizontal(image *Image)
- func ImageFlipVertical(image *Image)
- func ImageFormat(image *Image, newFormat PixelFormat)
- func ImageMipmaps(image *Image)
- func ImageResize(image *Image, newWidth, newHeight int32)
- func ImageResizeCanvas(image *Image, newWidth, newHeight, offsetX, offsetY int32, col color.RGBA)
- func ImageResizeNN(image *Image, newWidth, newHeight int32)
- func ImageRotateCCW(image *Image)
- func ImageRotateCW(image *Image)
- func ImageToPOT(image *Image, fillColor color.RGBA)
- func InitAudioDevice()
- func InitWindow(width int32, height int32, title string)
- func IsAudioDeviceReady() bool
- func IsAudioStreamPlaying(stream AudioStream) bool
- func IsAudioStreamProcessed(stream AudioStream) bool
- func IsCursorHidden() bool
- func IsCursorOnScreen() bool
- func IsFileDropped() bool
- func IsGamepadAvailable(gamepad int32) bool
- func IsGamepadButtonDown(gamepad, button int32) bool
- func IsGamepadButtonPressed(gamepad, button int32) bool
- func IsGamepadButtonReleased(gamepad, button int32) bool
- func IsGamepadButtonUp(gamepad, button int32) bool
- func IsGestureDetected(gesture Gestures) bool
- func IsKeyDown(key int32) bool
- func IsKeyPressed(key int32) bool
- func IsKeyReleased(key int32) bool
- func IsKeyUp(key int32) bool
- func IsModelAnimationValid(model Model, anim ModelAnimation) bool
- func IsMouseButtonDown(button int32) bool
- func IsMouseButtonPressed(button int32) bool
- func IsMouseButtonReleased(button int32) bool
- func IsMouseButtonUp(button int32) bool
- func IsMusicStreamPlaying(music Music) bool
- func IsSoundPlaying(sound Sound) bool
- func IsWindowFocused() bool
- func IsWindowFullscreen() bool
- func IsWindowHidden() bool
- func IsWindowMaximized() bool
- func IsWindowMinimized() bool
- func IsWindowReady() bool
- func IsWindowResized() bool
- func IsWindowState(flag uint32) bool
- func LoadDroppedFiles() []string
- func LoadImageColors(img *Image) []color.RGBA
- func LoadWaveSamples(wave Wave) []float32
- func Mat2Set(matrix *Mat2, radians float32)
- func MatrixDeterminant(mat Matrix) float32
- func MatrixToFloat(mat Matrix) []float32
- func MatrixTrace(mat Matrix) float32
- func MaximizeWindow()
- func MeasureText[T Number](text string, fontSize T) int32
- func MinimizeWindow()
- func NewColor(r, g, b, a uint8) color.RGBA
- func OpenURL(url string)
- func PauseAudioStream(stream AudioStream)
- func PauseMusicStream(music Music)
- func PauseSound(sound Sound)
- func PlayAudioStream(stream AudioStream)
- func PlayMusicStream(music Music)
- func PlaySound(sound Sound)
- func PlaySoundMulti(sound Sound)
- func QuaternionLength(quat Quaternion) float32
- func QuaternionToAxisAngle(q Quaternion, outAxis *Vector3, outAngle *float32)
- func RestoreWindow()
- func ResumeAudioStream(stream AudioStream)
- func ResumeMusicStream(music Music)
- func ResumeSound(sound Sound)
- func SeekMusicStream(music Music, position float32)
- func SetAudioStreamBufferSizeDefault(size int32)
- func SetAudioStreamPan(stream AudioStream, pan float32)
- func SetAudioStreamPitch(stream AudioStream, pitch float32)
- func SetAudioStreamVolume(stream AudioStream, volume float32)
- func SetCallbackFunc(func())
- func SetCameraAltControl(altKey int32)
- func SetCameraMode(camera Camera, mode CameraMode)
- func SetCameraMoveControls(frontKey int32, backKey int32, rightKey int32, leftKey int32, upKey int32, ...)
- func SetCameraPanControl(panKey int32)
- func SetCameraSmoothZoomControl(szKey int32)
- func SetClipboardText(data string)
- func SetConfigFlags(flags uint32)
- func SetExitKey(key int32)
- func SetGamepadMappings(mappings string) int32
- func SetGesturesEnabled(gestureFlags uint32)
- func SetMasterVolume(volume float32)
- func SetMaterialTexture(material *Material, mapType int32, texture Texture2D)
- func SetMatrixModelview(view Matrix)
- func SetMatrixProjection(proj Matrix)
- func SetModelMeshMaterial(model *Model, meshId int32, materialId int32)
- func SetMouseCursor(cursor int32)
- func SetMouseOffset(offsetX, offsetY int)
- func SetMousePosition(x, y int)
- func SetMouseScale(scaleX, scaleY float32)
- func SetMusicPan(music Music, pan float32)
- func SetMusicPitch(music Music, pitch float32)
- func SetMusicVolume(music Music, volume float32)
- func SetShaderValue(shader Shader, locIndex int32, value []float32, ...)
- func SetShaderValueMatrix(shader Shader, locIndex int32, mat Matrix)
- func SetShaderValueTexture(shader Shader, locIndex int32, texture Texture2D)
- func SetShaderValueV(shader Shader, locIndex int32, value []float32, ...)
- func SetShapesTexture(texture Texture2D, source Rectangle)
- func SetSoundPan(sound Sound, pan float32)
- func SetSoundPitch(sound Sound, pitch float32)
- func SetSoundVolume(sound Sound, volume float32)
- func SetTargetFPS(fps int32)
- func SetTextureFilter(texture Texture2D, filterMode TextureFilterMode)
- func SetTextureWrap(texture Texture2D, wrapMode TextureWrapMode)
- func SetTraceLog(typeFlags int)
- func SetTraceLogCallback(fn TraceLogCallbackFun)
- func SetWindowIcon(image Image)
- func SetWindowMinSize(w, h int)
- func SetWindowMonitor(monitor int)
- func SetWindowOpacity(opacity float32)
- func SetWindowPosition(x, y int)
- func SetWindowSize(w, h int)
- func SetWindowState(flags uint32)
- func SetWindowTitle(title string)
- func ShowCursor()
- func StopAudioStream(stream AudioStream)
- func StopMusicStream(music Music)
- func StopSound(sound Sound)
- func StopSoundMulti()
- func TakeScreenshot(name string)
- func ToggleFullscreen()
- func TraceLog(msgType int, text string, v ...interface{})
- func UnloadAudioStream(stream AudioStream)
- func UnloadDroppedFiles()
- func UnloadFont(font Font)
- func UnloadImage(image *Image)
- func UnloadMaterial(material Material)
- func UnloadMesh(mesh *Mesh)
- func UnloadModel(model Model)
- func UnloadModelAnimation(anim ModelAnimation)
- func UnloadModelAnimations(animations []ModelAnimation)
- func UnloadMusicStream(music Music)
- func UnloadRenderTexture(target RenderTexture2D)
- func UnloadShader(shader Shader)
- func UnloadSound(sound Sound)
- func UnloadTexture(texture Texture2D)
- func UnloadWave(wave Wave)
- func UnloadWaveSamples(samples []float32)
- func UpdateAudioStream(stream AudioStream, data []float32, samplesCount int32)
- func UpdateCamera(camera *Camera)
- func UpdateModelAnimation(model Model, anim ModelAnimation, frame int32)
- func UpdateMusicStream(music Music)
- func UpdateSound(sound Sound, data []byte, samplesCount int32)
- func UpdateTexture(texture Texture2D, pixels []color.RGBA)
- func UpdateTextureRec(texture Texture2D, rec Rectangle, pixels []color.RGBA)
- func Vector2Angle[T Number](v1, v2 Vector2[T]) float32
- func Vector2CrossProduct[T Number](v1, v2 Vector2[T]) float32
- func Vector2Distance[T Number](v1, v2 Vector2[T]) float32
- func Vector2DotProduct[T Number](v1, v2 Vector2[T]) float32
- func Vector2LenSqr[T Number](vector Vector2[T]) float32
- func Vector2Length[T Number](v Vector2[T]) float32
- func Vector3Distance(v1, v2 Vector3) float32
- func Vector3DotProduct(v1, v2 Vector3) float32
- func Vector3Length(v Vector3) float32
- func Vector3ToFloat(vec Vector3) []float32
- func WaveCrop(wave Wave, initSample int32, finalSample int32)
- func WaveFormat(wave Wave, sampleRate int32, sampleSize int32, channels int32)
- func WindowShouldClose() bool
- type Asset
- type AudioStream
- type BlendMode
- type BoneInfo
- type BoundingBox
- type Camera
- type Camera2D
- type Camera3D
- type CameraMode
- type CameraProjection
- type Color
- type Font
- func GetFontDefault() Font
- func LoadFont(fileName string) Font
- func LoadFontEx(fileName string, fontSize int32, fontChars []rune) Font
- func LoadFontFromImage(image Image, key color.RGBA, firstChar int32) Font
- func LoadFontFromMemory(fileType string, fileData []byte, dataSize int32, fontSize int32, ...) Font
- type Gestures
- type GlyphInfo
- type Image
- func GenImageCellular(width, height, tileSize int) *Image
- func GenImageChecked(width, height, checksX, checksY int, col1, col2 color.RGBA) *Image
- func GenImageColor(width, height int, col color.RGBA) *Image
- func GenImageGradientH(width, height int, left, right color.RGBA) *Image
- func GenImageGradientRadial(width, height int, density float32, inner, outer color.RGBA) *Image
- func GenImageGradientV(width, height int, top, bottom color.RGBA) *Image
- func GenImageWhiteNoise(width, height int, factor float32) *Image
- func ImageCopy(image *Image) *Image
- func ImageText(text string, fontSize int32, col color.RGBA) *Image
- func ImageTextEx(font Font, text string, fontSize, spacing float32, tint color.RGBA) *Image
- func LoadImage(fileName string) *Image
- func LoadImageAnim(fileName string, frames *int32) *Image
- func LoadImageFromMemory(fileType string, fileData []byte, dataSize int32) *Image
- func LoadImageFromTexture(texture Texture2D) *Image
- func LoadImageRaw(fileName string, width, height int32, format PixelFormat, headerSize int32) *Image
- func NewImage(data []byte, width, height, mipmaps int32, format PixelFormat) *Image
- func NewImageFromImage(img image.Image) *Image
- type Mat2
- type Material
- type MaterialMap
- type Matrix
- func GetCameraMatrix(camera Camera) Matrix
- func GetCameraMatrix2D[T Number](camera Camera2D[T]) Matrix
- func MatrixAdd(left, right Matrix) Matrix
- func MatrixFrustum(left, right, bottom, top, near, far float32) Matrix
- func MatrixIdentity() Matrix
- func MatrixInvert(mat Matrix) Matrix
- func MatrixLookAt(eye, target, up Vector3) Matrix
- func MatrixMultiply(left, right Matrix) Matrix
- func MatrixNormalize(mat Matrix) Matrix
- func MatrixOrtho(left, right, bottom, top, near, far float32) Matrix
- func MatrixPerspective(fovy, aspect, near, far float32) Matrix
- func MatrixRotate(axis Vector3, angle float32) Matrix
- func MatrixRotateX(angle float32) Matrix
- func MatrixRotateXYZ(ang Vector3) Matrix
- func MatrixRotateY(angle float32) Matrix
- func MatrixRotateZ(angle float32) Matrix
- func MatrixScale(x, y, z float32) Matrix
- func MatrixSubtract(left, right Matrix) Matrix
- func MatrixTranslate(x, y, z float32) Matrix
- func MatrixTranspose(mat Matrix) Matrix
- func NewMatrix(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15 float32) Matrix
- func QuaternionToMatrix(q Quaternion) Matrix
- type Mesh
- func GenMeshCone(radius, height float32, slices int) Mesh
- func GenMeshCube(width, height, length float32) Mesh
- func GenMeshCubicmap(cubicmap Image, size Vector3) Mesh
- func GenMeshCylinder(radius, height float32, slices int) Mesh
- func GenMeshHeightmap(heightmap Image, size Vector3) Mesh
- func GenMeshHemiSphere(radius float32, rings, slices int) Mesh
- func GenMeshKnot(radius, size float32, radSeg, sides int) Mesh
- func GenMeshPlane(width, length float32, resX, resZ int) Mesh
- func GenMeshPoly(sides int, radius float32) Mesh
- func GenMeshSphere(radius float32, rings, slices int) Mesh
- func GenMeshTorus(radius, size float32, radSeg, sides int) Mesh
- type Model
- type ModelAnimation
- type Music
- type Number
- type PixelFormat
- type Quaternion
- func NewQuaternion(x, y, z, w float32) Quaternion
- func QuaternionFromAxisAngle(axis Vector3, angle float32) Quaternion
- func QuaternionFromMatrix(matrix Matrix) Quaternion
- func QuaternionInvert(quat Quaternion) Quaternion
- func QuaternionMultiply(q1, q2 Quaternion) Quaternion
- func QuaternionNormalize(q Quaternion) Quaternion
- func QuaternionSlerp(q1, q2 Quaternion, amount float32) Quaternion
- func QuaternionTransform(q Quaternion, mat Matrix) Quaternion
- type Ray
- type RayCollision
- func GetRayCollisionBox(ray Ray, box BoundingBox) RayCollision
- func GetRayCollisionMesh(ray Ray, mesh Mesh, transform Matrix) RayCollision
- func GetRayCollisionQuad(ray Ray, p1, p2, p3, p4 Vector3) RayCollision
- func GetRayCollisionSphere(ray Ray, center Vector3, radius float32) RayCollision
- func GetRayCollisionTriangle(ray Ray, p1, p2, p3 Vector3) RayCollision
- func NewRayCollision(hit bool, distance float32, point, normal Vector3) RayCollision
- type Rectangle
- type RectangleInt32
- type RenderTexture2D
- type Shader
- type ShaderUniformDataType
- type Sound
- type Texture2D
- type TextureFilterMode
- type TextureWrapMode
- type TraceLogCallbackFun
- type Transform
- type Vector2
- func GetGestureDragVector[T Number]() Vector2[T]
- func GetGesturePinchVector[T Number]() Vector2[T]
- func GetMonitorPosition[T Number](monitor int) Vector2[T]
- func GetMouseDelta[T Number]() Vector2[T]
- func GetMousePosition[T Number]() Vector2[T]
- func GetMouseWheelMoveV[T Number]() Vector2[T]
- func GetScreenToWorld2D[T Number](position Vector2[T], camera Camera2D[T]) Vector2[T]
- func GetTouchPosition[T Number](index int32) Vector2[T]
- func GetWindowPosition[T Number]() Vector2[T]
- func GetWindowScaleDPI[T Number]() Vector2[T]
- func GetWorldToScreen[T Number](position Vector3, camera Camera) Vector2[T]
- func GetWorldToScreen2D[T Number](position Vector2[T], camera Camera2D[T]) Vector2[T]
- func GetWorldToScreenEx[T Number](position Vector3, camera Camera, width int32, height int32) Vector2[T]
- func Mat2MultiplyVector2[T Number](matrix Mat2, vector Vector2[T]) Vector2[T]
- func MeasureTextEx[T Number](font Font, text string, fontSize float32, spacing float32) Vector2[T]
- func NewVector2[T Number](x, y float32) Vector2[T]
- func Vector2Add[T Number](v1, v2 Vector2[T]) Vector2[T]
- func Vector2Cross[T Number](value float32, vector Vector2[T]) Vector2[T]
- func Vector2DivideV[T Number](v1, v2 Vector2[T]) Vector2[T]
- func Vector2Lerp[T Number](v1, v2 Vector2[T], amount float32) Vector2[T]
- func Vector2Multiply[T Number](v1, v2 Vector2[T]) Vector2[T]
- func Vector2Negate[T Number](v Vector2[T]) Vector2[T]
- func Vector2Normalize[T Number](v Vector2[T]) Vector2[T]
- func Vector2One[T Number]() Vector2[T]
- func Vector2Scale[T Number](v Vector2[T], scale float32) Vector2[T]
- func Vector2Subtract[T Number](v1, v2 Vector2[T]) Vector2[T]
- func Vector2Zero[T Number]() Vector2[T]
- type Vector3
- func ColorToHSV(col color.RGBA) Vector3
- func NewVector3(X, Y, Z float32) Vector3
- func Vector3Add(v1, v2 Vector3) Vector3
- func Vector3Barycenter(p, a, b, c Vector3) Vector3
- func Vector3CrossProduct(v1, v2 Vector3) Vector3
- func Vector3Lerp(v1, v2 Vector3, amount float32) Vector3
- func Vector3Max(vec1, vec2 Vector3) Vector3
- func Vector3Min(vec1, vec2 Vector3) Vector3
- func Vector3Multiply(v Vector3, scalar float32) Vector3
- func Vector3MultiplyV(v1, v2 Vector3) Vector3
- func Vector3Negate(v Vector3) Vector3
- func Vector3Normalize(v Vector3) Vector3
- func Vector3One() Vector3
- func Vector3Perpendicular(v Vector3) Vector3
- func Vector3Reflect(vector, normal Vector3) Vector3
- func Vector3Scale(v Vector3, scale float32) Vector3
- func Vector3Subtract(v1, v2 Vector3) Vector3
- func Vector3Transform(v Vector3, mat Matrix) Vector3
- func Vector3Zero() Vector3
- type Vector4
- type Wave
Constants ¶
const ( Pi = 3.1415927 Deg2rad = 0.017453292 Rad2deg = 57.295776 // Set to try enabling V-Sync on GPU FlagVsyncHint = 0x00000040 // Set to run program in fullscreen FlagFullscreenMode = 0x00000002 // Set to allow resizable window FlagWindowResizable = 0x00000004 // Set to disable window decoration (frame and buttons) FlagWindowUndecorated = 0x00000008 // Set to hide window FlagWindowHidden = 0x00000080 // Set to minimize window (iconify) FlagWindowMinimized = 0x00000200 // Set to maximize window (expanded to monitor) FlagWindowMaximized = 0x00000400 // Set to window non focused FlagWindowUnfocused = 0x00000800 // Set to window always on top FlagWindowTopmost = 0x00001000 // Set to allow windows running while minimized FlagWindowAlwaysRun = 0x00000100 // Set to allow transparent window FlagWindowTransparent = 0x00000010 // Set to support HighDPI FlagWindowHighdpi = 0x00002000 // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED FlagWindowMousePassthrough = 0x00004000 // Set to try enabling MSAA 4X FlagMsaa4xHint = 0x00000020 // Set to try enabling interlaced video format (for V3D) FlagInterlacedHint = 0x00010000 // Keyboard Function Keys KeySpace = 32 KeyEscape = 256 KeyEnter = 257 KeyTab = 258 KeyBackspace = 259 KeyInsert = 260 KeyDelete = 261 KeyRight = 262 KeyLeft = 263 KeyDown = 264 KeyUp = 265 KeyPageUp = 266 KeyPageDown = 267 KeyHome = 268 KeyEnd = 269 KeyCapsLock = 280 KeyScrollLock = 281 KeyNumLock = 282 KeyPrintScreen = 283 KeyPause = 284 KeyF1 = 290 KeyF2 = 291 KeyF3 = 292 KeyF4 = 293 KeyF5 = 294 KeyF6 = 295 KeyF7 = 296 KeyF8 = 297 KeyF9 = 298 KeyF10 = 299 KeyF11 = 300 KeyF12 = 301 KeyLeftShift = 340 KeyLeftControl = 341 KeyLeftAlt = 342 KeyLeftSuper = 343 KeyRightShift = 344 KeyRightControl = 345 KeyRightAlt = 346 KeyRightSuper = 347 KeyKbMenu = 348 KeyLeftBracket = 91 KeyBackSlash = 92 KeyRightBracket = 93 KeyGrave = 96 // Keyboard Number Pad Keys KeyKp0 = 320 KeyKp1 = 321 KeyKp2 = 322 KeyKp3 = 323 KeyKp4 = 324 KeyKp5 = 325 KeyKp6 = 326 KeyKp7 = 327 KeyKp8 = 328 KeyKp9 = 329 KeyKpDecimal = 330 KeyKpDivide = 331 KeyKpMultiply = 332 KeyKpSubtract = 333 KeyKpAdd = 334 KeyKpEnter = 335 KeyKpEqual = 336 // Keyboard Alpha Numeric Keys KeyApostrophe = 39 KeyComma = 44 KeyMinus = 45 KeyPeriod = 46 KeySlash = 47 KeyZero = 48 KeyOne = 49 KeyTwo = 50 KeyThree = 51 KeyFour = 52 KeyFive = 53 KeySix = 54 KeySeven = 55 KeyEight = 56 KeyNine = 57 KeySemicolon = 59 KeyEqual = 61 KeyA = 65 KeyB = 66 KeyC = 67 KeyD = 68 KeyE = 69 KeyF = 70 KeyG = 71 KeyH = 72 KeyI = 73 KeyJ = 74 KeyK = 75 KeyL = 76 KeyM = 77 KeyN = 78 KeyO = 79 KeyP = 80 KeyQ = 81 KeyR = 82 KeyS = 83 KeyT = 84 KeyU = 85 KeyV = 86 KeyW = 87 KeyX = 88 KeyY = 89 KeyZ = 90 // Android keys KeyBack = 4 KeyMenu = 82 KeyVolumeUp = 24 KeyVolumeDown = 25 // Mouse Buttons MouseLeftButton = 0 MouseRightButton = 1 MouseMiddleButton = 2 // Touch points registered MaxTouchPoints = 2 // Gamepad Number GamepadPlayer1 = 0 GamepadPlayer2 = 1 GamepadPlayer3 = 2 GamepadPlayer4 = 3 // PS3 USB Controller Buttons GamepadPs3ButtonTriangle = 0 GamepadPs3ButtonCircle = 1 GamepadPs3ButtonCross = 2 GamepadPs3ButtonSquare = 3 GamepadPs3ButtonL1 = 6 GamepadPs3ButtonR1 = 7 GamepadPs3ButtonL2 = 4 GamepadPs3ButtonR2 = 5 GamepadPs3ButtonStart = 8 GamepadPs3ButtonSelect = 9 GamepadPs3ButtonUp = 24 GamepadPs3ButtonRight = 25 GamepadPs3ButtonDown = 26 GamepadPs3ButtonLeft = 27 GamepadPs3ButtonPs = 12 // PS3 USB Controller Axis GamepadPs3AxisLeftX = 0 GamepadPs3AxisLeftY = 1 GamepadPs3AxisRightX = 2 GamepadPs3AxisRightY = 5 // [1..-1] (pressure-level) GamepadPs3AxisL2 = 3 // [1..-1] (pressure-level) GamepadPs3AxisR2 = 4 // Xbox360 USB Controller Buttons GamepadXboxButtonA = 0 GamepadXboxButtonB = 1 GamepadXboxButtonX = 2 GamepadXboxButtonY = 3 GamepadXboxButtonLb = 4 GamepadXboxButtonRb = 5 GamepadXboxButtonSelect = 6 GamepadXboxButtonStart = 7 GamepadXboxButtonUp = 10 GamepadXboxButtonRight = 11 GamepadXboxButtonDown = 12 GamepadXboxButtonLeft = 13 GamepadXboxButtonHome = 8 // Android Gamepad Controller (SNES CLASSIC) GamepadAndroidDpadUp = 19 GamepadAndroidDpadDown = 20 GamepadAndroidDpadLeft = 21 GamepadAndroidDpadRight = 22 GamepadAndroidDpadCenter = 23 GamepadAndroidButtonA = 96 GamepadAndroidButtonB = 97 GamepadAndroidButtonC = 98 GamepadAndroidButtonX = 99 GamepadAndroidButtonY = 100 GamepadAndroidButtonZ = 101 GamepadAndroidButtonL1 = 102 GamepadAndroidButtonR1 = 103 GamepadAndroidButtonL2 = 104 GamepadAndroidButtonR2 = 105 // Xbox360 USB Controller Axis // [-1..1] (left->right) GamepadXboxAxisLeftX = 0 // [1..-1] (up->down) GamepadXboxAxisLeftY = 1 // [-1..1] (left->right) GamepadXboxAxisRightX = 2 // [1..-1] (up->down) GamepadXboxAxisRightY = 3 // [-1..1] (pressure-level) GamepadXboxAxisLt = 4 // [-1..1] (pressure-level) GamepadXboxAxisRt = 5 )
Some basic Defines
const ( LocVertexPosition = iota LocVertexTexcoord01 LocVertexTexcoord02 LocVertexNormal LocVertexTangent LocVertexColor LocMatrixMvp LocMatrixView LocMatrixProjection LocMatrixModel LocMatrixNormal LocVectorView LocColorDiffuse LocColorSpecular LocColorAmbient LocMapAlbedo LocMapMetalness LocMapNormal LocMapRoughness LocMapOcclusion LocMapEmission LocMapHeight LocMapCubemap LocMapIrradiance LocMapPrefilter LocMapBrdf )
Shader location point type
const ( MapAlbedo = iota MapMetalness MapNormal MapRoughness MapOcclusion MapEmission MapHeight MapBrdg MapCubemap MapIrradiance MapPrefilter )
Material map type
const ( MapDiffuse = MapAlbedo MapSpecular = MapMetalness LocMapDiffuse = LocMapAlbedo LocMapSpecular = LocMapMetalness )
Material map type
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
const ( LogAll = iota LogTrace LogDebug LogInfo LogWarning LogError LogFatal LogNone )
Log message types
Variables ¶
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
Functions ¶
func BeginBlendMode ¶
func BeginBlendMode(mode BlendMode)
BeginBlendMode - Begin blending mode (alpha, additive, multiplied)
func BeginMode2D ¶
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 BeginShaderMode ¶
func BeginShaderMode(shader Shader)
BeginShaderMode - Begin custom shader drawing
func BeginTextureMode ¶
func BeginTextureMode(target RenderTexture2D)
BeginTextureMode - Initializes render texture for drawing
func CheckCollisionBoxSphere ¶
func CheckCollisionBoxSphere(box BoundingBox, centerSphere Vector3, 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 CheckCollisionCircleRec ¶
CheckCollisionCircleRec - Check collision between circle and rectangle
func CheckCollisionCircles ¶
func CheckCollisionCircles[T Number](center1 Vector2[T], radius1 float32, center2 Vector2[T], radius2 float32) bool
CheckCollisionCircles - Check collision between two circles
func CheckCollisionLines ¶
func CheckCollisionLines[T Number](startPos1, endPos1, startPos2, endPos2 Vector2[T], point *Vector2[T]) bool
CheckCollisionLines - Check the collision between two lines defined by two points each, returns collision point by reference
func CheckCollisionPointCircle ¶
CheckCollisionPointCircle - Check if point is inside circle
func CheckCollisionPointLine ¶
CheckCollisionPointLine - Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
func CheckCollisionPointRec ¶
CheckCollisionPointRec - Check if point is inside rectangle
func CheckCollisionPointTriangle ¶
CheckCollisionPointTriangle - Check if point is inside a triangle
func CheckCollisionRecs ¶
CheckCollisionRecs - Check collision between two rectangles
func CheckCollisionSpheres ¶
CheckCollisionSpheres - Detect collision between two spheres
func ClearWindowState ¶
func ClearWindowState(flags uint32)
ClearWindowState - Clear window configuration state flags
func CloseAudioDevice ¶
func CloseAudioDevice()
CloseAudioDevice - Close the audio device and context
func ColorAlpha ¶
ColorAlpha - Returns color with alpha applied, alpha goes from 0.0f to 1.0f
func ColorAlphaBlend ¶
ColorAlphaBlend - Returns src alpha-blended into dst color with tint
func ColorFromHSV ¶
ColorFromHSV - Returns a Color from HSV values, hue [0..360], saturation/value [0..1]
func ColorFromNormalized ¶
ColorFromNormalized - Returns Color from normalized values [0..1]
func ColorToInt ¶
ColorToInt - Returns hexadecimal value for a Color
func DisableEventWaiting ¶
func DisableEventWaiting()
DisableEventWaiting - Disable waiting for events on EndDrawing(), automatic events polling
func DrawBillboard ¶
DrawBillboard - Draw a billboard texture
func DrawBillboardRec ¶
func DrawBillboardRec[T Number](camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, size Vector2[T], tint color.RGBA)
DrawBillboardRec - Draw a billboard texture defined by sourceRec
func DrawBoundingBox ¶
func DrawBoundingBox(box BoundingBox, col color.RGBA)
DrawBoundingBox - Draw bounding box (wires)
func DrawCircle ¶
DrawCircle - Draw a color-filled circle
func DrawCircle3D ¶
func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotationAngle float32, col color.RGBA)
DrawCircle3D - Draw a circle in 3D world space
func DrawCircleGradient ¶
DrawCircleGradient - Draw a gradient-filled circle
func DrawCircleLines ¶
DrawCircleLines - Draw circle outline
func DrawCircleSector ¶
func DrawCircleSector[T Number](center Vector2[T], radius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawCircleSector - Draw a piece of a circle
func DrawCircleSectorLines ¶
func DrawCircleSectorLines[T Number](center Vector2[T], radius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawCircleSectorLines -
func DrawCircleV ¶
DrawCircleV - Draw a color-filled circle (Vector version)
func DrawCubeTexture ¶
func DrawCubeTexture(texture Texture2D, position Vector3, width float32, height float32, length float32, col color.RGBA)
DrawCubeTexture - Draw cube textured
func DrawCubeWires ¶
DrawCubeWires - Draw cube wires
func DrawCubeWiresV ¶
DrawCubeWiresV - Draw cube wires (Vector version)
func DrawCylinder ¶
func DrawCylinder(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int32, col color.RGBA)
DrawCylinder - Draw a cylinder/cone
func DrawCylinderWires ¶
func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int32, col color.RGBA)
DrawCylinderWires - Draw a cylinder/cone wires
func DrawEllipse ¶
DrawEllipse - Draw ellipse
func DrawEllipseLines ¶
DrawEllipseLines - Draw ellipse outline
func DrawLine3D ¶
DrawLine3D - Draw a line in 3D world space
func DrawLineBezier ¶
DrawLineBezier - Draw a line using cubic-bezier curves in-out
func DrawLineBezierCubic ¶
func DrawLineBezierCubic[T Number](startPos Vector2[T], endPos Vector2[T], startControlPos Vector2[T], endControlPos Vector2[T], thick float32, col color.RGBA)
DrawLineBezierCubic - Draw line using cubic bezier curves with 2 contrl points
func DrawLineBezierQuad ¶
func DrawLineBezierQuad[T Number](startPos Vector2[T], endPos Vector2[T], controlPos Vector2[T], thick float32, col color.RGBA)
DrawLineBezierQuad - Draw line using quadratic bezier curves with a control point
func DrawLineEx ¶
DrawLineEx - Draw a line defining thickness
func DrawLineStrip ¶
DrawLineStrip - Draw lines sequence
func DrawMeshInstanced ¶
DrawMeshInstanced - Draw mesh with instanced rendering
func DrawModelEx ¶
func DrawModelEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, scale Vector3, tint color.RGBA)
DrawModelEx - Draw a model with extended parameters
func DrawModelWires ¶
DrawModelWires - Draw a model wires (with texture if set)
func DrawModelWiresEx ¶
func DrawModelWiresEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, scale Vector3, tint color.RGBA)
DrawModelWiresEx - Draw a model wires (with texture if set) with extended parameters
func DrawPixelV ¶
DrawPixelV - Draw a pixel (Vector version)
func DrawPoint3D ¶
DrawPoint3D - Draw a point in 3D space, actually a small line
func DrawPolyLines ¶
func DrawPolyLines[T Number](center Vector2[T], sides int32, radius, rotation float32, col color.RGBA)
DrawPolyLines - Draw a polygon outline of n sides
func DrawPolyLinesEx ¶
func DrawPolyLinesEx[T Number](center Vector2[T], sides int32, radius float32, rotation float32, lineThick float32, col color.RGBA)
DrawPolyLinesEx - Draw a polygon outline of n sides with extended parameters
func DrawRectangle ¶
DrawRectangle - Draw a color-filled rectangle
func DrawRectangleGradientEx ¶
DrawRectangleGradientEx - Draw a gradient-filled rectangle with custom vertex colors
func DrawRectangleGradientH ¶
DrawRectangleGradientH - Draw a horizontal-gradient-filled rectangle
func DrawRectangleGradientV ¶
DrawRectangleGradientV - Draw a vertical-gradient-filled rectangle
func DrawRectangleLines ¶
DrawRectangleLines - Draw rectangle outline
func DrawRectangleLinesEx ¶
DrawRectangleLinesEx - Draw rectangle outline with extended parameters
func DrawRectanglePro ¶
DrawRectanglePro - Draw a color-filled rectangle with pro parameters
func DrawRectangleRec ¶
DrawRectangleRec - Draw a color-filled rectangle
func DrawRectangleRounded ¶
DrawRectangleRounded - Draw rectangle with rounded edges
func DrawRectangleRoundedLines ¶
func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments, lineThick float32, col color.RGBA)
DrawRectangleRoundedLines - Draw rectangle with rounded edges outline
func DrawRectangleV ¶
DrawRectangleV - Draw a color-filled rectangle (Vector version)
func DrawRing ¶
func DrawRing[T Number](center Vector2[T], innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawRing -
func DrawRingLines ¶
func DrawRingLines[T Number](center Vector2[T], innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawRingLines -
func DrawSphere ¶
DrawSphere - Draw sphere
func DrawSphereEx ¶
DrawSphereEx - Draw sphere with extended parameters
func DrawSphereWires ¶
DrawSphereWires - Draw sphere wires
func DrawTextEx ¶
func DrawTextEx[T Number](font Font, text string, position Vector2[T], fontSize float32, spacing float32, tint color.RGBA)
DrawTextEx - Draw text using Font and additional parameters
func DrawTexture ¶
DrawTexture - Draw a Texture2D
func DrawTextureEx ¶
func DrawTextureEx[T Number](texture Texture2D, position Vector2[T], rotation, scale float32, tint color.RGBA)
DrawTextureEx - Draw a Texture2D with extended parameters
func DrawTexturePro ¶
func DrawTexturePro[T Number](texture Texture2D, sourceRec, destRec Rectangle, origin Vector2[T], rotation float32, tint color.RGBA)
DrawTexturePro - Draw a part of a texture defined by a rectangle with 'pro' parameters
func DrawTextureQuad ¶
func DrawTextureQuad[T Number](texture Texture2D, tiling, offset Vector2[T], rectangle Rectangle, tint color.RGBA)
DrawTextureQuad - Draw texture quad with tiling and offset parameters
func DrawTextureRec ¶
func DrawTextureRec[T Number](texture Texture2D, sourceRec Rectangle, position Vector2[T], tint color.RGBA)
DrawTextureRec - Draw a part of a texture defined by a rectangle
func DrawTextureTiled ¶
func DrawTextureTiled[T Number](texture Texture2D, sourceRec, destRec Rectangle, origin Vector2[T], rotation float32, scale float32, tint color.RGBA)
DrawTextureTiled - Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest
func DrawTextureV ¶
DrawTextureV - Draw a Texture2D with position defined as Vector2
func DrawTriangle ¶
DrawTriangle - Draw a color-filled triangle
func DrawTriangleFan ¶
DrawTriangleFan - Draw a triangle fan defined by points
func DrawTriangleLines ¶
DrawTriangleLines - Draw triangle outline
func DrawTriangleStrip ¶
DrawTriangleStrip - Draw a triangle strip defined by points
func EnableEventWaiting ¶
func EnableEventWaiting()
EnableEventWaiting - Enable waiting for events on EndDrawing(), no automatic event polling
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 EndMode3D ¶
func EndMode3D()
EndMode3D - Ends 3D mode and returns to default 2D orthographic mode
func EndShaderMode ¶
func EndShaderMode()
EndShaderMode - End custom shader drawing (use default shader)
func ExportImage ¶
ExportImage - Export image as a PNG file
func ExportMesh ¶
ExportMesh - Export mesh as an OBJ file
func GenTextureMipmaps ¶
func GenTextureMipmaps(texture *Texture2D)
GenTextureMipmaps - Generate GPU mipmaps for a texture
func GetClipboardText ¶
func GetClipboardText() string
GetClipboardText - Get clipboard text content
func GetCurrentMonitor ¶
func GetCurrentMonitor() int
GetCurrentMonitor - Get current connected monitor
func GetFrameTime ¶
func GetFrameTime() float32
GetFrameTime - Returns time in seconds for one frame
func GetGamepadAxisCount ¶
GetGamepadAxisCount - Return gamepad axis count for a gamepad
func GetGamepadAxisMovement ¶
GetGamepadAxisMovement - Return axis movement value for a gamepad axis
func GetGamepadButtonPressed ¶
func GetGamepadButtonPressed() int32
GetGamepadButtonPressed - Get the last gamepad button pressed
func GetGamepadName ¶
GetGamepadName - Return gamepad internal name id
func GetGestureDragAngle ¶
func GetGestureDragAngle() float32
GetGestureDragAngle - Get gesture drag angle
func GetGestureHoldDuration ¶
func GetGestureHoldDuration() float32
GetGestureHoldDuration - Get gesture hold time in milliseconds
func GetGesturePinchAngle ¶
func GetGesturePinchAngle() float32
GetGesturePinchAngle - Get gesture pinch angle
func GetGlyphIndex ¶
GetGlyphIndex - Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
func GetImageColor ¶
GetImageColor - Get image pixel color at (x, y) position
func GetMonitorCount ¶
func GetMonitorCount() int
GetMonitorCount - Get number of connected monitors
func GetMonitorHeight ¶
GetMonitorHeight - Get primary monitor height
func GetMonitorName ¶
GetMonitorName - Get the human-readable, UTF-8 encoded name of the primary monitor
func GetMonitorPhysicalHeight ¶
GetMonitorPhysicalHeight - Get primary monitor physical height in millimetres
func GetMonitorPhysicalWidth ¶
GetMonitorPhysicalWidth - Get primary monitor physical width in millimetres
func GetMonitorRefreshRate ¶
GetMonitorRefreshRate - Get specified monitor refresh rate
func GetMonitorWidth ¶
GetMonitorWidth - Get primary monitor width
func GetMouseWheelMove ¶
func GetMouseWheelMove() float32
GetMouseWheelMove - Get mouse wheel movement for X or Y, whichever is larger
func GetMusicTimeLength ¶
GetMusicTimeLength - Get music time length (in seconds)
func GetMusicTimePlayed ¶
GetMusicTimePlayed - Get current music time played (in seconds)
func GetPixelDataSize ¶
GetPixelDataSize - Get pixel data size in bytes for certain format
func GetRandomValue ¶
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 GetRenderWidth ¶
func GetRenderWidth() int
GetRenderWidth - Get current render width (it considers HiDPI)
func GetShaderLocation ¶
GetShaderLocation - Get shader uniform location
func GetShaderLocationAttrib ¶
GetShaderLocationAttrib - Get shader attribute location
func GetSoundsPlaying ¶
func GetSoundsPlaying() int
GetSoundsPlaying - Get number of sounds playing in the multichannel
func GetTouchPointCount ¶
func GetTouchPointCount() int32
GetTouchPointCount - Get number of touch points
func GetTouchPointId ¶
GetTouchPointId - Get touch point identifier for given index
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 GetWindowHandle ¶
GetWindowHandle - Get native window handle
func ImageAlphaClear ¶
ImageAlphaClear - Apply alpha mask to image
func ImageAlphaCrop ¶
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 ImageClearBackground ¶
ImageClearBackground - Clear image background with given color
func ImageColorBrightness ¶
ImageColorBrightness - Modify image color: brightness (-255 to 255)
func ImageColorContrast ¶
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 ¶
ImageColorReplace - Modify image color: replace color
func ImageColorTint ¶
ImageColorTint - Modify image color: tint
func ImageDither ¶
ImageDither - Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
func ImageDrawCircle ¶
ImageDrawCircle - Draw circle within an image
func ImageDrawCircleV ¶
ImageDrawCircleV - Draw circle within an image
func ImageDrawPixel ¶
ImageDrawPixel - Draw pixel within an image
func ImageDrawPixelV ¶
ImageDrawPixelV - Draw pixel within an image (Vector version)
func ImageDrawRectangle ¶
ImageDrawRectangle - Draw rectangle within an image
func ImageDrawRectangleLines ¶
ImageDrawRectangleLines - Draw rectangle lines within an image
func ImageDrawRectangleRec ¶
ImageDrawRectangleRec - Draw rectangle within an image
func ImageDrawRectangleV ¶
ImageDrawRectangleV - Draw rectangle within an image (Vector version)
func ImageDrawText ¶
ImageDrawText - Draw text (default font) within an image (destination)
func ImageDrawTextEx ¶
func ImageDrawTextEx[T Number](dst *Image, position Vector2[T], font Font, text string, fontSize, spacing float32, col color.RGBA)
ImageDrawTextEx - Draw text (custom sprite font) within an image (destination)
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 ImageMipmaps ¶
func ImageMipmaps(image *Image)
ImageMipmaps - Generate all mipmap levels for a provided image
func ImageResize ¶
ImageResize - Resize an image (bilinear filtering)
func ImageResizeCanvas ¶
ImageResizeCanvas - Resize canvas and fill with color
func ImageResizeNN ¶
ImageResizeNN - Resize an image (Nearest-Neighbor scaling algorithm)
func ImageRotateCCW ¶
func ImageRotateCCW(image *Image)
ImageRotateCCW - Rotate image counter-clockwise 90deg
func ImageToPOT ¶
ImageToPOT - Convert image to POT (power-of-two)
func InitWindow ¶
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 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 IsGamepadAvailable ¶
IsGamepadAvailable - Detect if a gamepad is available
func IsGamepadButtonDown ¶
IsGamepadButtonDown - Detect if a gamepad button is being pressed
func IsGamepadButtonPressed ¶
IsGamepadButtonPressed - Detect if a gamepad button has been pressed once
func IsGamepadButtonReleased ¶
IsGamepadButtonReleased - Detect if a gamepad button has been released once
func IsGamepadButtonUp ¶
IsGamepadButtonUp - Detect if a gamepad button is NOT being pressed
func IsGestureDetected ¶
IsGestureDetected - Check if a gesture have been detected
func IsKeyPressed ¶
IsKeyPressed - Detect if a key has been pressed once
func IsKeyReleased ¶
IsKeyReleased - Detect if a key has been released once
func IsModelAnimationValid ¶
func IsModelAnimationValid(model Model, anim ModelAnimation) bool
IsModelAnimationValid - Check model animation skeleton match
func IsMouseButtonDown ¶
IsMouseButtonDown - Detect if a mouse button is being pressed
func IsMouseButtonPressed ¶
IsMouseButtonPressed - Detect if a mouse button has been pressed once
func IsMouseButtonReleased ¶
IsMouseButtonReleased - Detect if a mouse button has been released once
func IsMouseButtonUp ¶
IsMouseButtonUp - Detect if a mouse button is NOT being pressed
func IsMusicStreamPlaying ¶
IsMusicStreamPlaying - Check if music is playing
func IsSoundPlaying ¶
IsSoundPlaying - Check if a sound is currently playing
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 ¶
IsWindowState - Check if one specific window flag is enabled
func LoadImageColors ¶
LoadImageColors - Get pixel data from image as a Color slice
func LoadWaveSamples ¶
LoadWaveSamples - Get samples data from wave as a floats array
func MatrixDeterminant ¶
MatrixDeterminant - Compute matrix determinant
func MatrixToFloat ¶
MatrixToFloat - Converts Matrix to float32 slice
func MatrixTrace ¶
MatrixTrace - Returns the trace of the matrix (sum of the values along the diagonal)
func MaximizeWindow ¶
func MaximizeWindow()
MaximizeWindow - Set window state: maximized, if resizable
func MeasureText ¶
MeasureText - Measure string width for default font
func MinimizeWindow ¶
func MinimizeWindow()
MinimizeWindow - Set window state: minimized, if resizable
func OpenURL ¶
func OpenURL(url string)
OpenURL - Open URL with default system browser (if available)
func PauseAudioStream ¶
func PauseAudioStream(stream AudioStream)
PauseAudioStream - Pause audio stream
func PlaySoundMulti ¶
func PlaySoundMulti(sound Sound)
PlaySoundMulti - Play a sound (using multichannel buffer pool)
func QuaternionLength ¶
func QuaternionLength(quat Quaternion) float32
QuaternionLength - Compute the length of a quaternion
func QuaternionToAxisAngle ¶
func QuaternionToAxisAngle(q Quaternion, outAxis *Vector3, outAngle *float32)
QuaternionToAxisAngle - Returns the rotation angle and axis for a given quaternion
func ResumeAudioStream ¶
func ResumeAudioStream(stream AudioStream)
ResumeAudioStream - Resume audio stream
func ResumeMusicStream ¶
func ResumeMusicStream(music Music)
ResumeMusicStream - Resume playing paused music
func SeekMusicStream ¶
SeekMusicStream - Seek music to a position (in seconds)
func SetAudioStreamBufferSizeDefault ¶
func SetAudioStreamBufferSizeDefault(size int32)
SetAudioStreamBufferSizeDefault - Default size for new audio streams
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 SetCameraAltControl ¶
func SetCameraAltControl(altKey int32)
SetCameraAltControl - Set camera alt key to combine with mouse movement (free camera)
func SetCameraMode ¶
func SetCameraMode(camera Camera, mode CameraMode)
SetCameraMode - Set camera mode (multiple camera modes available)
func SetCameraMoveControls ¶
func SetCameraMoveControls(frontKey int32, backKey int32, rightKey int32, leftKey int32, upKey int32, downKey int32)
SetCameraMoveControls - Set camera move controls (1st person and 3rd person cameras)
func SetCameraPanControl ¶
func SetCameraPanControl(panKey int32)
SetCameraPanControl - Set camera pan key to combine with mouse movement (free camera)
func SetCameraSmoothZoomControl ¶
func SetCameraSmoothZoomControl(szKey int32)
SetCameraSmoothZoomControl - Set camera smooth zoom key to combine with mouse (free camera)
func SetClipboardText ¶
func SetClipboardText(data string)
SetClipboardText - Set clipboard text content
func SetConfigFlags ¶
func SetConfigFlags(flags uint32)
SetConfigFlags - Setup some window configuration flags
func SetExitKey ¶
func SetExitKey(key int32)
SetExitKey - Set a custom key to exit program (default is ESC)
func SetGamepadMappings ¶
SetGamepadMappings - Set internal gamepad mappings (SDL_GameControllerDB)
func SetGesturesEnabled ¶
func SetGesturesEnabled(gestureFlags uint32)
SetGesturesEnabled - Enable a set of gestures using flags
func SetMasterVolume ¶
func SetMasterVolume(volume float32)
SetMasterVolume - Set master volume (listener)
func SetMaterialTexture ¶
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 SetModelMeshMaterial ¶
SetModelMeshMaterial - Set material for a mesh
func SetMusicPan ¶
SetMusicPan - Set pan for a music (0.5 is center)
func SetMusicPitch ¶
SetMusicPitch - Set pitch for a music (1.0 is base level)
func SetMusicVolume ¶
SetMusicVolume - Set volume for music (1.0 is max level)
func SetShaderValue ¶
func SetShaderValue(shader Shader, locIndex int32, value []float32, uniformType ShaderUniformDataType)
SetShaderValue - Set shader uniform value (float)
func SetShaderValueMatrix ¶
SetShaderValueMatrix - Set shader uniform value (matrix 4x4)
func SetShaderValueTexture ¶
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 ¶
SetShapesTexture - Define default texture used to draw shapes
func SetSoundPan ¶
SetSoundPan - Set pan for a sound (0.5 is center)
func SetSoundPitch ¶
SetSoundPitch - Set pitch for a sound (1.0 is base level)
func SetSoundVolume ¶
SetSoundVolume - Set volume for a sound (1.0 is max level)
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 SetWindowIcon ¶
func SetWindowIcon(image Image)
SetWindowIcon - Set icon for window (only PLATFORM_DESKTOP)
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 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 StopSoundMulti ¶
func StopSoundMulti()
StopSoundMulti - Stop any sound playing (using multichannel buffer pool)
func TakeScreenshot ¶
func TakeScreenshot(name string)
TakeScreenshot - Takes a screenshot of current screen (saved a .png)
func ToggleFullscreen ¶
func ToggleFullscreen()
ToggleFullscreen - Fullscreen toggle (only PLATFORM_DESKTOP)
func UnloadAudioStream ¶
func UnloadAudioStream(stream AudioStream)
UnloadAudioStream - Unload audio stream and free memory
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 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 UnloadTexture ¶
func UnloadTexture(texture Texture2D)
UnloadTexture - Unload texture from GPU memory
func UnloadWaveSamples ¶
func UnloadWaveSamples(samples []float32)
UnloadWaveSamples - Unload samples data loaded with LoadWaveSamples()
func UpdateAudioStream ¶
func UpdateAudioStream(stream AudioStream, data []float32, samplesCount int32)
UpdateAudioStream - Update audio stream buffers with data
func UpdateCamera ¶
func UpdateCamera(camera *Camera)
UpdateCamera - Update camera position for selected mode
func UpdateModelAnimation ¶
func UpdateModelAnimation(model Model, anim ModelAnimation, frame int32)
UpdateModelAnimation - Update model animation pose
func UpdateMusicStream ¶
func UpdateMusicStream(music Music)
UpdateMusicStream - Updates buffers for music streaming
func UpdateSound ¶
UpdateSound - Update sound buffer with new data
func UpdateTexture ¶
UpdateTexture - Update GPU texture with new data
func UpdateTextureRec ¶
UpdateTextureRec - Update GPU texture rectangle with new data
func Vector2Angle ¶
Vector2Angle - Calculate angle from two vectors in radians
func Vector2CrossProduct ¶
Vector2CrossProduct - Calculate two vectors cross product
func Vector2Distance ¶
Vector2Distance - Calculate distance between two vectors
func Vector2DotProduct ¶
Vector2DotProduct - Calculate two vectors dot product
func Vector2LenSqr ¶
Vector2LenSqr - Returns the len square root of a vector
func Vector2Length ¶
Vector2Length - Calculate vector length
func Vector3Distance ¶
Vector3Distance - Calculate distance between two vectors
func Vector3DotProduct ¶
Vector3DotProduct - Calculate two vectors dot product
func Vector3ToFloat ¶
Vector3ToFloat - Converts Vector3 to float32 slice
func WaveFormat ¶
WaveFormat - Convert wave data to desired format
func WindowShouldClose ¶
func WindowShouldClose() bool
WindowShouldClose - Check if KEY_ESCAPE pressed or Close icon pressed
Types ¶
type AudioStream ¶
type AudioStream struct { // Buffer Buffer *C.rAudioBuffer // Processor Processor *C.rAudioProcessor // 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)
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) BlendCustom // Blend textures using custom src/dst factors (use SetBlendModeCustom()) )
Color blending modes (pre-defined)
type BoundingBox ¶
type BoundingBox struct { // Minimum vertex box-corner Min Vector3 // Maximum vertex box-corner Max Vector3 }
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) BoundingBox
NewBoundingBox - Returns new BoundingBox
type Camera2D ¶
type Camera2D[T Number] struct { // Camera offset (displacement from target) Offset Vector2[T] // Camera target (rotation and zoom origin) Target Vector2[T] // Camera rotation in degrees Rotation float32 // Camera zoom (scaling), should be 1.0f by default Zoom float32 }
Camera2D type, defines a 2d camera
type Camera3D ¶
type Camera3D struct { // Camera position Position Vector3 // Camera target it looks-at Target Vector3 // Camera up vector (rotation over its axis) Up Vector3 // 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, 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 Font ¶
type Font struct { // Base size (default chars height) BaseSize int32 // Number of characters CharsCount int32 // Padding around the chars CharsPadding int32 // Characters texture atlas Texture Texture2D // Characters rectangles in texture Recs *Rectangle // Characters info data Chars *GlyphInfo }
Font type, includes texture and charSet array data
func LoadFontEx ¶
LoadFontEx - Load Font from file with extended parameters
func LoadFontFromImage ¶
LoadFontFromImage - Loads an Image font file (XNA style)
type Gestures ¶
type Gestures int32
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 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 ¶
GetGlyphInfo - Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
type Image ¶
type Image struct { // Image base width Width int32 // Image base height Height int32 // Mipmap levels, 1 by default Mipmaps int32 // Data format (PixelFormat) Format PixelFormat // contains filtered or unexported fields }
Image type, bpp always RGBA (32bit) NOTE: Data stored in CPU memory (RAM)
func GenImageCellular ¶
GenImageCellular - Generate image: cellular algorithm. Bigger tileSize means bigger cells
func GenImageChecked ¶
GenImageChecked - Generate image: checked
func GenImageColor ¶
GenImageColor - Generate image: plain color
func GenImageGradientH ¶
GenImageGradientH - Generate image: horizontal gradient
func GenImageGradientRadial ¶
GenImageGradientRadial - Generate image: radial gradient
func GenImageGradientV ¶
GenImageGradientV - Generate image: vertical gradient
func GenImageWhiteNoise ¶
GenImageWhiteNoise - Generate image: white noise
func ImageTextEx ¶
ImageTextEx - Create an image from text (custom sprite font)
func LoadImageAnim ¶
LoadImageAnim - Load image sequence from file (frames appended to image.data)
func LoadImageFromMemory ¶
LoadImageFromMemory - Load image from memory buffer, fileType refers to extension: i.e. ".png"
func 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 ¶
NewImageFromImage - Returns new Image from Go image.Image
type Mat2 ¶
Mat2 type (used for polygon shape rotation matrix)
func Mat2Radians ¶
Mat2Radians - Creates a matrix 2x2 from a given radians value
func Mat2Transpose ¶
Mat2Transpose - Returns the transpose of a given matrix 2x2
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 ¶
LoadMaterials - Load material data (.MTL)
func (Material) GetMap ¶
func (mt Material) GetMap(index int32) *MaterialMap
GetMap - Get pointer to MaterialMap by map type
type MaterialMap ¶
type MaterialMap struct { // Texture Texture Texture2D // Color Color color.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 ¶
GetCameraMatrix - Returns camera transform matrix (view matrix)
func GetCameraMatrix2D ¶
GetCameraMatrix2D - Returns camera 2d transform matrix
func MatrixFrustum ¶
MatrixFrustum - Returns perspective projection matrix
func MatrixLookAt ¶
MatrixLookAt - Returns camera look-at matrix (view matrix)
func MatrixMultiply ¶
MatrixMultiply - Returns two matrix multiplication
func MatrixNormalize ¶
MatrixNormalize - Normalize provided matrix
func MatrixOrtho ¶
MatrixOrtho - Returns orthographic projection matrix
func MatrixPerspective ¶
MatrixPerspective - Returns perspective projection matrix
func MatrixRotate ¶
MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians)
func MatrixRotateX ¶
MatrixRotateX - Returns x-rotation matrix (angle in radians)
func MatrixRotateXYZ ¶
MatrixRotateXYZ - Get xyz-rotation matrix (angles in radians)
func MatrixRotateY ¶
MatrixRotateY - Returns y-rotation matrix (angle in radians)
func MatrixRotateZ ¶
MatrixRotateZ - Returns z-rotation matrix (angle in radians)
func MatrixSubtract ¶
MatrixSubtract - Subtract two matrices (left - right)
func MatrixTranslate ¶
MatrixTranslate - Returns translation matrix
func MatrixTranspose ¶
MatrixTranspose - Transposes provided matrix
func QuaternionToMatrix ¶
func QuaternionToMatrix(q Quaternion) Matrix
QuaternionToMatrix - Returns a matrix for a given quaternion
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 // 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 ¶
GenMeshCone - Generate cone/pyramid mesh
func GenMeshCube ¶
GenMeshCube - Generate cuboid mesh
func GenMeshCubicmap ¶
GenMeshCubicmap - Generate cubes-based map mesh from image data
func GenMeshCylinder ¶
GenMeshCylinder - Generate cylinder mesh
func GenMeshHeightmap ¶
GenMeshHeightmap - Generate heightmap mesh from image data
func GenMeshHemiSphere ¶
GenMeshHemiSphere - Generate half-sphere mesh (no bottom cap)
func GenMeshKnot ¶
GenMeshKnot - Generate trefoil knot mesh
func GenMeshPlane ¶
GenMeshPlane - Generate plane mesh (with subdivisions)
func GenMeshPoly ¶
GenMeshPoly - Generate polygonal mesh
func GenMeshSphere ¶
GenMeshSphere - Generate sphere mesh (standard sphere)
func GenMeshTorus ¶
GenMeshTorus - Generate torus mesh
type Model ¶
type Model struct { // Local transform matrix Transform Matrix MeshCount int32 MaterialCount int32 Meshes *Mesh Materials *Material MeshMaterial *int32 BoneCount int32 Bones *BoneInfo BindPose *Transform }
Model, meshes, materials and animation data
func LoadModelFromMesh ¶
LoadModelFromMesh - Load model from mesh data
type ModelAnimation ¶
type ModelAnimation struct { BoneCount int32 FrameCount int32 Bones *BoneInfo FramePoses **Transform }
ModelAnimation type
func LoadModelAnimations ¶
func LoadModelAnimations(fileName string) []ModelAnimation
LoadModelAnimations - Load model animations from file
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 ¶
LoadMusicStream - Load music stream from file
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
Number is a constraint that permits any Integer and Floating-point type.
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 ¶
Quaternion type
func NewQuaternion ¶
func NewQuaternion(x, y, z, w float32) Quaternion
NewQuaternion - Returns new Quaternion
func QuaternionFromAxisAngle ¶
func QuaternionFromAxisAngle(axis Vector3, angle float32) Quaternion
QuaternionFromAxisAngle - Returns rotation quaternion for an angle and axis
func QuaternionFromMatrix ¶
func QuaternionFromMatrix(matrix Matrix) Quaternion
QuaternionFromMatrix - Returns a quaternion for a given rotation matrix
func QuaternionInvert ¶
func QuaternionInvert(quat Quaternion) Quaternion
QuaternionInvert - Invert provided quaternion
func QuaternionMultiply ¶
func QuaternionMultiply(q1, q2 Quaternion) Quaternion
QuaternionMultiply - Calculate two quaternion multiplication
func QuaternionNormalize ¶
func QuaternionNormalize(q Quaternion) Quaternion
QuaternionNormalize - Normalize provided quaternion
func QuaternionSlerp ¶
func QuaternionSlerp(q1, q2 Quaternion, amount float32) Quaternion
QuaternionSlerp - Calculates spherical linear interpolation between two quaternions
func QuaternionTransform ¶
func QuaternionTransform(q Quaternion, mat Matrix) Quaternion
QuaternionTransform - Transform a quaternion given a transformation matrix
type Ray ¶
Ray type (useful for raycast)
func GetMouseRay ¶
GetMouseRay - Returns a ray trace from mouse position
type RayCollision ¶
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) RayCollision
GetRayCollisionQuad - Get collision info between ray and quad
func GetRayCollisionSphere ¶
func GetRayCollisionSphere(ray Ray, center Vector3, radius float32) RayCollision
GetRayCollisionSphere - Get collision info between ray and sphere
func GetRayCollisionTriangle ¶
func GetRayCollisionTriangle(ray Ray, p1, p2, p3 Vector3) RayCollision
GetRayCollisionTriangle - Get collision info between ray and triangle
func NewRayCollision ¶
func NewRayCollision(hit bool, distance float32, point, normal Vector3) RayCollision
NewRayCollision - Returns new RayCollision
type Rectangle ¶
Rectangle type
func GetCollisionRec ¶
GetCollisionRec - Get collision rectangle for two rectangles collision
func GetGlyphAtlasRec ¶
GetGlyphAtlasRec - Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
func NewRectangle ¶
NewRectangle - Returns new Rectangle
func (*Rectangle) ToInt32 ¶
func (r *Rectangle) ToInt32() RectangleInt32
ToInt32 converts rectangle to int32 variant
type RectangleInt32 ¶
RectangleInt32 type
func (*RectangleInt32) ToFloat32 ¶
func (r *RectangleInt32) ToFloat32() Rectangle
ToFloat32 converts rectangle to float32 variant
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(width, height int32) RenderTexture2D
LoadRenderTexture - Load a texture to be used for rendering
func NewRenderTexture2D ¶
func NewRenderTexture2D(id uint32, texture, depth Texture2D) RenderTexture2D
NewRenderTexture2D - Returns new RenderTexture2D
type Shader ¶
Shader type (generic shader)
func LoadShader ¶
LoadShader - Load a custom shader and bind default locations
func LoadShaderFromMemory ¶
LoadShaderFromMemory - Load shader from code strings and bind default locations
func (Shader) GetLocation ¶
GetLocation - Get shader value's location
func (Shader) UpdateLocation ¶
UpdateLocation - Update shader value's location
type ShaderUniformDataType ¶
type ShaderUniformDataType int32
ShaderUniformDataType type
const ( ShaderUniformFloat ShaderUniformDataType = iota ShaderUniformVec2 ShaderUniformVec3 ShaderUniformVec4 ShaderUniformInt ShaderUniformIvec2 ShaderUniformIvec3 ShaderUniformIvec4 ShaderUniformSampler2d )
ShaderUniformDataType enumeration
type Sound ¶
type Sound struct { Stream AudioStream FrameCount uint32 // contains filtered or unexported fields }
Sound source type
func LoadSoundFromWave ¶
LoadSoundFromWave - Load sound to memory from wave data
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 LoadTexture ¶
LoadTexture - Load an image as texture into GPU memory
func 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
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 ¶
TraceLogCallbackFun - function that will recive the trace log messages
type Vector2 ¶
type Vector2[T Number] struct { X T Y T }
Vector2 type
func GetGestureDragVector ¶
GetGestureDragVector - Get gesture drag vector
func GetGesturePinchVector ¶
GetGesturePinchVector - Get gesture pinch delta
func GetMonitorPosition ¶
GetMonitorPosition - Get specified monitor position
func GetMouseDelta ¶
GetMouseDelta - Get mouse delta between frames
func GetMousePosition ¶
GetMousePosition - Returns mouse position XY
func GetMouseWheelMoveV ¶
GetMouseWheelMoveV - Get mouse wheel movement for both X and Y
func GetScreenToWorld2D ¶
GetScreenToWorld2D - Returns the world space position for a 2d camera screen space position
func GetTouchPosition ¶
GetTouchPosition - Returns touch position XY for a touch point index (relative to screen size)
func GetWindowPosition ¶
GetWindowPosition - Get window position XY on monitor
func GetWindowScaleDPI ¶
GetWindowScaleDPI - Get window scale DPI factor
func GetWorldToScreen ¶
GetWorldToScreen - Returns the screen space position from a 3d world space position
func GetWorldToScreen2D ¶
GetWorldToScreen2D - Returns the screen space position for a 2d camera world space position
func GetWorldToScreenEx ¶
func GetWorldToScreenEx[T Number](position Vector3, camera Camera, width int32, height int32) Vector2[T]
GetWorldToScreenEx - Get size position for a 3d world space position
func Mat2MultiplyVector2 ¶
Mat2MultiplyVector2 - Multiplies a vector by a matrix 2x2
func MeasureTextEx ¶
MeasureTextEx - Measure string size for Font
func NewVector2 ¶
NewVector2 - Returns new Vector2
func Vector2Add ¶
Vector2Add - Add two vectors (v1 + v2)
func Vector2Cross ¶
Vector2Cross - Calculate the cross product of a vector and a value
func Vector2DivideV ¶
Vector2Divide - Divide vector by vector
func Vector2Lerp ¶
Vector2Lerp - Calculate linear interpolation between two vectors
func Vector2Multiply ¶
Vector2Multiply - Multiply vector by vector
func Vector2Negate ¶
Vector2Negate - Negate vector
func Vector2Normalize ¶
Vector2Normalize - Normalize provided vector
func Vector2One ¶
Vector2One - Vector with components value 1.0
func Vector2Scale ¶
Vector2Scale - Scale vector (multiply by value)
func Vector2Subtract ¶
Vector2Subtract - Subtract two vectors (v1 - v2)
func Vector2Zero ¶
Vector2Zero - Vector with components value 0.0
type Vector3 ¶
Vector3 type
func ColorToHSV ¶
ColorToHSV - Returns HSV values for a Color, hue [0..360], saturation/value [0..1]
func Vector3Barycenter ¶
Vector3Barycenter - Barycenter coords for p in triangle abc
func Vector3CrossProduct ¶
Vector3CrossProduct - Calculate two vectors cross product
func Vector3Lerp ¶
Vector3Lerp - Calculate linear interpolation between two vectors
func Vector3Max ¶
Vector3Max - Return max value for each pair of components
func Vector3Min ¶
Vector3Min - Return min value for each pair of components
func Vector3Multiply ¶
Vector3Multiply - Multiply vector by scalar
func Vector3MultiplyV ¶
Vector3MultiplyV - Multiply vector by vector
func Vector3Negate ¶
Vector3Negate - Negate provided vector (invert direction)
func Vector3Normalize ¶
Vector3Normalize - Normalize provided vector
func Vector3Perpendicular ¶
Vector3Perpendicular - Calculate one vector perpendicular vector
func Vector3Reflect ¶
Vector3Reflect - Calculate reflected vector to normal
func Vector3Scale ¶
Vector3Scale - Scale provided vector
func Vector3Subtract ¶
Vector3Subtract - Subtract two vectors
func Vector3Transform ¶
Vector3Transform - Transforms a Vector3 by a given Matrix
type Vector4 ¶
Vector4 type
func ColorNormalize ¶
ColorNormalize - Returns color normalized as float [0..1]
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 // contains filtered or unexported fields }
Wave type, defines audio wave data
func LoadWaveFromMemory ¶
LoadWaveFromMemory - Load wave from memory buffer, fileType refers to extension: i.e. ".wav"