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
- Variables
- func ActiveDrawBuffers(count int32)
- func ActiveTextureSlot(slot int32)
- func AttachAudioMixedProcessor(callback AudioCallback)
- func Begin(mode int32)
- func BeginBlendMode(mode BlendMode)
- func BeginDrawing()
- func BeginMode2D(camera Camera2D)
- func BeginMode3D(camera Camera)
- func BeginScissorMode(x, y, width, height int32)
- func BeginShaderMode(shader Shader)
- func BeginTextureMode(target RenderTexture2D)
- func BeginVrStereoMode(config VrStereoConfig)
- func BindFramebuffer(target, framebuffer uint32)
- func BindImageTexture(id uint32, index uint32, format int32, readonly bool)
- func BindShaderBuffer(id uint32, index uint32)
- func BlitFramebuffer(...)
- func CameraMoveForward(camera *Camera, distance float32, moveInWorldPlane uint8)
- func CameraMoveRight(camera *Camera, distance float32, moveInWorldPlane uint8)
- func CameraMoveToTarget(camera *Camera, delta float32)
- func CameraMoveUp(camera *Camera, distance float32)
- func CameraPitch(camera *Camera, angle float32, lockView uint8, rotateAroundTarget uint8, ...)
- func CameraRoll(camera *Camera, angle float32)
- func CameraYaw(camera *Camera, angle float32, rotateAroundTarget uint8)
- func CheckCollisionBoxSphere(box BoundingBox, centerSphere Vector3, radiusSphere float32) bool
- func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
- func CheckCollisionCircleLine(center Vector2, radius float32, p1, p2 Vector2) bool
- func CheckCollisionCircleRec(center Vector2, radius float32, rec Rectangle) bool
- func CheckCollisionCircles(center1 Vector2, radius1 float32, center2 Vector2, radius2 float32) bool
- func CheckCollisionLines(startPos1, endPos1, startPos2, endPos2 Vector2, point *Vector2) bool
- func CheckCollisionPointCircle(point Vector2, center Vector2, radius float32) bool
- func CheckCollisionPointLine(point, p1, p2 Vector2, threshold int32) bool
- func CheckCollisionPointPoly(point Vector2, points []Vector2) bool
- func CheckCollisionPointRec(point Vector2, rec Rectangle) bool
- func CheckCollisionPointTriangle(point, p1, p2, p3 Vector2) bool
- func CheckCollisionRecs(rec1, rec2 Rectangle) bool
- func CheckCollisionSpheres(centerA Vector3, radiusA float32, centerB Vector3, radiusB float32) bool
- func CheckErrors()
- func CheckRenderBatchLimit(vCount int32) bool
- func Clamp(value, min, max float32) float32
- func ClearBackground(col color.RGBA)
- func ClearColor(r uint8, g uint8, b uint8, a uint8)
- func ClearScreenBuffers()
- func ClearWindowState(flags uint32)
- func CloseAudioDevice()
- func CloseWindow()
- func Color3f(x float32, y float32, z float32)
- func Color4f(x float32, y float32, z float32, w float32)
- func Color4ub(r uint8, g uint8, b uint8, a uint8)
- func ColorAlpha(col color.RGBA, alpha float32) color.RGBA
- func ColorAlphaBlend(src, dst, tint color.RGBA) color.RGBA
- func ColorBrightness(col color.RGBA, factor float32) color.RGBA
- func ColorContrast(col color.RGBA, contrast float32) color.RGBA
- func ColorFromHSV(hue, saturation, value float32) color.RGBA
- func ColorFromNormalized(normalized Vector4) color.RGBA
- func ColorLerp(col1, col2 color.RGBA, factor float32) color.RGBA
- func ColorMask(r, g, b, a bool)
- func ColorTint(col color.RGBA, tint color.RGBA) color.RGBA
- func ColorToInt(col color.RGBA) int32
- func CompileShader(shaderCode string, type_ int32) uint32
- func ComputeShaderDispatch(groupX uint32, groupY uint32, groupZ uint32)
- func CopyShaderBuffer(destId uint32, srcId uint32, destOffset uint32, srcOffset uint32, count uint32)
- func CubemapParameters(id uint32, param int32, value int32)
- func DetachAudioMixedProcessor(callback AudioCallback)
- func DisableBackfaceCulling()
- func DisableColorBlend()
- func DisableCursor()
- func DisableDepthMask()
- func DisableDepthTest()
- func DisableEventWaiting()
- func DisableFramebuffer()
- func DisableScissorTest()
- func DisableShader()
- func DisableSmoothLines()
- func DisableStereoRender()
- func DisableTexture()
- func DisableTextureCubemap()
- func DisableVertexArray()
- func DisableVertexAttribute(index uint32)
- func DisableVertexBuffer()
- func DisableVertexBufferElement()
- func DisableWireMode()
- func DrawBillboard(camera Camera, texture Texture2D, center Vector3, scale float32, ...)
- func DrawBillboardPro(camera Camera, texture Texture2D, sourceRec Rectangle, position Vector3, ...)
- func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, ...)
- func DrawBoundingBox(box BoundingBox, col color.RGBA)
- func DrawCapsule(startPos, endPos Vector3, radius float32, slices, rings int32, col color.RGBA)
- func DrawCapsuleWires(startPos, endPos Vector3, radius float32, slices, rings int32, 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, inner, outer color.RGBA)
- func DrawCircleLines(centerX, centerY int32, radius float32, col color.RGBA)
- func DrawCircleLinesV(center Vector2, radius float32, col color.RGBA)
- func DrawCircleSector(center Vector2, radius, startAngle, endAngle float32, segments int32, ...)
- func DrawCircleSectorLines(center Vector2, radius, startAngle, endAngle float32, segments int32, ...)
- func DrawCircleV(center Vector2, radius float32, col color.RGBA)
- func DrawCube(position Vector3, width float32, height float32, length 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 DrawCylinderEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius float32, ...)
- func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, ...)
- func DrawCylinderWiresEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius 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(posX int32, posY int32)
- func DrawGrid(slices int32, spacing float32)
- func DrawLine(startPosX, startPosY, endPosX, endPosY int32, col color.RGBA)
- func DrawLine3D(startPos Vector3, endPos Vector3, col color.RGBA)
- func DrawLineBezier(startPos, endPos Vector2, thick float32, col color.RGBA)
- func DrawLineEx(startPos, endPos Vector2, thick float32, col color.RGBA)
- func DrawLineStrip(points []Vector2, col color.RGBA)
- func DrawLineV(startPos, endPos Vector2, 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 DrawModelPoints(model Model, position Vector3, scale float32, tint color.RGBA)
- func DrawModelPointsEx(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(position Vector2, col color.RGBA)
- func DrawPlane(centerPos Vector3, size Vector2, col color.RGBA)
- func DrawPoint3D(position Vector3, col color.RGBA)
- func DrawPoly(center Vector2, sides int32, radius, rotation float32, col color.RGBA)
- func DrawPolyLines(center Vector2, sides int32, radius, rotation float32, col color.RGBA)
- func DrawPolyLinesEx(center Vector2, sides int32, radius float32, rotation float32, ...)
- func DrawRay(ray Ray, col color.RGBA)
- func DrawRectangle(posX, posY, width, height int32, col color.RGBA)
- func DrawRectangleGradientEx(rec Rectangle, topLeft, bottomLeft, topRight, bottomRight color.RGBA)
- func DrawRectangleGradientH(posX, posY, width, height int32, left, right color.RGBA)
- func DrawRectangleGradientV(posX, posY, width, height int32, top, bottom color.RGBA)
- func DrawRectangleLines(posX, posY, width, height int32, col color.RGBA)
- func DrawRectangleLinesEx(rec Rectangle, lineThick float32, col color.RGBA)
- func DrawRectanglePro(rec Rectangle, origin Vector2, 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 int32, col color.RGBA)
- func DrawRectangleRoundedLinesEx(rec Rectangle, roundness float32, segments int32, lineThick float32, ...)
- func DrawRectangleV(position Vector2, size Vector2, col color.RGBA)
- func DrawRenderBatch(batch *RenderBatch)
- func DrawRenderBatchActive()
- func DrawRing(center Vector2, innerRadius, outerRadius, startAngle, endAngle float32, ...)
- func DrawRingLines(center Vector2, 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 DrawSplineBasis(points []Vector2, thick float32, col color.RGBA)
- func DrawSplineBezierCubic(points []Vector2, thick float32, col color.RGBA)
- func DrawSplineBezierQuadratic(points []Vector2, thick float32, col color.RGBA)
- func DrawSplineCatmullRom(points []Vector2, thick float32, col color.RGBA)
- func DrawSplineLinear(points []Vector2, thick float32, col color.RGBA)
- func DrawSplineSegmentBasis(p1, p2, p3, p4 Vector2, thick float32, col color.RGBA)
- func DrawSplineSegmentBezierCubic(p1, p2, p3, p4 Vector2, thick float32, col color.RGBA)
- func DrawSplineSegmentBezierQuadratic(p1, p2, p3 Vector2, thick float32, col color.RGBA)
- func DrawSplineSegmentCatmullRom(p1, p2, p3, p4 Vector2, thick float32, col color.RGBA)
- func DrawSplineSegmentLinear(p1, p2 Vector2, thick float32, col color.RGBA)
- func DrawText(text string, posX int32, posY int32, fontSize int32, col color.RGBA)
- func DrawTextCodepoint(font Font, codepoint rune, position Vector2, fontSize float32, tint color.RGBA)
- func DrawTextCodepoints(font Font, codepoints []rune, position Vector2, fontSize float32, ...)
- func DrawTextEx(font Font, text string, position Vector2, fontSize float32, spacing float32, ...)
- func DrawTextPro(font Font, text string, position Vector2, origin Vector2, ...)
- func DrawTexture(texture Texture2D, posX int32, posY int32, tint color.RGBA)
- func DrawTextureEx(texture Texture2D, position Vector2, rotation, scale float32, tint color.RGBA)
- func DrawTextureNPatch(texture Texture2D, nPatchInfo NPatchInfo, dest Rectangle, origin Vector2, ...)
- func DrawTexturePro(texture Texture2D, sourceRec, destRec Rectangle, origin Vector2, ...)
- func DrawTextureRec(texture Texture2D, sourceRec Rectangle, position Vector2, tint color.RGBA)
- func DrawTextureV(texture Texture2D, position Vector2, tint color.RGBA)
- func DrawTriangle(v1, v2, v3 Vector2, col color.RGBA)
- func DrawTriangle3D(v1 Vector3, v2 Vector3, v3 Vector3, col color.RGBA)
- func DrawTriangleFan(points []Vector2, col color.RGBA)
- func DrawTriangleLines(v1, v2, v3 Vector2, col color.RGBA)
- func DrawTriangleStrip(points []Vector2, col color.RGBA)
- func EnableBackfaceCulling()
- func EnableColorBlend()
- func EnableCursor()
- func EnableDepthMask()
- func EnableDepthTest()
- func EnableEventWaiting()
- func EnableFramebuffer(id uint32)
- func EnablePointMode()
- func EnableScissorTest()
- func EnableShader(id uint32)
- func EnableSmoothLines()
- func EnableStereoRender()
- func EnableTexture(id uint32)
- func EnableTextureCubemap(id uint32)
- func EnableVertexArray(vaoId uint32) bool
- func EnableVertexAttribute(index uint32)
- func EnableVertexBuffer(id uint32)
- func EnableVertexBufferElement(id uint32)
- func EnableWireMode()
- func End()
- func EndBlendMode()
- func EndDrawing()
- func EndMode2D()
- func EndMode3D()
- func EndScissorMode()
- func EndShaderMode()
- func EndTextureMode()
- func EndVrStereoMode()
- func ExportAutomationEventList(list AutomationEventList, fileName string) bool
- func ExportImage(image Image, fileName string) bool
- func ExportImageToMemory(image Image, fileType string) []byte
- func ExportMesh(mesh Mesh, fileName string)
- func ExportWave(wave Wave, fileName string)
- func Fade(col color.RGBA, alpha float32) color.RGBA
- func FloatEquals(x, y float32) bool
- func FramebufferAttach(fboId uint32, texId uint32, attachType int32, texType int32, mipLevel int32)
- func FramebufferComplete(id uint32) bool
- func Frustum(left float64, right float64, bottom float64, top float64, znear float64, ...)
- func GenTextureMipmaps(texture *Texture2D)
- func GetActiveFramebuffer() uint32
- func GetCharPressed() int32
- func GetClipboardText() string
- func GetColor(hexValue uint) color.RGBA
- func GetCullDistanceFar() float64
- func GetCullDistanceNear() float64
- func GetCurrentMonitor() int
- func GetFPS() int32
- func GetFrameTime() float32
- func GetFramebufferHeight() int32
- func GetFramebufferWidth() int32
- 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(font Font, codepoint int32) int32
- func GetImageColor(image Image, x, y int32) color.RGBA
- func GetKeyPressed() int32
- func GetLineWidth() float32
- func GetLocationAttrib(shaderId uint32, attribName string) int32
- func GetLocationUniform(shaderId uint32, uniformName string) int32
- func GetMasterVolume() float32
- 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 GetShaderBufferSize(id uint32) uint32
- func GetShaderIdDefault() uint32
- func GetShaderLocation(shader Shader, uniformName string) int32
- func GetShaderLocationAttrib(shader Shader, attribName string) int32
- func GetTextureIdDefault() uint32
- func GetTime() float64
- func GetTouchPointCount() int32
- func GetTouchPointId(index int32) int32
- func GetTouchX() int32
- func GetTouchY() int32
- func GetVersion() int32
- func GetWindowHandle() unsafe.Pointer
- func GlClose()
- func GlInit(width int32, height int32)
- 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 ImageBlurGaussian(image *Image, blurSize int32)
- 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 ImageDrawCircleLines(dst *Image, centerX, centerY, radius int32, col color.RGBA)
- func ImageDrawCircleLinesV(dst *Image, center Vector2, radius int32, col color.RGBA)
- func ImageDrawCircleV(dst *Image, center Vector2, radius int32, col color.RGBA)
- func ImageDrawLine(dst *Image, startPosX, startPosY, endPosX, endPosY int32, col color.RGBA)
- func ImageDrawLineEx(dst *Image, start, end Vector2, thick int32, col color.RGBA)
- func ImageDrawLineV(dst *Image, start, end Vector2, col color.RGBA)
- func ImageDrawPixel(dst *Image, posX, posY int32, col color.RGBA)
- func ImageDrawPixelV(dst *Image, position Vector2, 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(dst *Image, position, size Vector2, col color.RGBA)
- func ImageDrawText(dst *Image, posX, posY int32, text string, fontSize int32, col color.RGBA)
- func ImageDrawTextEx(dst *Image, position Vector2, font Font, text string, ...)
- func ImageDrawTriangle(dst *Image, v1, v2, v3 Vector2, col color.RGBA)
- func ImageDrawTriangleEx(dst *Image, v1, v2, v3 Vector2, c1, c2, c3 color.RGBA)
- func ImageDrawTriangleFan(dst *Image, points []Vector2, col color.RGBA)
- func ImageDrawTriangleLines(dst *Image, v1, v2, v3 Vector2, col color.RGBA)
- func ImageDrawTriangleStrip(dst *Image, points []Vector2, col color.RGBA)
- func ImageFlipHorizontal(image *Image)
- func ImageFlipVertical(image *Image)
- func ImageFormat(image *Image, newFormat PixelFormat)
- func ImageKernelConvolution(image *Image, kernel []float32)
- 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 ImageRotate(image *Image, degrees 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 IsAudioStreamValid(stream AudioStream) bool
- func IsCursorHidden() bool
- func IsCursorOnScreen() bool
- func IsFileDropped() bool
- func IsFontValid(font Font) 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 IsImageValid(image *Image) bool
- func IsKeyDown(key int32) bool
- func IsKeyPressed(key int32) bool
- func IsKeyPressedRepeat(key int32) bool
- func IsKeyReleased(key int32) bool
- func IsKeyUp(key int32) bool
- func IsMaterialValid(material Material) bool
- func IsModelAnimationValid(model Model, anim ModelAnimation) bool
- func IsModelValid(model Model) bool
- func IsMouseButtonDown(button MouseButton) bool
- func IsMouseButtonPressed(button MouseButton) bool
- func IsMouseButtonReleased(button MouseButton) bool
- func IsMouseButtonUp(button MouseButton) bool
- func IsMusicStreamPlaying(music Music) bool
- func IsMusicValid(music Music) bool
- func IsRenderTextureValid(target RenderTexture2D) bool
- func IsShaderValid(shader Shader) bool
- func IsSoundPlaying(sound Sound) bool
- func IsSoundValid(sound Sound) bool
- func IsStereoRenderEnabled() bool
- func IsTextureValid(texture Texture2D) bool
- func IsWaveValid(wave Wave) 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 Lerp(start, end, amount float32) float32
- func LoadComputeShaderProgram(shaderID uint32) uint32
- func LoadDrawCube()
- func LoadDrawQuad()
- func LoadDroppedFiles() []string
- func LoadFramebuffer() uint32
- func LoadIdentity()
- func LoadImageColors(img *Image) []color.RGBA
- func LoadShaderBuffer(size uint32, data unsafe.Pointer, usageHint int32) uint32
- func LoadShaderCode(vsCode string, fsCode string) uint32
- func LoadShaderProgram(vShaderId uint32, fShaderId uint32) uint32
- func LoadTextureDepth(width, height int32, useRenderBuffer bool)
- func LoadVertexArray() uint32
- func LoadWaveSamples(wave Wave) []float32
- func Mat2Set(matrix *Mat2, radians float32)
- func MatrixDecompose(mat Matrix, translation *Vector3, rotation *Quaternion, scale *Vector3)
- func MatrixDeterminant(mat Matrix) float32
- func MatrixMode(mode int32)
- func MatrixToFloat(mat Matrix) []float32
- func MatrixToFloatV(mat Matrix) [16]float32
- func MatrixTrace(mat Matrix) float32
- func MaximizeWindow()
- func MeasureText(text string, fontSize int32) int32
- func MinimizeWindow()
- func MultMatrix(m Matrix)
- func NewColor(r, g, b, a uint8) color.RGBA
- func Normal3f(x float32, y float32, z float32)
- func Normalize(value, start, end float32) float32
- func OpenURL(url string)
- func Ortho(left float64, right float64, bottom float64, top float64, znear float64, ...)
- func PauseAudioStream(stream AudioStream)
- func PauseMusicStream(music Music)
- func PauseSound(sound Sound)
- func PlayAudioStream(stream AudioStream)
- func PlayAutomationEvent(event AutomationEvent)
- func PlayMusicStream(music Music)
- func PlaySound(sound Sound)
- func PollInputEvents()
- func PopMatrix()
- func PushMatrix()
- func QuaternionEquals(p, q Quaternion) bool
- func QuaternionLength(quat Quaternion) float32
- func QuaternionToAxisAngle(q Quaternion, outAxis *Vector3, outAngle *float32)
- func ReadShaderBuffer(id uint32, dest unsafe.Pointer, count uint32, offset uint32)
- func Remap(value, inputStart, inputEnd, outputStart, outputEnd float32) float32
- func RestoreWindow()
- func ResumeAudioStream(stream AudioStream)
- func ResumeMusicStream(music Music)
- func ResumeSound(sound Sound)
- func Rotatef(angle float32, x float32, y float32, z float32)
- func Scalef(x float32, y float32, z float32)
- func Scissor(x int32, y int32, width int32, height int32)
- func SeekMusicStream(music Music, position float32)
- func SetAudioStreamBufferSizeDefault(size int32)
- func SetAudioStreamCallback(stream AudioStream, callback AudioCallback)
- func SetAudioStreamPan(stream AudioStream, pan float32)
- func SetAudioStreamPitch(stream AudioStream, pitch float32)
- func SetAudioStreamVolume(stream AudioStream, volume float32)
- func SetAutomationEventBaseFrame(frame int)
- func SetAutomationEventList(list *AutomationEventList)
- func SetBlendFactors(glSrcFactor int32, glDstFactor int32, glEquation int32)
- func SetBlendFactorsSeparate(glSrcRGB int32, glDstRGB int32, glSrcAlpha int32, glDstAlpha int32, ...)
- func SetBlendMode(mode BlendMode)
- func SetCallbackFunc(func())
- func SetClipPlanes(nearPlane, farPlane float64)
- func SetClipboardText(data string)
- func SetConfigFlags(flags uint32)
- func SetCullFace(mode int32)
- func SetExitKey(key int32)
- func SetFramebufferHeight(height int32)
- func SetFramebufferWidth(width int32)
- func SetGamepadMappings(mappings string) int32
- func SetGamepadVibration(gamepad int32, leftMotor, rightMotor, duration float32)
- func SetGesturesEnabled(gestureFlags uint32)
- func SetLineWidth(width float32)
- func SetMasterVolume(volume float32)
- func SetMaterialTexture(material *Material, mapType int32, texture Texture2D)
- func SetMatrixModelview(view Matrix)
- func SetMatrixProjection(proj Matrix)
- func SetMatrixProjectionStereo(right Matrix, left Matrix)
- func SetMatrixViewOffsetStereo(right Matrix, left 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 SetRenderBatchActive(batch *RenderBatch)
- 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 SetTextLineSpacing(spacing int)
- func SetTexture(id uint32)
- func SetTextureFilter(texture Texture2D, filterMode TextureFilterMode)
- func SetTextureWrap(texture Texture2D, wrapMode TextureWrapMode)
- func SetTraceLogCallback(fn TraceLogCallbackFun)
- func SetTraceLogLevel(logLevel TraceLogLevel)
- func SetUniform(locIndex int32, value []float32, uniformType int32)
- func SetUniformMatrices(locIndex int32, mat []Matrix)
- func SetUniformMatrix(locIndex int32, mat Matrix)
- func SetUniformSampler(locIndex int32, textureId uint32)
- func SetVertexAttributeDivisor(index uint32, divisor int32)
- func SetWindowIcon(image Image)
- func SetWindowIcons(images []Image, count int32)
- func SetWindowMaxSize(w, h int)
- 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 StartAutomationEventRecording()
- func StopAudioStream(stream AudioStream)
- func StopAutomationEventRecording()
- func StopMusicStream(music Music)
- func StopSound(sound Sound)
- func SwapScreenBuffer()
- func TakeScreenshot(name string)
- func TexCoord2f(x float32, y float32)
- func TextureParameters(id uint32, param int32, value int32)
- func ToggleBorderlessWindowed()
- func ToggleFullscreen()
- func TraceLog(logLevel TraceLogLevel, text string, v ...interface{})
- func Translatef(x float32, y float32, z float32)
- func UnloadAudioStream(stream AudioStream)
- func UnloadAutomationEventList(list *AutomationEventList)
- func UnloadDroppedFiles()
- func UnloadFont(font Font)
- func UnloadFontData(glyphs []GlyphInfo)
- func UnloadFramebuffer(id uint32)
- func UnloadImage(image *Image)
- func UnloadImageColors(cols []color.RGBA)
- 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 UnloadRenderBatch(batch RenderBatch)
- func UnloadRenderTexture(target RenderTexture2D)
- func UnloadShader(shader Shader)
- func UnloadShaderBuffer(id uint32)
- func UnloadShaderProgram(id uint32)
- func UnloadSound(sound Sound)
- func UnloadTexture(texture Texture2D)
- func UnloadVertexBuffer(vboId uint32)
- func UnloadVrStereoConfig(config VrStereoConfig)
- func UnloadWave(wave Wave)
- func UnloadWaveSamples(samples []float32)
- func UpdateAudioStream(stream AudioStream, data []float32)
- func UpdateCamera(camera *Camera, mode CameraMode)
- func UpdateCameraPro(camera *Camera, movement Vector3, rotation Vector3, zoom float32)
- func UpdateMeshBuffer(mesh Mesh, index int, data []byte, offset int)
- func UpdateModelAnimation(model Model, anim ModelAnimation, frame int32)
- func UpdateModelAnimationBones(model Model, anim ModelAnimation, frame int32)
- func UpdateMusicStream(music Music)
- func UpdateShaderBuffer(id uint32, data unsafe.Pointer, dataSize uint32, offset uint32)
- 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 UploadMesh(mesh *Mesh, dynamic bool)
- func Vector2Angle(v1, v2 Vector2) float32
- func Vector2CrossProduct(v1, v2 Vector2) float32
- func Vector2Distance(v1, v2 Vector2) float32
- func Vector2DistanceSqr(v1 Vector2, v2 Vector2) float32
- func Vector2DotProduct(v1, v2 Vector2) float32
- func Vector2Equals(p Vector2, q Vector2) bool
- func Vector2LenSqr(vector Vector2) float32
- func Vector2Length(v Vector2) float32
- func Vector2LengthSqr(v Vector2) float32
- func Vector2LineAngle(start Vector2, end Vector2) float32
- func Vector3Angle(v1 Vector3, v2 Vector3) float32
- func Vector3Distance(v1, v2 Vector3) float32
- func Vector3DistanceSqr(v1 Vector3, v2 Vector3) float32
- func Vector3DotProduct(v1, v2 Vector3) float32
- func Vector3Equals(p Vector3, q Vector3) bool
- func Vector3Length(v Vector3) float32
- func Vector3LengthSqr(v Vector3) float32
- func Vector3OrthoNormalize(v1, v2 *Vector3)
- func Vector3ToFloat(vec Vector3) []float32
- func Vector3ToFloatV(v Vector3) [3]float32
- func Vertex2f(x float32, y float32)
- func Vertex2i(x int32, y int32)
- func Vertex3f(x float32, y float32, z float32)
- func Viewport(x int32, y int32, width int32, height int32)
- func WaitTime(seconds float64)
- func WaveCrop(wave Wave, initFrame int32, finalFrame int32)
- func WaveFormat(wave Wave, sampleRate int32, sampleSize int32, channels int32)
- func WindowShouldClose() bool
- func Wrap(value, min, max float32) float32
- type Asset
- type AudioBuffer
- type AudioCallback
- type AudioProcessor
- type AudioStream
- type AutomationEvent
- type AutomationEventList
- type BlendMode
- type BoneInfo
- type BoundingBox
- type Camera
- type Camera2D
- type Camera3D
- type CameraMode
- type CameraProjection
- type Color
- type DrawCall
- type Font
- func GetFontDefault() Font
- func LoadFont(fileName string) Font
- func LoadFontEx(fileName string, fontSize int32, fontChars []rune, runesNumber ...int32) Font
- func LoadFontFromImage(image Image, key color.RGBA, firstChar int32) Font
- func LoadFontFromMemory(fileType string, fileData []byte, fontSize int32, codepoints []rune) Font
- type FramebufferAttachTextureType
- type FramebufferAttachType
- type Gestures
- type GlVersion
- 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 GenImageFontAtlas(glyphs []GlyphInfo, glyphRecs []*Rectangle, fontSize int32, padding int32, ...) Image
- func GenImageGradientLinear(width, height, direction int, start, end color.RGBA) *Image
- func GenImageGradientRadial(width, height int, density float32, inner, outer color.RGBA) *Image
- func GenImageGradientSquare(width, height int, density float32, inner, outer color.RGBA) *Image
- func GenImagePerlinNoise(width, height, offsetX, offsetY int, scale float32) *Image
- func GenImageText(width, height int, text string) *Image
- func GenImageWhiteNoise(width, height int, factor float32) *Image
- func GetClipboardImage() Image
- func ImageCopy(image *Image) *Image
- func ImageFromChannel(image Image, selectedChannel int32) Image
- func ImageFromImage(image Image, rec Rectangle) 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 LoadImageAnimFromMemory(fileType string, fileData []byte, dataSize int32, frames *int32) *Image
- func LoadImageFromMemory(fileType string, fileData []byte, dataSize int32) *Image
- func LoadImageFromScreen() *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(camera Camera2D) Matrix
- func GetCameraProjectionMatrix(camera *Camera, aspect float32) Matrix
- func GetCameraViewMatrix(camera *Camera) Matrix
- func GetMatrixModelview() Matrix
- func GetMatrixProjection() Matrix
- func GetMatrixProjectionStereo(eye int32) Matrix
- func GetMatrixTransform() Matrix
- func GetMatrixViewOffsetStereo(eye int32) 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 MatrixRotateZYX(angle Vector3) 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 MouseButton
- type MouseCursor
- type Music
- type NPatchInfo
- type NPatchLayout
- type PixelFormat
- type Quaternion
- func NewQuaternion(x, y, z, w float32) Quaternion
- func QuaternionAdd(q1 Quaternion, q2 Quaternion) Quaternion
- func QuaternionAddValue(q Quaternion, add float32) Quaternion
- func QuaternionDivide(q1 Quaternion, q2 Quaternion) Quaternion
- func QuaternionFromAxisAngle(axis Vector3, angle float32) Quaternion
- func QuaternionFromEuler(pitch, yaw, roll float32) Quaternion
- func QuaternionFromMatrix(matrix Matrix) Quaternion
- func QuaternionFromVector3ToVector3(from Vector3, to Vector3) Quaternion
- func QuaternionIdentity() Quaternion
- func QuaternionInvert(quat Quaternion) Quaternion
- func QuaternionLerp(q1 Quaternion, q2 Quaternion, amount float32) Quaternion
- func QuaternionMultiply(q1, q2 Quaternion) Quaternion
- func QuaternionNlerp(q1 Quaternion, q2 Quaternion, amount float32) Quaternion
- func QuaternionNormalize(q Quaternion) Quaternion
- func QuaternionScale(q Quaternion, mul float32) Quaternion
- func QuaternionSlerp(q1, q2 Quaternion, amount float32) Quaternion
- func QuaternionSubtract(q1 Quaternion, q2 Quaternion) Quaternion
- func QuaternionSubtractValue(q Quaternion, sub 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 RenderBatch
- type RenderTexture2D
- type Shader
- type ShaderAttributeDataType
- type ShaderUniformDataType
- type Sound
- type Texture2D
- type TextureFilterMode
- type TextureWrapMode
- type TraceLogCallbackFun
- type TraceLogLevel
- type Transform
- type Vector2
- func GetGestureDragVector() Vector2
- func GetGesturePinchVector() Vector2
- func GetMonitorPosition(monitor int) Vector2
- func GetMouseDelta() Vector2
- func GetMousePosition() Vector2
- func GetMouseWheelMoveV() Vector2
- func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2
- func GetSplinePointBasis(p1, p2, p3, p4 Vector2, t float32) Vector2
- func GetSplinePointBezierCubic(p1, p2, p3, p4 Vector2, t float32) Vector2
- func GetSplinePointBezierQuad(p1, p2, p3 Vector2, t float32) Vector2
- func GetSplinePointCatmullRom(p1, p2, p3, p4 Vector2, t float32) Vector2
- func GetSplinePointLinear(p1, p2 Vector2, t float32) Vector2
- func GetTouchPosition(index int32) Vector2
- func GetWindowPosition() Vector2
- func GetWindowScaleDPI() Vector2
- func GetWorldToScreen(position Vector3, camera Camera) Vector2
- func GetWorldToScreen2D(position Vector2, camera Camera2D) Vector2
- func GetWorldToScreenEx(position Vector3, camera Camera, width int32, height int32) Vector2
- func Mat2MultiplyVector2(matrix Mat2, vector Vector2) Vector2
- func MeasureTextEx(font Font, text string, fontSize float32, spacing float32) Vector2
- func NewVector2(x, y float32) Vector2
- func Vector2Add(v1, v2 Vector2) Vector2
- func Vector2AddValue(v Vector2, add float32) Vector2
- func Vector2Clamp(v Vector2, min Vector2, max Vector2) Vector2
- func Vector2ClampValue(v Vector2, min float32, max float32) Vector2
- func Vector2Cross(value float32, vector Vector2) Vector2
- func Vector2Divide(v1, v2 Vector2) Vector2
- func Vector2Invert(v Vector2) Vector2
- func Vector2Lerp(v1, v2 Vector2, amount float32) Vector2
- func Vector2MoveTowards(v Vector2, target Vector2, maxDistance float32) Vector2
- func Vector2Multiply(v1, v2 Vector2) Vector2
- func Vector2Negate(v Vector2) Vector2
- func Vector2Normalize(v Vector2) Vector2
- func Vector2One() Vector2
- func Vector2Reflect(v Vector2, normal Vector2) Vector2
- func Vector2Rotate(v Vector2, angle float32) Vector2
- func Vector2Scale(v Vector2, scale float32) Vector2
- func Vector2Subtract(v1, v2 Vector2) Vector2
- func Vector2SubtractValue(v Vector2, sub float32) Vector2
- func Vector2Transform(v Vector2, mat Matrix) Vector2
- func Vector2Zero() Vector2
- type Vector3
- func ColorToHSV(col color.RGBA) Vector3
- func GetCameraForward(camera *Camera) Vector3
- func GetCameraRight(camera *Camera) Vector3
- func GetCameraUp(camera *Camera) Vector3
- func NewVector3(x, y, z float32) Vector3
- func QuaternionToEuler(q Quaternion) Vector3
- func Vector3Add(v1, v2 Vector3) Vector3
- func Vector3AddValue(v Vector3, add float32) Vector3
- func Vector3Barycenter(p, a, b, c Vector3) Vector3
- func Vector3Clamp(v Vector3, min Vector3, max Vector3) Vector3
- func Vector3ClampValue(v Vector3, min float32, max float32) Vector3
- func Vector3CrossProduct(v1, v2 Vector3) Vector3
- func Vector3Divide(v1 Vector3, v2 Vector3) Vector3
- func Vector3Invert(v Vector3) Vector3
- func Vector3Lerp(v1, v2 Vector3, amount float32) Vector3
- func Vector3Max(vec1, vec2 Vector3) Vector3
- func Vector3Min(vec1, vec2 Vector3) Vector3
- func Vector3Multiply(v1, v2 Vector3) Vector3
- func Vector3Negate(v Vector3) Vector3
- func Vector3Normalize(v Vector3) Vector3
- func Vector3One() Vector3
- func Vector3Perpendicular(v Vector3) Vector3
- func Vector3Project(v1, v2 Vector3) Vector3
- func Vector3Reflect(vector, normal Vector3) Vector3
- func Vector3Refract(v Vector3, n Vector3, r float32) Vector3
- func Vector3Reject(v1, v2 Vector3) Vector3
- func Vector3RotateByAxisAngle(v Vector3, axis Vector3, angle float32) Vector3
- func Vector3RotateByQuaternion(v Vector3, q Quaternion) Vector3
- func Vector3Scale(v Vector3, scale float32) Vector3
- func Vector3Subtract(v1, v2 Vector3) Vector3
- func Vector3SubtractValue(v Vector3, sub float32) Vector3
- func Vector3Transform(v Vector3, mat Matrix) Vector3
- func Vector3Unproject(source Vector3, projection Matrix, view Matrix) Vector3
- func Vector3Zero() Vector3
- type Vector4
- type VertexBuffer
- type VrDeviceInfo
- type VrStereoConfig
- 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 run program in borderless windowed mode FlagBorderlessWindowedMode = 0x00008000 // Set to try enabling MSAA 4X FlagMsaa4xHint = 0x00000020 // Set to try enabling interlaced video format (for V3D) FlagInterlacedHint = 0x00010000 // KeyNull is used for no key pressed KeyNull = 0 // 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 = 5 KeyVolumeUp = 24 KeyVolumeDown = 25 MouseLeftButton = MouseButtonLeft MouseRightButton = MouseButtonRight MouseMiddleButton = MouseButtonMiddle )
Some basic Defines
const ( GamepadButtonUnknown = 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: Circle, Xbox: B) GamepadButtonRightFaceDown // Gamepad right button down (i.e. PS3: Cross, Xbox: A) GamepadButtonRightFaceLeft // Gamepad right button left (i.e. PS3: Square, Xbox: X) 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 (first), 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 )
Gamepad Buttons
const ( GamepadAxisLeftX = 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] )
Gamepad Axis
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
const ( MapAlbedo = iota MapMetalness MapNormal MapRoughness MapOcclusion MapEmission MapHeight MapBrdg MapCubemap MapIrradiance MapPrefilter MapBrdf MapDiffuse = MapAlbedo MapSpecular = MapMetalness )
Material map index
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 ( 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
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
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 )
const ( Opengl11 int32 = 1 Opengl21 int32 = 2 Opengl33 int32 = 3 Opengl43 int32 = 4 OpenglEs20 int32 = 5 )
OpenGL version
const ( ShaderAttribFloat int32 = 0 ShaderAttribVec2 int32 = 1 ShaderAttribVec3 int32 = 2 ShaderAttribVec4 int32 = 3 )
Shader attribute data types
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
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 ¶
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 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 BeginBlendMode ¶
func BeginBlendMode(mode BlendMode)
BeginBlendMode - Begin blending mode (alpha, additive, multiplied)
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 BeginShaderMode ¶
func BeginShaderMode(shader Shader)
BeginShaderMode - Begin custom shader drawing
func BeginTextureMode ¶
func BeginTextureMode(target RenderTexture2D)
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 ¶
BindImageTexture - Bind image texture
func BindShaderBuffer ¶
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 CameraMoveForward ¶
CameraMoveForward - Moves the camera in its forward direction
func CameraMoveRight ¶
CameraMoveRight - Moves the camera target in its current right direction
func CameraMoveToTarget ¶
CameraMoveToTarget - Moves the camera position closer/farther to/from the camera target
func CameraMoveUp ¶
CameraMoveUp - Moves the camera in its up direction
func CameraPitch ¶
func CameraPitch(camera *Camera, angle float32, lockView uint8, rotateAroundTarget uint8, rotateUp uint8)
CameraPitch - Rotates the camera around its right vector, pitch is "looking up and down"
- lockView prevents camera overrotation (aka "somersaults")
- rotateAroundTarget defines if rotation is around target or around its position
- rotateUp rotates the up direction as well (typically only useful in CAMERA_FREE)
NOTE: angle must be provided in radians
func CameraRoll ¶
CameraRoll - Rotates the camera around its forward vector Roll is "turning your head sideways to the left or right" Note: angle must be provided in radians
func CameraYaw ¶
CameraYaw - Rotates the camera around its up vector Yaw is "looking left and right" If rotateAroundTarget is false, the camera rotates around its position Note: angle must be provided in radians
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 CheckCollisionCircleLine ¶
CheckCollisionCircleLine - Check if circle collides with a line created betweeen two points [p1] and [p2]
func CheckCollisionCircleRec ¶
CheckCollisionCircleRec - Check collision between circle and rectangle
func CheckCollisionCircles ¶
CheckCollisionCircles - Check collision between two circles
func CheckCollisionLines ¶
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 CheckCollisionPointPoly ¶
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 ¶
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 CheckRenderBatchLimit ¶
CheckRenderBatchLimit - Check internal buffer overflow for a given number of vertex
func ClearColor ¶
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 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 ColorBrightness ¶
ColorBrightness - Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
func ColorContrast ¶
ColorContrast - Get color with contrast correction, contrast values between -1.0f and 1.0f
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 - Get hexadecimal value for a Color (0xRRGGBBAA)
func CompileShader ¶
CompileShader - Compile custom shader and return shader id (type: VERTEX_SHADER, FRAGMENT_SHADER, COMPUTE_SHADER)
func ComputeShaderDispatch ¶
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 ¶
CubemapParameters - Set cubemap parameters (filter, wrap)
func DetachAudioMixedProcessor ¶
func DetachAudioMixedProcessor(callback AudioCallback)
func DisableBackfaceCulling ¶
func DisableBackfaceCulling()
DisableBackfaceCulling - Disable backface culling
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 DisableStereoRender ¶
func DisableStereoRender()
DisableStereoRender - Disable stereo rendering
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 DrawBillboard ¶
func DrawBillboard(camera Camera, texture Texture2D, center Vector3, scale float32, tint color.RGBA)
DrawBillboard - Draw a billboard texture
func DrawBillboardPro ¶
func DrawBillboardPro(camera Camera, texture Texture2D, sourceRec Rectangle, position Vector3, up Vector3, size Vector2, origin Vector2, rotation float32, tint Color)
DrawBillboardPro - Draw a billboard texture with pro parameters
func DrawBillboardRec ¶
func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, size Vector2, 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 DrawCapsule ¶
DrawCapsule - Draw a capsule with the center of its sphere caps at startPos and endPos
func DrawCapsuleWires ¶
func DrawCapsuleWires(startPos, endPos Vector3, radius float32, slices, rings int32, col color.RGBA)
DrawCapsuleWires - Draw capsule wireframe with the center of its sphere caps at startPos and endPos
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 DrawCircleLinesV ¶
DrawCircleLinesV - Draw circle outline (Vector version)
func DrawCircleSector ¶
func DrawCircleSector(center Vector2, radius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawCircleSector - Draw a piece of a circle
func DrawCircleSectorLines ¶
func DrawCircleSectorLines(center Vector2, radius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawCircleSectorLines -
func DrawCircleV ¶
DrawCircleV - Draw a color-filled circle (Vector version)
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 DrawCylinderEx ¶
func DrawCylinderEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius float32, sides int32, col color.RGBA)
DrawCylinderEx - Draw a cylinder with base at startPos and top at endPos
func DrawCylinderWires ¶
func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int32, col color.RGBA)
DrawCylinderWires - Draw a cylinder/cone wires
func DrawCylinderWiresEx ¶
func DrawCylinderWiresEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius float32, sides int32, col color.RGBA)
DrawCylinderWiresEx - Draw a cylinder wires with base at startPos and top at endPos
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 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 DrawModelPoints ¶
DrawModelPoints - Draw a model as points
func DrawModelPointsEx ¶
func DrawModelPointsEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, scale Vector3, tint color.RGBA)
DrawModelPointsEx - Draw a model as points 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 ¶
DrawPolyLines - Draw a polygon outline of n sides
func DrawPolyLinesEx ¶
func DrawPolyLinesEx(center Vector2, 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 ¶
DrawRectangleRoundedLines - Draw rectangle lines with rounded edges
func DrawRectangleRoundedLinesEx ¶
func DrawRectangleRoundedLinesEx(rec Rectangle, roundness float32, segments int32, lineThick float32, col color.RGBA)
DrawRectangleRoundedLinesEx - Draw rectangle with rounded edges outline
func DrawRectangleV ¶
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, innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawRing - Draw ring
func DrawRingLines ¶
func DrawRingLines(center Vector2, innerRadius, outerRadius, startAngle, endAngle float32, segments int32, col color.RGBA)
DrawRingLines - Draw ring outline
func DrawSphere ¶
DrawSphere - Draw sphere
func DrawSphereEx ¶
DrawSphereEx - Draw sphere with extended parameters
func DrawSphereWires ¶
DrawSphereWires - Draw sphere wires
func DrawSplineBasis ¶
DrawSplineBasis - Draw spline: B-Spline, minimum 4 points
func DrawSplineBezierCubic ¶
DrawSplineBezierCubic - Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
func DrawSplineBezierQuadratic ¶
DrawSplineBezierQuadratic - Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
func DrawSplineCatmullRom ¶
DrawSplineCatmullRom - Draw spline: Catmull-Rom, minimum 4 points
func DrawSplineLinear ¶
DrawSplineLinear - Draw spline: Linear, minimum 2 points
func DrawSplineSegmentBasis ¶
DrawSplineSegmentBasis - Draw spline segment: B-Spline, 4 points
func DrawSplineSegmentBezierCubic ¶
DrawSplineSegmentBezierCubic - Draw spline segment: Cubic Bezier, 2 points, 2 control points
func DrawSplineSegmentBezierQuadratic ¶
DrawSplineSegmentBezierQuadratic - Draw spline segment: Quadratic Bezier, 2 points, 1 control point
func DrawSplineSegmentCatmullRom ¶
DrawSplineSegmentCatmullRom - Draw spline segment: Catmull-Rom, 4 points
func DrawSplineSegmentLinear ¶
DrawSplineSegmentLinear - Draw spline segment: Linear, 2 points
func DrawTextCodepoint ¶
func DrawTextCodepoint(font Font, codepoint rune, position Vector2, fontSize float32, tint color.RGBA)
DrawTextCodepoint - Draw one character (codepoint)
func DrawTextCodepoints ¶
func DrawTextCodepoints(font Font, codepoints []rune, position Vector2, fontSize float32, spacing float32, tint color.RGBA)
DrawTextCodepoints - Draw multiple character (codepoint)
func DrawTextEx ¶
func DrawTextEx(font Font, text string, position Vector2, fontSize float32, spacing float32, tint color.RGBA)
DrawTextEx - Draw text using Font and additional parameters
func DrawTextPro ¶
func DrawTextPro(font Font, text string, position Vector2, origin Vector2, rotation, fontSize float32, spacing float32, tint color.RGBA)
DrawTextPro - Draw text using Font and pro parameters (rotation)
func DrawTexture ¶
DrawTexture - Draw a Texture2D
func DrawTextureEx ¶
DrawTextureEx - Draw a Texture2D with extended parameters
func DrawTextureNPatch ¶
func DrawTextureNPatch(texture Texture2D, nPatchInfo NPatchInfo, dest Rectangle, origin Vector2, rotation float32, tint color.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 Rectangle, origin Vector2, rotation float32, tint color.RGBA)
DrawTexturePro - Draw a part of a texture defined by a rectangle with 'pro' parameters
func DrawTextureRec ¶
DrawTextureRec - Draw a part of a texture defined by a rectangle
func DrawTextureV ¶
DrawTextureV - Draw a Texture2D with position defined as Vector2
func DrawTriangle ¶
DrawTriangle - Draw a color-filled triangle
func DrawTriangle3D ¶
DrawTriangle3D - Draw a color-filled triangle (vertex in counter-clockwise order!)
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 EnableBackfaceCulling ¶
func EnableBackfaceCulling()
EnableBackfaceCulling - Enable backface culling
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 EnableTextureCubemap ¶
func EnableTextureCubemap(id uint32)
EnableTextureCubemap - Enable texture cubemap
func EnableVertexArray ¶
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 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 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 ¶
ExportImage - Export image as a PNG file
func ExportImageToMemory ¶
ExportImageToMemory - Export image to memory buffer
func ExportMesh ¶
ExportMesh - Export mesh as an OBJ file
func FloatEquals ¶
FloatEquals - Check whether two given floats are almost equal
func FramebufferAttach ¶
FramebufferAttach - Attach texture/renderbuffer to a framebuffer
func FramebufferComplete ¶
FramebufferComplete - Verify framebuffer is complete
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 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 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 ¶
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 GetLocationAttrib ¶
GetLocationAttrib - Get shader location attribute
func GetLocationUniform ¶
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 ¶
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 GetShaderBufferSize ¶
GetShaderBufferSize - Get SSBO buffer size
func GetShaderIdDefault ¶
func GetShaderIdDefault() uint32
GetShaderIdDefault - Get default shader id
func GetShaderLocation ¶
GetShaderLocation - Get shader uniform location
func GetShaderLocationAttrib ¶
GetShaderLocationAttrib - Get shader attribute location
func GetTextureIdDefault ¶
func GetTextureIdDefault() uint32
GetTextureIdDefault - Get default texture id
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 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 ¶
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 ImageBlurGaussian ¶
ImageBlurGaussian - Apply box blur
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 a filled circle within an image
func ImageDrawCircleLines ¶
ImageDrawCircleLines - Draw circle outline within an image
func ImageDrawCircleLinesV ¶
ImageDrawCircleLinesV - Draw circle outline within an image (Vector version)
func ImageDrawCircleV ¶
ImageDrawCircleV - Draw a filled circle within an image (Vector version)
func ImageDrawLine ¶
ImageDrawLine - Draw line within an image
func ImageDrawLineEx ¶
ImageDrawLineEx - Draw a line defining thickness within an image
func ImageDrawLineV ¶
ImageDrawLineV - Draw line within an image, vector version
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(dst *Image, position Vector2, font Font, text string, fontSize, spacing float32, col color.RGBA)
ImageDrawTextEx - Draw text (custom sprite font) within an image (destination)
func ImageDrawTriangle ¶
ImageDrawTriangle - Draw triangle within an image
func ImageDrawTriangleEx ¶
ImageDrawTriangleEx - Draw triangle with interpolated colors within an image
func ImageDrawTriangleFan ¶
ImageDrawTriangleFan - Draw a triangle fan defined by points within an image (first vertex is the center)
func ImageDrawTriangleLines ¶
ImageDrawTriangleLines - Draw triangle outline within an image
func ImageDrawTriangleStrip ¶
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 ¶
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 ¶
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 ImageRotate ¶
ImageRotate - Rotate image by input angle in degrees (-359 to 359)
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 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 ¶
IsFontValid - Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
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 IsImageValid ¶
IsImageValid - Check if an image is valid (data and parameters)
func IsKeyPressed ¶
IsKeyPressed - Detect if a key has been pressed once
func IsKeyPressedRepeat ¶
IsKeyPressedRepeat - Detect if a key has been pressed again (Only PLATFORM_DESKTOP)
func IsKeyReleased ¶
IsKeyReleased - Detect if a key has been released once
func IsMaterialValid ¶
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 ¶
IsModelValid - Check if a model is valid (loaded in GPU, VAO/VBOs)
func IsMouseButtonDown ¶
func IsMouseButtonDown(button MouseButton) bool
IsMouseButtonDown - Detect if a mouse button is being pressed
func IsMouseButtonPressed ¶
func IsMouseButtonPressed(button MouseButton) bool
IsMouseButtonPressed - Detect if a mouse button has been pressed once
func IsMouseButtonReleased ¶
func IsMouseButtonReleased(button MouseButton) bool
IsMouseButtonReleased - Detect if a mouse button has been released once
func IsMouseButtonUp ¶
func IsMouseButtonUp(button MouseButton) bool
IsMouseButtonUp - Detect if a mouse button is NOT being pressed
func IsMusicStreamPlaying ¶
IsMusicStreamPlaying - Check if music is playing
func IsMusicValid ¶
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 ¶
IsShaderValid - Check if a shader is valid (loaded on GPU)
func IsSoundPlaying ¶
IsSoundPlaying - Check if a sound is currently playing
func IsSoundValid ¶
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 ¶
IsTextureValid - Check if a texture is valid (loaded in GPU)
func IsWaveValid ¶
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 ¶
IsWindowState - Check if one specific window flag is enabled
func LoadComputeShaderProgram ¶
LoadComputeShaderProgram -
func LoadImageColors ¶
LoadImageColors - Get pixel data from image as a Color slice
func LoadShaderBuffer ¶
LoadShaderBuffer - Load shader storage buffer object (SSBO)
func LoadShaderCode ¶
LoadShaderCode - Load shader from code strings
func LoadShaderProgram ¶
LoadShaderProgram - Load custom shader program
func LoadTextureDepth ¶
LoadTextureDepth - Load depth texture/renderbuffer (to be attached to fbo)
func LoadVertexArray ¶
func LoadVertexArray() uint32
LoadVertexArray - Load vertex array (vao) if supported
func LoadWaveSamples ¶
LoadWaveSamples - Get samples data from wave as a floats array
func MatrixDecompose ¶
func MatrixDecompose(mat Matrix, translation *Vector3, rotation *Quaternion, scale *Vector3)
MatrixDecompose - Decompose a transformation matrix into its rotational, translational and scaling components
func MatrixDeterminant ¶
MatrixDeterminant - Compute matrix determinant
func MatrixMode ¶
func MatrixMode(mode int32)
MatrixMode - Choose the current matrix to be transformed
func MatrixToFloat ¶
MatrixToFloat - Converts Matrix to float32 slice
func MatrixToFloatV ¶
MatrixToFloatV - Get float array of matrix data
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 MultMatrix ¶
func MultMatrix(m Matrix)
MultMatrix - Multiply the current matrix by another matrix
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 PlayAutomationEvent ¶
func PlayAutomationEvent(event AutomationEvent)
PlayAutomationEvent - Play a recorded automation event
func QuaternionEquals ¶
func QuaternionEquals(p, q Quaternion) bool
QuaternionEquals - Check whether two given quaternions are almost equal
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 ReadShaderBuffer ¶
ReadShaderBuffer - Read SSBO buffer data (GPU->CPU)
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 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 SetBlendFactors ¶
SetBlendFactors - Set blending mode factor and equation (using OpenGL factors)
func SetBlendFactorsSeparate ¶
func SetBlendFactorsSeparate(glSrcRGB int32, glDstRGB int32, glSrcAlpha int32, glDstAlpha int32, glEqRGB int32, glEqAlpha int32)
SetBlendFactorsSeparate - Set blending mode factors and equations separately (using OpenGL factors)
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 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 SetFramebufferHeight ¶
func SetFramebufferHeight(height int32)
SetFramebufferHeight - Set current framebuffer height
func SetFramebufferWidth ¶
func SetFramebufferWidth(width int32)
SetFramebufferWidth - Set current framebuffer width
func SetGamepadMappings ¶
SetGamepadMappings - Set internal gamepad mappings (SDL_GameControllerDB)
func SetGamepadVibration ¶
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 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 SetMatrixProjectionStereo ¶
SetMatrixProjectionStereo - Set eyes projection matrices for stereo rendering
func SetMatrixViewOffsetStereo ¶
SetMatrixViewOffsetStereo - Set eyes view offsets matrices for stereo rendering
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 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 ¶
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 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 ¶
SetUniform - Set shader value uniform
func SetUniformMatrices ¶
SetUniformMatrices - Set shader value matrices
func SetUniformMatrix ¶
SetUniformMatrix - Set shader value matrix
func SetUniformSampler ¶
SetUniformSampler - Set shader value sampler
func SetVertexAttributeDivisor ¶
SetVertexAttributeDivisor .
func SetWindowIcon ¶
func SetWindowIcon(image Image)
SetWindowIcon - Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
func SetWindowIcons ¶
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 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 StartAutomationEventRecording ¶
func StartAutomationEventRecording()
StartAutomationEventRecording - Start recording automation events (AutomationEventList must be set)
func StopAutomationEventRecording ¶
func StopAutomationEventRecording()
StopAutomationEventRecording - Stop recording automation events
func TakeScreenshot ¶
func TakeScreenshot(name string)
TakeScreenshot - Takes a screenshot of current screen (saved a .png)
func TexCoord2f ¶
TexCoord2f - Define one vertex (texture coordinate) - 2 float
func TextureParameters ¶
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 ¶
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 UnloadFontData ¶
func UnloadFontData(glyphs []GlyphInfo)
UnloadFontData - Unload font chars info data (RAM)
func UnloadFramebuffer ¶
func UnloadFramebuffer(id uint32)
UnloadFramebuffer - Delete framebuffer from GPU
func UnloadImageColors ¶
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 UnloadTexture ¶
func UnloadTexture(texture Texture2D)
UnloadTexture - Unload texture from GPU memory
func UnloadVrStereoConfig ¶
func UnloadVrStereoConfig(config VrStereoConfig)
UnloadVrStereoConfig - Unload VR stereo config
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 UpdateCamera ¶
func UpdateCamera(camera *Camera, mode CameraMode)
UpdateCamera - Update camera position for selected mode Camera mode: CameraFree, CameraFirstPerson, CameraThirdPerson, CameraOrbital or Custom
func UpdateCameraPro ¶
UpdateCameraPro - Update camera movement, movement/rotation values should be provided by user
func UpdateMeshBuffer ¶
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 ¶
UpdateShaderBuffer - Update SSBO buffer data
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 UploadMesh ¶
UploadMesh - Upload vertex data into a VAO (if supported) and VBO
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 Vector2DistanceSqr ¶
Vector2DistanceSqr - Calculate square distance between two vectors
func Vector2DotProduct ¶
Vector2DotProduct - Calculate two vectors dot product
func Vector2Equals ¶
Vector2Equals - Check whether two given vectors are almost equal
func Vector2LenSqr ¶
Vector2LenSqr - Returns the len square root of a vector
func Vector2LengthSqr ¶
Vector2LengthSqr - Calculate vector square length
func Vector2LineAngle ¶
Vector2LineAngle - Calculate angle defined by a two vectors line NOTE: Parameters need to be normalized. Current implementation should be aligned with glm::angle
func Vector3Angle ¶
Vector3Angle - Calculate angle between two vectors
func Vector3Distance ¶
Vector3Distance - Calculate distance between two vectors
func Vector3DistanceSqr ¶
Vector3DistanceSqr - Calculate square distance between two vectors
func Vector3DotProduct ¶
Vector3DotProduct - Calculate two vectors dot product
func Vector3Equals ¶
Vector3Equals - Check whether two given vectors are almost equal
func Vector3LengthSqr ¶
Vector3LengthSqr - Calculate vector square length
func Vector3OrthoNormalize ¶
func Vector3OrthoNormalize(v1, v2 *Vector3)
Vector3OrthoNormalize - Orthonormalize provided vectors Makes vectors normalized and orthogonal to each other Gram-Schmidt function implementation
func Vector3ToFloat ¶
Vector3ToFloat - Converts Vector3 to float32 slice
func Vector3ToFloatV ¶
Vector3ToFloatV - Get Vector3 as float array
func WaitTime ¶
func WaitTime(seconds float64)
WaitTime - Wait for some time (halt program execution)
func WaveFormat ¶
WaveFormat - Convert wave data to desired format
func WindowShouldClose ¶
func WindowShouldClose() bool
WindowShouldClose - Check if KeyEscape pressed or Close icon pressed
Types ¶
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 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)
type AutomationEvent ¶
AutomationEvent - Automation event
type AutomationEventList ¶
type AutomationEventList struct { Capacity uint32 Count uint32 // Events array (c array) // // Use AutomationEventList.GetEvents instead (go slice) Events *AutomationEvent }
AutomationEventList - Automation event list
func LoadAutomationEventList ¶
func LoadAutomationEventList(fileName string) AutomationEventList
LoadAutomationEventList - Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
func (*AutomationEventList) GetEvents ¶
func (a *AutomationEventList) GetEvents() []AutomationEvent
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 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 struct { // Camera offset (displacement from target) Offset Vector2 // Camera target (rotation and zoom origin) Target Vector2 // 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 ¶
NewCamera2D - Returns new Camera2D
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 DrawCall ¶
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 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 FramebufferAttachTextureType ¶
type FramebufferAttachTextureType = int32
FramebufferAttachTextureType type
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 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 ¶
GenImageCellular - Generate image: cellular algorithm. Bigger tileSize means bigger cells
func GenImageChecked ¶
GenImageChecked - Generate image: checked
func GenImageColor ¶
GenImageColor - Generate image: plain color
func GenImageFontAtlas ¶
func GenImageFontAtlas(glyphs []GlyphInfo, glyphRecs []*Rectangle, fontSize int32, padding int32, packMethod int32) Image
GenImageFontAtlas - Generate image font atlas using chars info
func GenImageGradientLinear ¶
GenImageGradientLinear - Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
func GenImageGradientRadial ¶
GenImageGradientRadial - Generate image: radial gradient
func GenImageGradientSquare ¶
GenImageGradientSquare - Generate image: square gradient
func GenImagePerlinNoise ¶
GenImagePerlinNoise - Generate image: perlin noise
func GenImageText ¶
GenImageText - Generate image: grayscale image from text data
func GenImageWhiteNoise ¶
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 ImageFromChannel ¶
ImageFromChannel - Create an image from a selected channel of another image (GRAYSCALE)
func ImageFromImage ¶
Create an image from another image piece
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 LoadImageAnimFromMemory ¶
func LoadImageAnimFromMemory(fileType string, fileData []byte, dataSize int32, frames *int32) *Image
LoadImageAnimFromMemory - Load image sequence from memory buffer
func LoadImageFromMemory ¶
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 ¶
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 GetCameraProjectionMatrix ¶
GetCameraProjectionMatrix - Returns the camera projection matrix
func GetCameraViewMatrix ¶
GetCameraViewMatrix - Returns the camera view matrix
func GetMatrixModelview ¶
func GetMatrixModelview() Matrix
GetMatrixModelview - Get internal modelview matrix
func GetMatrixProjection ¶
func GetMatrixProjection() Matrix
GetMatrixProjection - Get internal projection matrix
func GetMatrixProjectionStereo ¶
GetMatrixProjectionStereo - Get internal projection matrix for stereo render (selected eye)
func GetMatrixTransform ¶
func GetMatrixTransform() Matrix
GetMatrixTransform - Get internal accumulated transform matrix
func GetMatrixViewOffsetStereo ¶
GetMatrixViewOffsetStereo - Get internal view offset matrix for stereo render (selected eye)
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 MatrixRotateZYX ¶
MatrixRotateZYX - Get zyx-rotation matrix NOTE: Angle must be provided 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 // 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 ¶
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 // 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 LoadModelFromMesh ¶
LoadModelFromMesh - Load model from mesh data
func (Model) GetBindPose ¶
GetBindPose returns the bones base transformation of a model as go slice
func (Model) GetMaterials ¶
GetMaterials returns the materials of a model as go slice
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 MouseButton ¶
type MouseButton int32
const ( MouseButtonLeft MouseButton = iota MouseButtonRight MouseButtonMiddle MouseButtonSide MouseButtonExtra MouseButtonForward MouseButtonBack )
Mouse Buttons
type MouseCursor ¶
type MouseCursor = int32
Mouse cursor
const ( MouseCursorDefault MouseCursor = 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 ¶
LoadMusicStream - Load music stream from file
type NPatchInfo ¶
type NPatchInfo struct { Source Rectangle // 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 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
Quaternion, 4 components (Vector4 alias)
func NewQuaternion ¶
func NewQuaternion(x, y, z, w float32) Quaternion
NewQuaternion - Returns new Quaternion
func QuaternionAdd ¶
func QuaternionAdd(q1 Quaternion, q2 Quaternion) Quaternion
QuaternionAdd - Add two quaternions
func QuaternionAddValue ¶
func QuaternionAddValue(q Quaternion, add float32) Quaternion
QuaternionAddValue - Add quaternion and float value
func QuaternionDivide ¶
func QuaternionDivide(q1 Quaternion, q2 Quaternion) Quaternion
QuaternionDivide - Divide two quaternions
func QuaternionFromAxisAngle ¶
func QuaternionFromAxisAngle(axis Vector3, angle float32) Quaternion
QuaternionFromAxisAngle - Returns rotation quaternion for an angle and axis
func QuaternionFromEuler ¶
func QuaternionFromEuler(pitch, yaw, roll float32) Quaternion
QuaternionFromEuler - Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX
func QuaternionFromMatrix ¶
func QuaternionFromMatrix(matrix Matrix) Quaternion
QuaternionFromMatrix - Returns a quaternion for a given rotation matrix
func QuaternionFromVector3ToVector3 ¶
func QuaternionFromVector3ToVector3(from Vector3, to Vector3) Quaternion
QuaternionFromVector3ToVector3 - Calculate quaternion based on the rotation from one vector to another
func QuaternionIdentity ¶
func QuaternionIdentity() Quaternion
QuaternionIdentity - Get identity quaternion
func QuaternionInvert ¶
func QuaternionInvert(quat Quaternion) Quaternion
QuaternionInvert - Invert provided quaternion
func QuaternionLerp ¶
func QuaternionLerp(q1 Quaternion, q2 Quaternion, amount float32) Quaternion
QuaternionLerp - Calculate linear interpolation between two quaternions
func QuaternionMultiply ¶
func QuaternionMultiply(q1, q2 Quaternion) Quaternion
QuaternionMultiply - Calculate two quaternion multiplication
func QuaternionNlerp ¶
func QuaternionNlerp(q1 Quaternion, q2 Quaternion, amount float32) Quaternion
QuaternionNlerp - Calculate slerp-optimized interpolation between two quaternions
func QuaternionNormalize ¶
func QuaternionNormalize(q Quaternion) Quaternion
QuaternionNormalize - Normalize provided quaternion
func QuaternionScale ¶
func QuaternionScale(q Quaternion, mul float32) Quaternion
QuaternionScale - Scale quaternion by float value
func QuaternionSlerp ¶
func QuaternionSlerp(q1, q2 Quaternion, amount float32) Quaternion
QuaternionSlerp - Calculates spherical linear interpolation between two quaternions
func QuaternionSubtract ¶
func QuaternionSubtract(q1 Quaternion, q2 Quaternion) Quaternion
QuaternionSubtract - Subtract two quaternions
func QuaternionSubtractValue ¶
func QuaternionSubtractValue(q Quaternion, sub float32) Quaternion
QuaternionSubtractValue - Subtract quaternion and float value
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
deprecated
GetMouseRay - Get a ray trace from mouse position
Deprecated: Use GetScreenToWorldRay instead.
func GetScreenToWorldRay ¶
GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)
func GetScreenToWorldRayEx ¶
GetScreenToWorldRayEx - Get a ray trace from screen position (i.e mouse) in a viewport
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 GetShapesTextureRectangle ¶
func GetShapesTextureRectangle() Rectangle
GetShapesTextureRectangle - Get texture source rectangle that is used for shapes drawing
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 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(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 ( // 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 LoadSoundAlias ¶
LoadSoundAlias - Create a new sound that shares the same sample data as the source sound, does not own the sound data
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 GetShapesTexture ¶
func GetShapesTexture() Texture2D
GetShapesTexture - Get texture that is used for shapes drawing
func LoadTexture ¶
LoadTexture - Load an image as texture into GPU memory
func LoadTextureCubemap ¶
LoadTextureCubemap - Loads a texture for a cubemap using given layout
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 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
type Vector2 ¶
Vector2 type
func GetGestureDragVector ¶
func GetGestureDragVector() Vector2
GetGestureDragVector - Get gesture drag vector
func GetGesturePinchVector ¶
func GetGesturePinchVector() Vector2
GetGesturePinchVector - Get gesture pinch delta
func GetMonitorPosition ¶
GetMonitorPosition - Get specified monitor position
func GetMousePosition ¶
func GetMousePosition() Vector2
GetMousePosition - Returns mouse position XY
func GetMouseWheelMoveV ¶
func GetMouseWheelMoveV() Vector2
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 GetSplinePointBasis ¶
GetSplinePointBasis - Get (evaluate) spline point: B-Spline
func GetSplinePointBezierCubic ¶
GetSplinePointBezierCubic - Get (evaluate) spline point: Cubic Bezier
func GetSplinePointBezierQuad ¶
GetSplinePointBezierQuad - Get (evaluate) spline point: Quadratic Bezier
func GetSplinePointCatmullRom ¶
GetSplinePointCatmullRom - Get (evaluate) spline point: Catmull-Rom
func GetSplinePointLinear ¶
GetSplinePointLinear - Get (evaluate) spline point: Linear
func GetTouchPosition ¶
GetTouchPosition - Returns touch position XY for a touch point index (relative to screen size)
func GetWindowPosition ¶
func GetWindowPosition() Vector2
GetWindowPosition - Get window position XY on monitor
func GetWindowScaleDPI ¶
func GetWindowScaleDPI() Vector2
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 ¶
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 Vector2AddValue ¶
Vector2AddValue - Add vector and float value
func Vector2Clamp ¶
Vector2Clamp - Clamp the components of the vector between min and max values specified by the given vectors
func Vector2ClampValue ¶
Vector2ClampValue - Clamp the magnitude of the vector between two min and max values
func Vector2Cross ¶
Vector2Cross - Calculate the cross product of a vector and a value
func Vector2Divide ¶
Vector2Divide - Divide vector by vector
func Vector2Lerp ¶
Vector2Lerp - Calculate linear interpolation between two vectors
func Vector2MoveTowards ¶
Vector2MoveTowards - Move Vector towards target
func Vector2Multiply ¶
Vector2Multiply - Multiply vector by vector
func Vector2Normalize ¶
Vector2Normalize - Normalize provided vector
func Vector2Reflect ¶
Vector2Reflect - Calculate reflected vector to normal
func Vector2Rotate ¶
Vector2Rotate - Rotate vector by angle
func Vector2Scale ¶
Vector2Scale - Scale vector (multiply by value)
func Vector2Subtract ¶
Vector2Subtract - Subtract two vectors (v1 - v2)
func Vector2SubtractValue ¶
Vector2SubtractValue - Subtract vector by float value
func Vector2Transform ¶
Vector2Transform - Transforms a Vector2 by a given Matrix
type Vector3 ¶
Vector3 type
func ColorToHSV ¶
ColorToHSV - Returns HSV values for a Color, hue [0..360], saturation/value [0..1]
func GetCameraForward ¶
GetCameraForward - Returns the cameras forward vector (normalized)
func GetCameraRight ¶
GetCameraRight - Returns the cameras right vector (normalized)
func GetCameraUp ¶
GetCameraUp - Returns the cameras up vector (normalized) Note: The up vector might not be perpendicular to the forward vector
func QuaternionToEuler ¶
func QuaternionToEuler(q Quaternion) Vector3
QuaternionToEuler - Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians
func Vector3AddValue ¶
Vector3AddValue - Add vector and float value
func Vector3Barycenter ¶
Vector3Barycenter - Barycenter coords for p in triangle abc
func Vector3Clamp ¶
Vector3Clamp - Clamp the components of the vector between min and max values specified by the given vectors
func Vector3ClampValue ¶
Vector3ClampValue - Clamp the magnitude of the vector between two values
func Vector3CrossProduct ¶
Vector3CrossProduct - Calculate two vectors cross product
func Vector3Divide ¶
Vector3Divide - Divide vector by vector
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 vector
func Vector3Negate ¶
Vector3Negate - Negate provided vector (invert direction)
func Vector3Normalize ¶
Vector3Normalize - Normalize provided vector
func Vector3Perpendicular ¶
Vector3Perpendicular - Calculate one vector perpendicular vector
func Vector3Project ¶
Vector3Project - Calculate the projection of the vector v1 on to v2
func Vector3Reflect ¶
Vector3Reflect - Calculate reflected vector to normal
func Vector3Refract ¶
Vector3Refract - Compute the direction of a refracted ray
v: normalized direction of the incoming ray n: normalized normal vector of the interface of two optical media r: ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface
func Vector3Reject ¶
Vector3Reject - Calculate the rejection of the vector v1 on to v2
func Vector3RotateByAxisAngle ¶
Vector3RotateByAxisAngle - Rotates a vector around an axis
func Vector3RotateByQuaternion ¶
func Vector3RotateByQuaternion(v Vector3, q Quaternion) Vector3
Vector3RotateByQuaternion - Transform a vector by quaternion rotation
func Vector3Scale ¶
Vector3Scale - Scale provided vector
func Vector3Subtract ¶
Vector3Subtract - Subtract two vectors
func Vector3SubtractValue ¶
Vector3SubtractValue - Subtract vector by float value
func Vector3Transform ¶
Vector3Transform - Transforms a Vector3 by a given Matrix
func Vector3Unproject ¶
Vector3Unproject - Projects a Vector3 from screen space into object space NOTE: We are avoiding calling other raymath functions despite available
type Vector4 ¶
Vector4 type
func ColorNormalize ¶
ColorNormalize - Returns color normalized as float [0..1]
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 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 LoadWaveFromMemory ¶
LoadWaveFromMemory - Load wave from memory buffer, fileType refers to extension: i.e. ".wav"