Documentation
¶
Index ¶
- Constants
- func AttachAudioMixedProcessor(processor AudioCallback)
- func BeginBlendMode(mode c.Int)
- func BeginDrawing()
- func BeginScissorMode(x c.Int, y c.Int, width c.Int, height c.Int)
- func ChangeDirectory(dirPath *c.Char) bool
- func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
- func CheckCollisionRecs(rec1 Rectangle, rec2 Rectangle) bool
- func ClearBackground(color Color)
- func ClearWindowState(flags c.Uint)
- func CloseAudioDevice()
- func CloseWindow()
- func CodepointToUTF8(codepoint c.Int, utf8Size *c.Int) *c.Char
- func ColorIsEqual(col1 Color, col2 Color) bool
- func ColorToInt(color Color) c.Int
- func CompressData(data *uint8, dataSize c.Int, compDataSize *c.Int) *uint8
- func ComputeCRC32(data *uint8, dataSize c.Int) c.Uint
- func ComputeMD5(data *uint8, dataSize c.Int) *c.Uint
- func ComputeSHA1(data *uint8, dataSize c.Int) *c.Uint
- func ComputeSHA256(data *uint8, dataSize c.Int) *c.Uint
- func DecodeDataBase64(text *c.Char, outputSize *c.Int) *uint8
- func DecompressData(compData *uint8, compDataSize c.Int, dataSize *c.Int) *uint8
- func DetachAudioMixedProcessor(processor AudioCallback)
- func DirectoryExists(dirPath *c.Char) bool
- func DisableCursor()
- func DisableEventWaiting()
- func DrawCircle(centerX c.Int, centerY c.Int, radius c.Float, color Color)
- func DrawCircleLines(centerX c.Int, centerY c.Int, radius c.Float, color Color)
- func DrawEllipse(centerX c.Int, centerY c.Int, radiusH c.Float, radiusV c.Float, color Color)
- func DrawEllipseLines(centerX c.Int, centerY c.Int, radiusH c.Float, radiusV c.Float, color Color)
- func DrawFPS(posX c.Int, posY c.Int)
- func DrawGrid(slices c.Int, spacing c.Float)
- func DrawLine(startPosX c.Int, startPosY c.Int, endPosX c.Int, endPosY c.Int, color Color)
- func DrawPixel(posX c.Int, posY c.Int, color Color)
- func DrawRectangle(posX c.Int, posY c.Int, width c.Int, height c.Int, color Color)
- func DrawRectangleGradientH(posX c.Int, posY c.Int, width c.Int, height c.Int, left Color, right Color)
- func DrawRectangleGradientV(posX c.Int, posY c.Int, width c.Int, height c.Int, top Color, bottom Color)
- func DrawRectangleLines(posX c.Int, posY c.Int, width c.Int, height c.Int, color Color)
- func DrawText(text *c.Char, posX c.Int, posY c.Int, fontSize c.Int, color Color)
- func EnableCursor()
- func EnableEventWaiting()
- func EncodeDataBase64(data *uint8, dataSize c.Int, outputSize *c.Int) *c.Char
- func EndBlendMode()
- func EndDrawing()
- func EndMode2D()
- func EndMode3D()
- func EndScissorMode()
- func EndShaderMode()
- func EndTextureMode()
- func EndVrStereoMode()
- func ExportDataAsCode(data *uint8, dataSize c.Int, fileName *c.Char) bool
- func FileCopy(srcPath *c.Char, dstPath *c.Char) c.Int
- func FileExists(fileName *c.Char) bool
- func FileMove(srcPath *c.Char, dstPath *c.Char) c.Int
- func FileRemove(fileName *c.Char) c.Int
- func FileRename(fileName *c.Char, fileRename *c.Char) c.Int
- func FileTextFindIndex(fileName *c.Char, search *c.Char) c.Int
- func FileTextReplace(fileName *c.Char, search *c.Char, replacement *c.Char) c.Int
- func GetApplicationDirectory() *c.Char
- func GetCharPressed() c.Int
- func GetClipboardText() *c.Char
- func GetCodepoint(text *c.Char, codepointSize *c.Int) c.Int
- func GetCodepointCount(text *c.Char) c.Int
- func GetCodepointNext(text *c.Char, codepointSize *c.Int) c.Int
- func GetCodepointPrevious(text *c.Char, codepointSize *c.Int) c.Int
- func GetCurrentMonitor() c.Int
- func GetDirectoryFileCount(dirPath *c.Char) c.Uint
- func GetDirectoryFileCountEx(basePath *c.Char, filter *c.Char, scanSubdirs bool) c.Uint
- func GetDirectoryPath(filePath *c.Char) *c.Char
- func GetFPS() c.Int
- func GetFileExtension(fileName *c.Char) *c.Char
- func GetFileLength(fileName *c.Char) c.Int
- func GetFileModTime(fileName *c.Char) c.Long
- func GetFileName(filePath *c.Char) *c.Char
- func GetFileNameWithoutExt(filePath *c.Char) *c.Char
- func GetFrameTime() c.Float
- func GetGamepadAxisCount(gamepad c.Int) c.Int
- func GetGamepadAxisMovement(gamepad c.Int, axis c.Int) c.Float
- func GetGamepadButtonPressed() c.Int
- func GetGamepadName(gamepad c.Int) *c.Char
- func GetGestureDetected() c.Int
- func GetGestureDragAngle() c.Float
- func GetGestureHoldDuration() c.Float
- func GetGesturePinchAngle() c.Float
- func GetKeyName(key c.Int) *c.Char
- func GetKeyPressed() c.Int
- func GetMasterVolume() c.Float
- func GetMonitorCount() c.Int
- func GetMonitorHeight(monitor c.Int) c.Int
- func GetMonitorName(monitor c.Int) *c.Char
- func GetMonitorPhysicalHeight(monitor c.Int) c.Int
- func GetMonitorPhysicalWidth(monitor c.Int) c.Int
- func GetMonitorRefreshRate(monitor c.Int) c.Int
- func GetMonitorWidth(monitor c.Int) c.Int
- func GetMouseWheelMove() c.Float
- func GetMouseX() c.Int
- func GetMouseY() c.Int
- func GetPixelDataSize(width c.Int, height c.Int, format c.Int) c.Int
- func GetPrevDirectoryPath(dirPath *c.Char) *c.Char
- func GetRandomValue(min c.Int, max c.Int) c.Int
- func GetRenderHeight() c.Int
- func GetRenderWidth() c.Int
- func GetScreenHeight() c.Int
- func GetScreenWidth() c.Int
- func GetTextBetween(text *c.Char, begin *c.Char, end *c.Char) *c.Char
- func GetTime() c.Double
- func GetTouchPointCount() c.Int
- func GetTouchPointId(index c.Int) c.Int
- func GetTouchX() c.Int
- func GetTouchY() c.Int
- func GetWindowHandle() unsafe.Pointer
- func GetWorkingDirectory() *c.Char
- func HideCursor()
- func InitAudioDevice()
- func InitWindow(width c.Int, height c.Int, title *c.Char)
- func IsAudioDeviceReady() bool
- func IsCursorHidden() bool
- func IsCursorOnScreen() bool
- func IsFileDropped() bool
- func IsFileExtension(fileName *c.Char, ext *c.Char) bool
- func IsFileNameValid(fileName *c.Char) bool
- func IsGamepadAvailable(gamepad c.Int) bool
- func IsGamepadButtonDown(gamepad c.Int, button c.Int) bool
- func IsGamepadButtonPressed(gamepad c.Int, button c.Int) bool
- func IsGamepadButtonReleased(gamepad c.Int, button c.Int) bool
- func IsGamepadButtonUp(gamepad c.Int, button c.Int) bool
- func IsGestureDetected(gesture c.Uint) bool
- func IsKeyDown(key c.Int) bool
- func IsKeyPressed(key c.Int) bool
- func IsKeyPressedRepeat(key c.Int) bool
- func IsKeyReleased(key c.Int) bool
- func IsKeyUp(key c.Int) bool
- func IsMouseButtonDown(button c.Int) bool
- func IsMouseButtonPressed(button c.Int) bool
- func IsMouseButtonReleased(button c.Int) bool
- func IsMouseButtonUp(button c.Int) bool
- func IsPathFile(path *c.Char) 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 c.Uint) bool
- func LoadCodepoints(text *c.Char, count *c.Int) *c.Int
- func LoadFileData(fileName *c.Char, dataSize *c.Int) *uint8
- func LoadFileText(fileName *c.Char) *c.Char
- func LoadRandomSequence(count c.Uint, min c.Int, max c.Int) *c.Int
- func LoadTextLines(text *c.Char, count *c.Int) **c.Char
- func LoadUTF8(codepoints *c.Int, length c.Int) *c.Char
- func MakeDirectory(dirPath *c.Char) c.Int
- func MaximizeWindow()
- func MeasureText(text *c.Char, fontSize c.Int) c.Int
- func MemAlloc(size c.Uint) unsafe.Pointer
- func MemFree(ptr unsafe.Pointer)
- func MemRealloc(ptr unsafe.Pointer, size c.Uint) unsafe.Pointer
- func MinimizeWindow()
- func OpenURL(url *c.Char)
- func PollInputEvents()
- func RestoreWindow()
- func SaveFileData(fileName *c.Char, data unsafe.Pointer, dataSize c.Int) bool
- func SaveFileText(fileName *c.Char, text *c.Char) bool
- func SetAudioStreamBufferSizeDefault(size c.Int)
- func SetAutomationEventBaseFrame(frame c.Int)
- func SetClipboardText(text *c.Char)
- func SetConfigFlags(flags c.Uint)
- func SetExitKey(key c.Int)
- func SetGamepadMappings(mappings *c.Char) c.Int
- func SetGamepadVibration(gamepad c.Int, leftMotor c.Float, rightMotor c.Float, duration c.Float)
- func SetGesturesEnabled(flags c.Uint)
- func SetLoadFileDataCallback(callback LoadFileDataCallback)
- func SetLoadFileTextCallback(callback LoadFileTextCallback)
- func SetMasterVolume(volume c.Float)
- func SetMouseCursor(cursor c.Int)
- func SetMouseOffset(offsetX c.Int, offsetY c.Int)
- func SetMousePosition(x c.Int, y c.Int)
- func SetMouseScale(scaleX c.Float, scaleY c.Float)
- func SetPixelColor(dstPtr unsafe.Pointer, color Color, format c.Int)
- func SetRandomSeed(seed c.Uint)
- func SetSaveFileDataCallback(callback SaveFileDataCallback)
- func SetSaveFileTextCallback(callback SaveFileTextCallback)
- func SetTargetFPS(fps c.Int)
- func SetTextLineSpacing(spacing c.Int)
- func SetTraceLogCallback(callback TraceLogCallback)
- func SetTraceLogLevel(logLevel c.Int)
- func SetWindowFocused()
- func SetWindowMaxSize(width c.Int, height c.Int)
- func SetWindowMinSize(width c.Int, height c.Int)
- func SetWindowMonitor(monitor c.Int)
- func SetWindowOpacity(opacity c.Float)
- func SetWindowPosition(x c.Int, y c.Int)
- func SetWindowSize(width c.Int, height c.Int)
- func SetWindowState(flags c.Uint)
- func SetWindowTitle(title *c.Char)
- func ShowCursor()
- func StartAutomationEventRecording()
- func StopAutomationEventRecording()
- func SwapScreenBuffer()
- func TakeScreenshot(fileName *c.Char)
- func TextAppend(text *c.Char, append *c.Char, position *c.Int)
- func TextCopy(dst *c.Char, src *c.Char) c.Int
- func TextFindIndex(text *c.Char, search *c.Char) c.Int
- func TextFormat(text *c.Char, __llgo_va_list ...any) *c.Char
- func TextInsert(text *c.Char, insert *c.Char, position c.Int) *c.Char
- func TextInsertAlloc(text *c.Char, insert *c.Char, position c.Int) *c.Char
- func TextIsEqual(text1 *c.Char, text2 *c.Char) bool
- func TextJoin(textList **c.Char, count c.Int, delimiter *c.Char) *c.Char
- func TextLength(text *c.Char) c.Uint
- func TextRemoveSpaces(text *c.Char) *c.Char
- func TextReplace(text *c.Char, search *c.Char, replacement *c.Char) *c.Char
- func TextReplaceAlloc(text *c.Char, search *c.Char, replacement *c.Char) *c.Char
- func TextReplaceBetween(text *c.Char, begin *c.Char, end *c.Char, replacement *c.Char) *c.Char
- func TextReplaceBetweenAlloc(text *c.Char, begin *c.Char, end *c.Char, replacement *c.Char) *c.Char
- func TextSplit(text *c.Char, delimiter c.Char, count *c.Int) **c.Char
- func TextSubtext(text *c.Char, position c.Int, length c.Int) *c.Char
- func TextToCamel(text *c.Char) *c.Char
- func TextToFloat(text *c.Char) c.Float
- func TextToInteger(text *c.Char) c.Int
- func TextToLower(text *c.Char) *c.Char
- func TextToPascal(text *c.Char) *c.Char
- func TextToSnake(text *c.Char) *c.Char
- func TextToUpper(text *c.Char) *c.Char
- func ToggleBorderlessWindowed()
- func ToggleFullscreen()
- func TraceLog(logLevel c.Int, text *c.Char, __llgo_va_list ...any)
- func UnloadCodepoints(codepoints *c.Int)
- func UnloadFileData(data *uint8)
- func UnloadFileText(text *c.Char)
- func UnloadImageColors(colors *Color)
- func UnloadImagePalette(colors *Color)
- func UnloadRandomSequence(sequence *c.Int)
- func UnloadTextLines(text **c.Char, lineCount c.Int)
- func UnloadUTF8(text *c.Char)
- func UnloadWaveSamples(samples *c.Float)
- func WaitTime(seconds c.Double)
- func WindowShouldClose() bool
- type AudioCallback
- type AudioStream
- func (self AudioStream) AttachAudioStreamProcessor(processor AudioCallback)
- func (self AudioStream) DetachAudioStreamProcessor(processor AudioCallback)
- func (self AudioStream) IsAudioStreamPlaying() bool
- func (self AudioStream) IsAudioStreamProcessed() bool
- func (self AudioStream) IsAudioStreamValid() bool
- func (self AudioStream) Pause()
- func (self AudioStream) Play()
- func (self AudioStream) Resume()
- func (self AudioStream) SetAudioStreamCallback(callback AudioCallback)
- func (self AudioStream) SetAudioStreamPan(pan c.Float)
- func (self AudioStream) SetAudioStreamPitch(pitch c.Float)
- func (self AudioStream) SetAudioStreamVolume(volume c.Float)
- func (self AudioStream) Stop()
- func (self AudioStream) Unload()
- func (self AudioStream) Update(data unsafe.Pointer, frameCount c.Int)
- type AutomationEvent
- type AutomationEventList
- type BlendMode
- type BoneInfo
- type BoundingBox
- type Camera
- func (self Camera) DrawBillboard(texture Texture2D, position Vector3, scale c.Float, tint Color)
- func (self Camera) DrawBillboardPro(texture Texture2D, source Rectangle, position Vector3, up Vector3, ...)
- func (self Camera) DrawBillboardRec(texture Texture2D, source Rectangle, position Vector3, size Vector2, ...)
- func (self *Camera) Forward() Vector3
- func (self *Camera) GetCameraUp() Vector3
- func (self Camera) Matrix() Matrix
- func (self *Camera) MoveForward(distance c.Float, moveInWorldPlane bool)
- func (self *Camera) MoveRight(distance c.Float, moveInWorldPlane bool)
- func (self *Camera) MoveToTarget(delta c.Float)
- func (self *Camera) MoveUp(distance c.Float)
- func (self *Camera) Pitch(angle c.Float, lockView bool, rotateAroundTarget bool, rotateUp bool)
- func (self *Camera) ProjectionMatrix(aspect c.Float) Matrix
- func (self *Camera) Right() Vector3
- func (self *Camera) Roll(angle c.Float)
- func (self *Camera) Update(mode c.Int)
- func (self *Camera) UpdateCameraPro(movement Vector3, rotation Vector3, zoom c.Float)
- func (self *Camera) ViewMatrix() Matrix
- func (self *Camera) Yaw(angle c.Float, rotateAroundTarget bool)
- type Camera2D
- type Camera3D
- type CameraMode
- type CameraProjection
- type Color
- func ColorAlpha(color Color, alpha c.Float) Color
- func ColorAlphaBlend(dst Color, src Color, tint Color) Color
- func ColorBrightness(color Color, factor c.Float) Color
- func ColorContrast(color Color, contrast c.Float) Color
- func ColorFromHSV(hue c.Float, saturation c.Float, value c.Float) Color
- func ColorLerp(color1 Color, color2 Color, factor c.Float) Color
- func ColorTint(color Color, tint Color) Color
- func Fade(color Color, alpha c.Float) Color
- func GetColor(hexValue c.Uint) Color
- func GetPixelColor(srcPtr unsafe.Pointer, format c.Int) Color
- type ConfigFlags
- type CubemapLayout
- type FilePathList
- type Float3
- type Float16
- type Font
- func (self Font) DrawTextCodepoint(codepoint c.Int, position Vector2, fontSize c.Float, tint Color)
- func (self Font) DrawTextCodepoints(codepoints *c.Int, codepointCount c.Int, position Vector2, fontSize c.Float, ...)
- func (self Font) DrawTextEx(text *c.Char, position Vector2, fontSize c.Float, spacing c.Float, tint Color)
- func (self Font) DrawTextPro(text *c.Char, position Vector2, origin Vector2, rotation c.Float, ...)
- func (self Font) ExportFontAsCode(fileName *c.Char) bool
- func (self Font) GlyphAtlasRec(codepoint c.Int) Rectangle
- func (self Font) GlyphIndex(codepoint c.Int) c.Int
- func (self Font) GlyphInfo(codepoint c.Int) GlyphInfo
- func (self Font) ImageTextEx(text *c.Char, fontSize c.Float, spacing c.Float, tint Color) Image
- func (self Font) IsFontValid() bool
- func (self Font) MeasureTextCodepoints(codepoints *c.Int, length c.Int, fontSize c.Float, spacing c.Float) Vector2
- func (self Font) MeasureTextEx(text *c.Char, fontSize c.Float, spacing c.Float) Vector2
- func (self Font) Unload()
- type FontType
- type GamepadAxis
- type GamepadButton
- type Gesture
- type GlyphInfo
- type Image
- func GenImageCellular(width c.Int, height c.Int, tileSize c.Int) Image
- func GenImageChecked(width c.Int, height c.Int, checksX c.Int, checksY c.Int, col1 Color, ...) Image
- func GenImageColor(width c.Int, height c.Int, color Color) Image
- func GenImageGradientLinear(width c.Int, height c.Int, direction c.Int, start Color, end Color) Image
- func GenImageGradientRadial(width c.Int, height c.Int, density c.Float, inner Color, outer Color) Image
- func GenImageGradientSquare(width c.Int, height c.Int, density c.Float, inner Color, outer Color) Image
- func GenImagePerlinNoise(width c.Int, height c.Int, offsetX c.Int, offsetY c.Int, scale c.Float) Image
- func GenImageText(width c.Int, height c.Int, text *c.Char) Image
- func GenImageWhiteNoise(width c.Int, height c.Int, factor c.Float) Image
- func GetClipboardImage() Image
- func ImageText(text *c.Char, fontSize c.Int, color Color) Image
- func LoadImage(fileName *c.Char) Image
- func LoadImageAnim(fileName *c.Char, frames *c.Int) Image
- func LoadImageAnimFromMemory(fileType *c.Char, fileData *uint8, dataSize c.Int, frames *c.Int) Image
- func LoadImageFromMemory(fileType *c.Char, fileData *uint8, dataSize c.Int) Image
- func LoadImageFromScreen() Image
- func LoadImageRaw(fileName *c.Char, width c.Int, height c.Int, format c.Int, headerSize c.Int) Image
- func (self Image) AlphaBorder(threshold c.Float) Rectangle
- func (self *Image) AlphaClear(color Color, threshold c.Float)
- func (self *Image) AlphaCrop(threshold c.Float)
- func (self *Image) AlphaMask(alphaMask Image)
- func (self *Image) AlphaPremultiply()
- func (self *Image) BlurGaussian(blurSize c.Int)
- func (self *Image) ClearBackground(color Color)
- func (self Image) Color(x c.Int, y c.Int) Color
- func (self *Image) ColorBrightness(brightness c.Int)
- func (self *Image) ColorContrast(contrast c.Float)
- func (self *Image) ColorGrayscale()
- func (self *Image) ColorInvert()
- func (self *Image) ColorReplace(color Color, replace Color)
- func (self *Image) ColorTint(color Color)
- func (self Image) Copy() Image
- func (self *Image) Crop(crop Rectangle)
- func (self *Image) Dither(rBpp c.Int, gBpp c.Int, bBpp c.Int, aBpp c.Int)
- func (self *Image) Draw(src Image, srcRec Rectangle, dstRec Rectangle, tint Color)
- func (self *Image) DrawCircle(centerX c.Int, centerY c.Int, radius c.Int, color Color)
- func (self *Image) DrawCircleLines(centerX c.Int, centerY c.Int, radius c.Int, color Color)
- func (self *Image) DrawCircleLinesV(center Vector2, radius c.Int, color Color)
- func (self *Image) DrawCircleV(center Vector2, radius c.Int, color Color)
- func (self *Image) DrawLine(startPosX c.Int, startPosY c.Int, endPosX c.Int, endPosY c.Int, color Color)
- func (self *Image) DrawLineEx(start Vector2, end Vector2, thick c.Int, color Color)
- func (self *Image) DrawLineV(start Vector2, end Vector2, color Color)
- func (self *Image) DrawPixel(posX c.Int, posY c.Int, color Color)
- func (self *Image) DrawPixelV(position Vector2, color Color)
- func (self *Image) DrawRectangle(posX c.Int, posY c.Int, width c.Int, height c.Int, color Color)
- func (self *Image) DrawRectangleLines(rec Rectangle, thick c.Int, color Color)
- func (self *Image) DrawRectangleRec(rec Rectangle, color Color)
- func (self *Image) DrawRectangleV(position Vector2, size Vector2, color Color)
- func (self *Image) DrawText(text *c.Char, posX c.Int, posY c.Int, fontSize c.Int, color Color)
- func (self *Image) DrawTextEx(font Font, text *c.Char, position Vector2, fontSize c.Float, spacing c.Float, ...)
- func (self *Image) DrawTriangle(v1 Vector2, v2 Vector2, v3 Vector2, color Color)
- func (self *Image) DrawTriangleEx(v1 Vector2, v2 Vector2, v3 Vector2, c1 Color, c2 Color, c3 Color)
- func (self *Image) DrawTriangleFan(points *Vector2, pointCount c.Int, color Color)
- func (self *Image) DrawTriangleLines(v1 Vector2, v2 Vector2, v3 Vector2, color Color)
- func (self *Image) DrawTriangleStrip(points *Vector2, pointCount c.Int, color Color)
- func (self Image) Export(fileName *c.Char) bool
- func (self Image) ExportImageAsCode(fileName *c.Char) bool
- func (self Image) ExportImageToMemory(fileType *c.Char, fileSize *c.Int) *uint8
- func (self *Image) FlipHorizontal()
- func (self *Image) FlipVertical()
- func (self Image) From(rec Rectangle) Image
- func (self Image) FromChannel(selectedChannel c.Int) Image
- func (self Image) GenMeshCubicmap(cubeSize Vector3) Mesh
- func (self Image) GenMeshHeightmap(size Vector3) Mesh
- func (self *Image) ImageFormat(newFormat c.Int)
- func (self *Image) ImageMipmaps()
- func (self Image) IsImageValid() bool
- func (self *Image) KernelConvolution(kernel *c.Float, kernelSize c.Int)
- func (self Image) LoadFontFrom(key Color, firstChar c.Int) Font
- func (self Image) LoadImageColors() *Color
- func (self Image) LoadImagePalette(maxPaletteSize c.Int, colorCount *c.Int) *Color
- func (self Image) LoadTextureCubemap(layout c.Int) TextureCubemap
- func (self Image) LoadTextureFrom() Texture2D
- func (self *Image) Resize(newWidth c.Int, newHeight c.Int)
- func (self *Image) ResizeCanvas(newWidth c.Int, newHeight c.Int, offsetX c.Int, offsetY c.Int, fill Color)
- func (self *Image) ResizeNN(newWidth c.Int, newHeight c.Int)
- func (self *Image) Rotate(degrees c.Int)
- func (self *Image) RotateCCW()
- func (self *Image) RotateCW()
- func (self Image) SetWindowIcon()
- func (self *Image) SetWindowIcons(count c.Int)
- func (self *Image) ToPOT(fill Color)
- func (self Image) Unload()
- type KeyboardKey
- type LoadFileDataCallback
- type LoadFileTextCallback
- type Material
- type MaterialMap
- type MaterialMapIndex
- type Matrix
- type Mesh
- func GenMeshCone(radius c.Float, height c.Float, slices c.Int) Mesh
- func GenMeshCube(width c.Float, height c.Float, length c.Float) Mesh
- func GenMeshCylinder(radius c.Float, height c.Float, slices c.Int) Mesh
- func GenMeshHemiSphere(radius c.Float, rings c.Int, slices c.Int) Mesh
- func GenMeshKnot(radius c.Float, size c.Float, radSeg c.Int, sides c.Int) Mesh
- func GenMeshPlane(width c.Float, length c.Float, resX c.Int, resZ c.Int) Mesh
- func GenMeshPoly(sides c.Int, radius c.Float) Mesh
- func GenMeshSphere(radius c.Float, rings c.Int, slices c.Int) Mesh
- func GenMeshTorus(radius c.Float, size c.Float, radSeg c.Int, sides c.Int) Mesh
- func (self Mesh) BoundingBox() BoundingBox
- func (self Mesh) Draw(material Material, transform Matrix)
- func (self Mesh) DrawMeshInstanced(material Material, transforms *Matrix, instances c.Int)
- func (self Mesh) Export(fileName *c.Char) bool
- func (self Mesh) ExportMeshAsCode(fileName *c.Char) bool
- func (self *Mesh) GenMeshTangents()
- func (self Mesh) LoadModelFrom() Model
- func (self Mesh) Unload()
- func (self Mesh) UpdateMeshBuffer(index c.Int, data unsafe.Pointer, dataSize c.Int, offset c.Int)
- func (self *Mesh) Upload(dynamic bool)
- type Model
- func (self Model) BoundingBox() BoundingBox
- func (self Model) Draw(position Vector3, scale c.Float, tint Color)
- func (self Model) DrawModelEx(position Vector3, rotationAxis Vector3, rotationAngle c.Float, scale Vector3, ...)
- func (self Model) DrawModelWires(position Vector3, scale c.Float, tint Color)
- func (self Model) DrawModelWiresEx(position Vector3, rotationAxis Vector3, rotationAngle c.Float, scale Vector3, ...)
- func (self Model) IsModelAnimationValid(anim ModelAnimation) bool
- func (self Model) IsModelValid() bool
- func (self *Model) SetModelMeshMaterial(meshId c.Int, materialId c.Int)
- func (self Model) Unload()
- func (self Model) UpdateModelAnimation(anim ModelAnimation, frame c.Float)
- func (self Model) UpdateModelAnimationEx(animA ModelAnimation, frameA c.Float, animB ModelAnimation, frameB c.Float, ...)
- type ModelAnimPose
- type ModelAnimation
- type ModelSkeleton
- type MouseButton
- type MouseCursor
- type Music
- func (self Music) IsMusicStreamPlaying() bool
- func (self Music) IsMusicValid() bool
- func (self Music) PauseMusicStream()
- func (self Music) PlayMusicStream()
- func (self Music) ResumeMusicStream()
- func (self Music) SeekMusicStream(position c.Float)
- func (self Music) SetMusicPan(pan c.Float)
- func (self Music) SetMusicPitch(pitch c.Float)
- func (self Music) SetMusicVolume(volume c.Float)
- func (self Music) StopMusicStream()
- func (self Music) TimeLength() c.Float
- func (self Music) TimePlayed() c.Float
- func (self Music) UnloadMusicStream()
- func (self Music) UpdateMusicStream()
- type NPatchInfo
- type NPatchLayout
- type PixelFormat
- type Quaternion
- type RAudioBuffer
- type RAudioProcessor
- type Ray
- func (self Ray) CollisionBox(box BoundingBox) RayCollision
- func (self Ray) CollisionMesh(mesh Mesh, transform Matrix) RayCollision
- func (self Ray) CollisionQuad(p1 Vector3, p2 Vector3, p3 Vector3, p4 Vector3) RayCollision
- func (self Ray) CollisionSphere(center Vector3, radius c.Float) RayCollision
- func (self Ray) CollisionTriangle(p1 Vector3, p2 Vector3, p3 Vector3) RayCollision
- func (self Ray) Draw(color Color)
- type RayCollision
- type Rectangle
- func (self Rectangle) DrawRectangleGradientEx(topLeft Color, bottomLeft Color, bottomRight Color, topRight Color)
- func (self Rectangle) DrawRectangleLinesEx(lineThick c.Float, color Color)
- func (self Rectangle) DrawRectanglePro(origin Vector2, rotation c.Float, color Color)
- func (self Rectangle) DrawRectangleRec(color Color)
- func (self Rectangle) DrawRectangleRounded(roundness c.Float, segments c.Int, color Color)
- func (self Rectangle) DrawRectangleRoundedLines(roundness c.Float, segments c.Int, color Color)
- func (self Rectangle) DrawRectangleRoundedLinesEx(roundness c.Float, segments c.Int, lineThick c.Float, color Color)
- type RenderTexture
- type RenderTexture2D
- type SaveFileDataCallback
- type SaveFileTextCallback
- type Shader
- func (self Shader) BeginShaderMode()
- func (self Shader) IsShaderValid() bool
- func (self Shader) Location(uniformName *c.Char) c.Int
- func (self Shader) LocationAttrib(attribName *c.Char) c.Int
- func (self Shader) SetShaderValue(locIndex c.Int, value unsafe.Pointer, uniformType c.Int)
- func (self Shader) SetShaderValueMatrix(locIndex c.Int, mat Matrix)
- func (self Shader) SetShaderValueTexture(locIndex c.Int, texture Texture2D)
- func (self Shader) SetShaderValueV(locIndex c.Int, value unsafe.Pointer, uniformType c.Int, count c.Int)
- func (self Shader) Unload()
- type ShaderAttributeDataType
- type ShaderLocationIndex
- type ShaderUniformDataType
- type Sound
- func (self Sound) IsSoundPlaying() bool
- func (self Sound) IsSoundValid() bool
- func (self Sound) LoadSoundAlias() Sound
- func (self Sound) Pause()
- func (self Sound) Play()
- func (self Sound) Resume()
- func (self Sound) SetSoundPan(pan c.Float)
- func (self Sound) SetSoundPitch(pitch c.Float)
- func (self Sound) SetSoundVolume(volume c.Float)
- func (self Sound) Stop()
- func (self Sound) Unload()
- func (self Sound) UnloadSoundAlias()
- func (self Sound) Update(data unsafe.Pointer, sampleCount c.Int)
- type Texture
- type Texture2D
- func (self Texture2D) DrawTexture(posX c.Int, posY c.Int, tint Color)
- func (self Texture2D) DrawTextureEx(position Vector2, rotation c.Float, scale c.Float, tint Color)
- func (self Texture2D) DrawTextureNPatch(nPatchInfo NPatchInfo, dest Rectangle, origin Vector2, rotation c.Float, ...)
- func (self Texture2D) DrawTexturePro(source Rectangle, dest Rectangle, origin Vector2, rotation c.Float, tint Color)
- func (self Texture2D) DrawTextureRec(source Rectangle, position Vector2, tint Color)
- func (self Texture2D) DrawTextureV(position Vector2, tint Color)
- func (self *Texture2D) GenTextureMipmaps()
- func (self Texture2D) IsTextureValid() bool
- func (self Texture2D) LoadImageFromTexture() Image
- func (self Texture2D) SetShapesTexture(source Rectangle)
- func (self Texture2D) SetTextureFilter(filter c.Int)
- func (self Texture2D) SetTextureWrap(wrap c.Int)
- func (self Texture2D) UnloadTexture()
- func (self Texture2D) UpdateTexture(pixels unsafe.Pointer)
- func (self Texture2D) UpdateTextureRec(rec Rectangle, pixels unsafe.Pointer)
- type TextureCubemap
- type TextureFilter
- type TextureWrap
- type TraceLogCallback
- type TraceLogLevel
- type Transform
- type Vector2
- func GetGestureDragVector() Vector2
- func GetGesturePinchVector() Vector2
- func GetMonitorPosition(monitor c.Int) Vector2
- func GetMouseDelta() Vector2
- func GetMousePosition() Vector2
- func GetMouseWheelMoveV() Vector2
- func GetTouchPosition(index c.Int) Vector2
- func GetWindowPosition() Vector2
- func GetWindowScaleDPI() Vector2
- func (self Vector2) CheckCollisionCircleLine(radius c.Float, p1 Vector2, p2 Vector2) bool
- func (self Vector2) CheckCollisionCircleRec(radius c.Float, rec Rectangle) bool
- func (self Vector2) CheckCollisionCircles(radius1 c.Float, center2 Vector2, radius2 c.Float) bool
- func (self Vector2) CheckCollisionLines(endPos1 Vector2, startPos2 Vector2, endPos2 Vector2, collisionPoint *Vector2) bool
- func (self Vector2) CheckCollisionPointCircle(center Vector2, radius c.Float) bool
- func (self Vector2) CheckCollisionPointLine(p1 Vector2, p2 Vector2, threshold c.Int) bool
- func (self Vector2) CheckCollisionPointPoly(points *Vector2, pointCount c.Int) bool
- func (self Vector2) CheckCollisionPointRec(rec Rectangle) bool
- func (self Vector2) CheckCollisionPointTriangle(p1 Vector2, p2 Vector2, p3 Vector2) bool
- func (self Vector2) DrawCircleGradient(radius c.Float, inner Color, outer Color)
- func (self Vector2) DrawCircleLinesV(radius c.Float, color Color)
- func (self Vector2) DrawCircleSector(radius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, ...)
- func (self Vector2) DrawCircleSectorLines(radius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, ...)
- func (self Vector2) DrawCircleV(radius c.Float, color Color)
- func (self Vector2) DrawEllipseLinesV(radiusH c.Float, radiusV c.Float, color Color)
- func (self Vector2) DrawEllipseV(radiusH c.Float, radiusV c.Float, color Color)
- func (self Vector2) DrawLineBezier(endPos Vector2, thick c.Float, color Color)
- func (self Vector2) DrawLineDashed(endPos Vector2, dashSize c.Int, spaceSize c.Int, color Color)
- func (self Vector2) DrawLineEx(endPos Vector2, thick c.Float, color Color)
- func (self *Vector2) DrawLineStrip(pointCount c.Int, color Color)
- func (self Vector2) DrawLineV(endPos Vector2, color Color)
- func (self Vector2) DrawPixelV(color Color)
- func (self Vector2) DrawPoly(sides c.Int, radius c.Float, rotation c.Float, color Color)
- func (self Vector2) DrawPolyLines(sides c.Int, radius c.Float, rotation c.Float, color Color)
- func (self Vector2) DrawPolyLinesEx(sides c.Int, radius c.Float, rotation c.Float, lineThick c.Float, color Color)
- func (self Vector2) DrawRectangleV(size Vector2, color Color)
- func (self Vector2) DrawRing(innerRadius c.Float, outerRadius c.Float, startAngle c.Float, endAngle c.Float, ...)
- func (self Vector2) DrawRingLines(innerRadius c.Float, outerRadius c.Float, startAngle c.Float, endAngle c.Float, ...)
- func (self *Vector2) DrawSplineBasis(pointCount c.Int, thick c.Float, color Color)
- func (self *Vector2) DrawSplineBezierCubic(pointCount c.Int, thick c.Float, color Color)
- func (self *Vector2) DrawSplineBezierQuadratic(pointCount c.Int, thick c.Float, color Color)
- func (self *Vector2) DrawSplineCatmullRom(pointCount c.Int, thick c.Float, color Color)
- func (self *Vector2) DrawSplineLinear(pointCount c.Int, thick c.Float, color Color)
- func (self Vector2) DrawSplineSegmentBasis(p2 Vector2, p3 Vector2, p4 Vector2, thick c.Float, color Color)
- func (self Vector2) DrawSplineSegmentBezierCubic(c2 Vector2, c3 Vector2, p4 Vector2, thick c.Float, color Color)
- func (self Vector2) DrawSplineSegmentBezierQuadratic(c2 Vector2, p3 Vector2, thick c.Float, color Color)
- func (self Vector2) DrawSplineSegmentCatmullRom(p2 Vector2, p3 Vector2, p4 Vector2, thick c.Float, color Color)
- func (self Vector2) DrawSplineSegmentLinear(p2 Vector2, thick c.Float, color Color)
- func (self Vector2) DrawTriangle(v2 Vector2, v3 Vector2, color Color)
- func (self *Vector2) DrawTriangleFan(pointCount c.Int, color Color)
- func (self Vector2) DrawTriangleLines(v2 Vector2, v3 Vector2, color Color)
- func (self *Vector2) DrawTriangleStrip(pointCount c.Int, color Color)
- func (self Vector2) ScreenToWorld2D(camera Camera2D) Vector2
- func (self Vector2) ScreenToWorldRay(camera Camera) Ray
- func (self Vector2) ScreenToWorldRayEx(camera Camera, width c.Int, height c.Int) Ray
- func (self Vector2) SplinePointBasis(p2 Vector2, p3 Vector2, p4 Vector2, t c.Float) Vector2
- func (self Vector2) SplinePointBezierCubic(c2 Vector2, c3 Vector2, p4 Vector2, t c.Float) Vector2
- func (self Vector2) SplinePointBezierQuad(c2 Vector2, p3 Vector2, t c.Float) Vector2
- func (self Vector2) SplinePointCatmullRom(p2 Vector2, p3 Vector2, p4 Vector2, t c.Float) Vector2
- func (self Vector2) SplinePointLinear(endPos Vector2, t c.Float) Vector2
- func (self Vector2) WorldToScreen2D(camera Camera2D) Vector2
- type Vector3
- func (self Vector3) CheckCollisionSpheres(radius1 c.Float, center2 Vector3, radius2 c.Float) bool
- func (self Vector3) DrawCapsule(endPos Vector3, radius c.Float, slices c.Int, rings c.Int, color Color)
- func (self Vector3) DrawCapsuleWires(endPos Vector3, radius c.Float, slices c.Int, rings c.Int, color Color)
- func (self Vector3) DrawCircle3D(radius c.Float, rotationAxis Vector3, rotationAngle c.Float, color Color)
- func (self Vector3) DrawCube(width c.Float, height c.Float, length c.Float, color Color)
- func (self Vector3) DrawCubeV(size Vector3, color Color)
- func (self Vector3) DrawCubeWires(width c.Float, height c.Float, length c.Float, color Color)
- func (self Vector3) DrawCubeWiresV(size Vector3, color Color)
- func (self Vector3) DrawCylinder(radiusTop c.Float, radiusBottom c.Float, height c.Float, slices c.Int, ...)
- func (self Vector3) DrawCylinderEx(endPos Vector3, startRadius c.Float, endRadius c.Float, sides c.Int, ...)
- func (self Vector3) DrawCylinderWires(radiusTop c.Float, radiusBottom c.Float, height c.Float, slices c.Int, ...)
- func (self Vector3) DrawCylinderWiresEx(endPos Vector3, startRadius c.Float, endRadius c.Float, sides c.Int, ...)
- func (self Vector3) DrawLine3D(endPos Vector3, color Color)
- func (self Vector3) DrawPlane(size Vector2, color Color)
- func (self Vector3) DrawPoint3D(color Color)
- func (self Vector3) DrawSphere(radius c.Float, color Color)
- func (self Vector3) DrawSphereEx(radius c.Float, rings c.Int, slices c.Int, color Color)
- func (self Vector3) DrawSphereWires(radius c.Float, rings c.Int, slices c.Int, color Color)
- func (self Vector3) DrawTriangle3D(v2 Vector3, v3 Vector3, color Color)
- func (self *Vector3) DrawTriangleStrip3D(pointCount c.Int, color Color)
- func (self Vector3) WorldToScreen(camera Camera) Vector2
- func (self Vector3) WorldToScreenEx(camera Camera, width c.Int, height c.Int) Vector2
- type Vector4
- type VrDeviceInfo
- type VrStereoConfig
- type Wave
- func (self Wave) Copy() Wave
- func (self *Wave) Crop(initFrame c.Int, finalFrame c.Int)
- func (self Wave) Export(fileName *c.Char) bool
- func (self Wave) ExportWaveAsCode(fileName *c.Char) bool
- func (self *Wave) Format(sampleRate c.Int, sampleSize c.Int, channels c.Int)
- func (self Wave) IsWaveValid() bool
- func (self Wave) LoadSoundFrom() Sound
- func (self Wave) LoadWaveSamples() *c.Float
- func (self Wave) Unload()
Constants ¶
const ( LIGHTGRAY = Color(200 | 200<<8 | 200<<16 | 255<<24) // Light Gray GRAY = Color(130 | 130<<8 | 130<<16 | 255<<24) // Gray DARKGRAY = Color(80 | 80<<8 | 80<<16 | 255<<24) // Dark Gray YELLOW = Color(253 | 249<<8 | 0<<16 | 255<<24) // Yellow GOLD = Color(255 | 203<<8 | 0<<16 | 255<<24) // Gold ORANGE = Color(255 | 161<<8 | 0<<16 | 255<<24) // Orange PINK = Color(255 | 109<<8 | 194<<16 | 255<<24) // Pink RED = Color(230 | 41<<8 | 55<<16 | 255<<24) // Red MAROON = Color(190 | 33<<8 | 55<<16 | 255<<24) // Maroon GREEN = Color(0 | 228<<8 | 48<<16 | 255<<24) // Green LIME = Color(0 | 158<<8 | 47<<16 | 255<<24) // Lime DARKGREEN = Color(0 | 117<<8 | 44<<16 | 255<<24) // Dark Green SKYBLUE = Color(102 | 191<<8 | 255<<16 | 255<<24) // Sky Blue BLUE = Color(0 | 121<<8 | 241<<16 | 255<<24) // Blue DARKBLUE = Color(0 | 82<<8 | 172<<16 | 255<<24) // Dark Blue PURPLE = Color(200 | 122<<8 | 255<<16 | 255<<24) // Purple VIOLET = Color(135 | 60<<8 | 190<<16 | 255<<24) // Violet DARKPURPLE = Color(112 | 31<<8 | 126<<16 | 255<<24) // Dark Purple BEIGE = Color(211 | 176<<8 | 131<<16 | 255<<24) // Beige BROWN = Color(127 | 106<<8 | 79<<16 | 255<<24) // Brown DARKBROWN = Color(76 | 63<<8 | 47<<16 | 255<<24) // Dark Brown WHITE = Color(255 | 255<<8 | 255<<16 | 255<<24) // White BLACK = Color(0 | 0<<8 | 0<<16 | 255<<24) // Black BLANK = Color(0 | 0<<8 | 0<<16 | 0<<24) // Blank (Transparent) MAGENTA = Color(255 | 0<<8 | 255<<16 | 255<<24) // Magenta RAYWHITE = Color(245 | 245<<8 | 245<<16 | 255<<24) // My own White (raylib logo) )
const ( VERSION_MAJOR = 6 VERSION_MINOR = 0 VERSION_PATCH = 0 VERSION = "6.0" )
const ( FLAG_VSYNC_HINT = 64 FLAG_FULLSCREEN_MODE = 2 FLAG_WINDOW_RESIZABLE = 4 FLAG_WINDOW_UNDECORATED = 8 FLAG_WINDOW_HIDDEN = 128 FLAG_WINDOW_MINIMIZED = 512 FLAG_WINDOW_MAXIMIZED = 1024 FLAG_WINDOW_UNFOCUSED = 2048 FLAG_WINDOW_TOPMOST = 4096 FLAG_WINDOW_ALWAYS_RUN = 256 FLAG_WINDOW_TRANSPARENT = 16 FLAG_WINDOW_HIGHDPI = 8192 FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384 FLAG_BORDERLESS_WINDOWED_MODE = 32768 FLAG_MSAA_4X_HINT = 32 // Set to try enabling interlaced video format (for V3D) FLAG_INTERLACED_HINT = 65536 )
const ( LOG_ALL = 0 LOG_TRACE = 1 LOG_DEBUG = 2 LOG_INFO = 3 LOG_WARNING = 4 LOG_ERROR = 5 LOG_FATAL = 6 // Disable logging LOG_NONE = 7 )
const ( KEY_NULL = 0 // Alphanumeric keys KEY_APOSTROPHE = 39 KEY_COMMA = 44 KEY_MINUS = 45 KEY_PERIOD = 46 KEY_SLASH = 47 KEY_ZERO = 48 KEY_ONE = 49 KEY_TWO = 50 KEY_THREE = 51 KEY_FOUR = 52 KEY_FIVE = 53 KEY_SIX = 54 KEY_SEVEN = 55 KEY_EIGHT = 56 KEY_NINE = 57 KEY_SEMICOLON = 59 KEY_EQUAL = 61 KEY_A = 65 KEY_B = 66 KEY_C = 67 KEY_D = 68 KEY_E = 69 KEY_F = 70 KEY_G = 71 KEY_H = 72 KEY_I = 73 KEY_J = 74 KEY_K = 75 KEY_L = 76 KEY_M = 77 KEY_N = 78 KEY_O = 79 KEY_P = 80 KEY_Q = 81 KEY_R = 82 KEY_S = 83 KEY_T = 84 KEY_U = 85 KEY_V = 86 KEY_W = 87 KEY_X = 88 KEY_Y = 89 KEY_Z = 90 KEY_LEFT_BRACKET = 91 KEY_BACKSLASH = 92 KEY_RIGHT_BRACKET = 93 KEY_GRAVE = 96 // Function keys KEY_SPACE = 32 KEY_ESCAPE = 256 KEY_ENTER = 257 KEY_TAB = 258 KEY_BACKSPACE = 259 KEY_INSERT = 260 KEY_DELETE = 261 KEY_RIGHT = 262 KEY_LEFT = 263 KEY_DOWN = 264 KEY_UP = 265 KEY_PAGE_UP = 266 KEY_PAGE_DOWN = 267 KEY_HOME = 268 KEY_END = 269 KEY_CAPS_LOCK = 280 KEY_SCROLL_LOCK = 281 KEY_NUM_LOCK = 282 KEY_PRINT_SCREEN = 283 KEY_PAUSE = 284 KEY_F1 = 290 KEY_F2 = 291 KEY_F3 = 292 KEY_F4 = 293 KEY_F5 = 294 KEY_F6 = 295 KEY_F7 = 296 KEY_F8 = 297 KEY_F9 = 298 KEY_F10 = 299 KEY_F11 = 300 KEY_F12 = 301 KEY_LEFT_SHIFT = 340 KEY_LEFT_CONTROL = 341 KEY_LEFT_ALT = 342 KEY_LEFT_SUPER = 343 KEY_RIGHT_SHIFT = 344 KEY_RIGHT_CONTROL = 345 KEY_RIGHT_ALT = 346 KEY_RIGHT_SUPER = 347 KEY_KB_MENU = 348 // Keypad keys KEY_KP_0 = 320 KEY_KP_1 = 321 KEY_KP_2 = 322 KEY_KP_3 = 323 KEY_KP_4 = 324 KEY_KP_5 = 325 KEY_KP_6 = 326 KEY_KP_7 = 327 KEY_KP_8 = 328 KEY_KP_9 = 329 KEY_KP_DECIMAL = 330 KEY_KP_DIVIDE = 331 KEY_KP_MULTIPLY = 332 KEY_KP_SUBTRACT = 333 KEY_KP_ADD = 334 KEY_KP_ENTER = 335 KEY_KP_EQUAL = 336 // Android key buttons KEY_BACK = 4 KEY_MENU = 5 KEY_VOLUME_UP = 24 // Key: Android volume down button KEY_VOLUME_DOWN = 25 )
const ( MOUSE_BUTTON_LEFT = 0 MOUSE_BUTTON_RIGHT = 1 MOUSE_BUTTON_MIDDLE = 2 MOUSE_BUTTON_SIDE = 3 MOUSE_BUTTON_EXTRA = 4 MOUSE_BUTTON_FORWARD = 5 MOUSE_BUTTON_BACK = 6 )
const ( MOUSE_CURSOR_DEFAULT = 0 MOUSE_CURSOR_ARROW = 1 MOUSE_CURSOR_IBEAM = 2 MOUSE_CURSOR_CROSSHAIR = 3 MOUSE_CURSOR_POINTING_HAND = 4 MOUSE_CURSOR_RESIZE_EW = 5 MOUSE_CURSOR_RESIZE_NS = 6 MOUSE_CURSOR_RESIZE_NWSE = 7 MOUSE_CURSOR_RESIZE_NESW = 8 MOUSE_CURSOR_RESIZE_ALL = 9 // The operation-not-allowed shape MOUSE_CURSOR_NOT_ALLOWED = 10 )
const ( GAMEPAD_BUTTON_UNKNOWN = 0 GAMEPAD_BUTTON_LEFT_FACE_UP = 1 GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2 GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3 GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4 GAMEPAD_BUTTON_RIGHT_FACE_UP = 5 GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6 GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7 GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8 GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9 GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10 GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11 GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12 GAMEPAD_BUTTON_MIDDLE_LEFT = 13 GAMEPAD_BUTTON_MIDDLE = 14 GAMEPAD_BUTTON_MIDDLE_RIGHT = 15 GAMEPAD_BUTTON_LEFT_THUMB = 16 // Gamepad joystick pressed button right GAMEPAD_BUTTON_RIGHT_THUMB = 17 )
const ( GAMEPAD_AXIS_LEFT_X = 0 GAMEPAD_AXIS_LEFT_Y = 1 GAMEPAD_AXIS_RIGHT_X = 2 GAMEPAD_AXIS_RIGHT_Y = 3 GAMEPAD_AXIS_LEFT_TRIGGER = 4 // Gamepad back trigger right, pressure level: [1..-1] GAMEPAD_AXIS_RIGHT_TRIGGER = 5 )
const ( MATERIAL_MAP_ALBEDO = 0 MATERIAL_MAP_METALNESS = 1 MATERIAL_MAP_NORMAL = 2 MATERIAL_MAP_ROUGHNESS = 3 MATERIAL_MAP_OCCLUSION = 4 MATERIAL_MAP_EMISSION = 5 MATERIAL_MAP_HEIGHT = 6 MATERIAL_MAP_CUBEMAP = 7 MATERIAL_MAP_IRRADIANCE = 8 MATERIAL_MAP_PREFILTER = 9 // Brdf material MATERIAL_MAP_BRDF = 10 )
const ( SHADER_LOC_VERTEX_POSITION = 0 SHADER_LOC_VERTEX_TEXCOORD01 = 1 SHADER_LOC_VERTEX_TEXCOORD02 = 2 SHADER_LOC_VERTEX_NORMAL = 3 SHADER_LOC_VERTEX_TANGENT = 4 SHADER_LOC_VERTEX_COLOR = 5 SHADER_LOC_MATRIX_MVP = 6 SHADER_LOC_MATRIX_VIEW = 7 SHADER_LOC_MATRIX_PROJECTION = 8 SHADER_LOC_MATRIX_MODEL = 9 SHADER_LOC_MATRIX_NORMAL = 10 SHADER_LOC_VECTOR_VIEW = 11 SHADER_LOC_COLOR_DIFFUSE = 12 SHADER_LOC_COLOR_SPECULAR = 13 SHADER_LOC_COLOR_AMBIENT = 14 SHADER_LOC_MAP_ALBEDO = 15 SHADER_LOC_MAP_METALNESS = 16 SHADER_LOC_MAP_NORMAL = 17 SHADER_LOC_MAP_ROUGHNESS = 18 SHADER_LOC_MAP_OCCLUSION = 19 SHADER_LOC_MAP_EMISSION = 20 SHADER_LOC_MAP_HEIGHT = 21 SHADER_LOC_MAP_CUBEMAP = 22 SHADER_LOC_MAP_IRRADIANCE = 23 SHADER_LOC_MAP_PREFILTER = 24 SHADER_LOC_MAP_BRDF = 25 SHADER_LOC_VERTEX_BONEIDS = 26 SHADER_LOC_VERTEX_BONEWEIGHTS = 27 SHADER_LOC_MATRIX_BONETRANSFORMS = 28 // Shader location: vertex attribute: instance transforms SHADER_LOC_VERTEX_INSTANCETRANSFORM = 29 )
const ( SHADER_UNIFORM_FLOAT = 0 SHADER_UNIFORM_VEC2 = 1 SHADER_UNIFORM_VEC3 = 2 SHADER_UNIFORM_VEC4 = 3 SHADER_UNIFORM_INT = 4 SHADER_UNIFORM_IVEC2 = 5 SHADER_UNIFORM_IVEC3 = 6 SHADER_UNIFORM_IVEC4 = 7 SHADER_UNIFORM_UINT = 8 SHADER_UNIFORM_UIVEC2 = 9 SHADER_UNIFORM_UIVEC3 = 10 SHADER_UNIFORM_UIVEC4 = 11 // Shader uniform type: sampler2d SHADER_UNIFORM_SAMPLER2D = 12 )
const ( SHADER_ATTRIB_FLOAT = 0 SHADER_ATTRIB_VEC2 = 1 SHADER_ATTRIB_VEC3 = 2 // Shader attribute type: vec4 (4 float) SHADER_ATTRIB_VEC4 = 3 )
const ( PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 PIXELFORMAT_UNCOMPRESSED_R32 = 8 PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 PIXELFORMAT_UNCOMPRESSED_R16 = 11 PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12 PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13 PIXELFORMAT_COMPRESSED_DXT1_RGB = 14 PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15 PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16 PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17 PIXELFORMAT_COMPRESSED_ETC1_RGB = 18 PIXELFORMAT_COMPRESSED_ETC2_RGB = 19 PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20 PIXELFORMAT_COMPRESSED_PVRT_RGB = 21 PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22 PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23 // 2 bpp PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24 )
const ( TEXTURE_FILTER_POINT = 0 TEXTURE_FILTER_BILINEAR = 1 TEXTURE_FILTER_TRILINEAR = 2 TEXTURE_FILTER_ANISOTROPIC_4X = 3 TEXTURE_FILTER_ANISOTROPIC_8X = 4 TEXTURE_FILTER_ANISOTROPIC_16X = 5 )
const ( TEXTURE_WRAP_REPEAT = 0 TEXTURE_WRAP_CLAMP = 1 TEXTURE_WRAP_MIRROR_REPEAT = 2 // Mirrors and clamps to border the texture in tiled mode TEXTURE_WRAP_MIRROR_CLAMP = 3 )
const ( CUBEMAP_LAYOUT_AUTO_DETECT = 0 CUBEMAP_LAYOUT_LINE_VERTICAL = 1 CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2 CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3 // Layout is defined by a 4x3 cross with cubemap faces CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4 )
const ( FONT_DEFAULT = 0 FONT_BITMAP = 1 // SDF font generation, requires external shader FONT_SDF = 2 )
const ( BLEND_ALPHA = 0 BLEND_ADDITIVE = 1 BLEND_MULTIPLIED = 2 BLEND_ADD_COLORS = 3 BLEND_SUBTRACT_COLORS = 4 BLEND_ALPHA_PREMULTIPLY = 5 BLEND_CUSTOM = 6 // Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) BLEND_CUSTOM_SEPARATE = 7 )
const ( GESTURE_NONE = 0 GESTURE_TAP = 1 GESTURE_DOUBLETAP = 2 GESTURE_HOLD = 4 GESTURE_DRAG = 8 GESTURE_SWIPE_RIGHT = 16 GESTURE_SWIPE_LEFT = 32 GESTURE_SWIPE_UP = 64 GESTURE_SWIPE_DOWN = 128 GESTURE_PINCH_IN = 256 // Pinch out gesture GESTURE_PINCH_OUT = 512 )
const ( CAMERA_CUSTOM = 0 CAMERA_FREE = 1 CAMERA_ORBITAL = 2 CAMERA_FIRST_PERSON = 3 // Camera third person CAMERA_THIRD_PERSON = 4 )
const ( CAMERA_PERSPECTIVE = 0 // Orthographic projection CAMERA_ORTHOGRAPHIC = 1 )
const ( NPATCH_NINE_PATCH = 0 NPATCH_THREE_PATCH_VERTICAL = 1 // Npatch layout: 3x1 tiles NPATCH_THREE_PATCH_HORIZONTAL = 2 )
const LLGoPackage = "link: $(pkg-config --libs raylib); -lraylib"
Variables ¶
This section is empty.
Functions ¶
func AttachAudioMixedProcessor ¶
func AttachAudioMixedProcessor(processor AudioCallback)
Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo)
func BeginBlendMode ¶
Begin blending mode (alpha, additive, multiplied, subtract, custom)
func BeginScissorMode ¶
Begin scissor mode (define screen area for following drawing)
func ChangeDirectory ¶
Change working directory, return true on success
func CheckCollisionBoxes ¶
func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
Check collision between two bounding boxes
func CheckCollisionRecs ¶
Basic shapes collision detection functions
func CodepointToUTF8 ¶
Encode one codepoint into UTF-8 byte array (array length returned as parameter)
func ColorToInt ¶ added in v0.3.0
Get hexadecimal value for a Color (0xRRGGBBAA)
func CompressData ¶
Compression/Encoding functionality
func ComputeMD5 ¶
Compute MD5 hash code, returns static int[4] (16 bytes)
func ComputeSHA1 ¶
Compute SHA1 hash code, returns static int[5] (20 bytes)
func ComputeSHA256 ¶
Compute SHA256 hash code, returns static int[8] (32 bytes)
func DecodeDataBase64 ¶
Decode Base64 string (expected NULL terminated), memory must be MemFree()
func DecompressData ¶
Decompress data (DEFLATE algorithm), memory must be MemFree()
func DetachAudioMixedProcessor ¶
func DetachAudioMixedProcessor(processor AudioCallback)
Detach audio stream processor from the entire audio pipeline
func DisableEventWaiting ¶
func DisableEventWaiting()
Disable waiting for events on EndDrawing(), automatic events polling
func DrawCircle ¶
Draw a color-filled circle
func DrawCircleLines ¶
Draw circle outline
func DrawEllipse ¶
Draw ellipse
func DrawEllipseLines ¶
Draw ellipse outline
func DrawRectangle ¶
Draw a color-filled rectangle
func DrawRectangleGradientH ¶
func DrawRectangleGradientH(posX c.Int, posY c.Int, width c.Int, height c.Int, left Color, right Color)
Draw a horizontal-gradient-filled rectangle
func DrawRectangleGradientV ¶
func DrawRectangleGradientV(posX c.Int, posY c.Int, width c.Int, height c.Int, top Color, bottom Color)
Draw a vertical-gradient-filled rectangle
func DrawRectangleLines ¶
Draw rectangle outline
func EnableEventWaiting ¶
func EnableEventWaiting()
Enable waiting for events on EndDrawing(), no automatic event polling
func EncodeDataBase64 ¶
Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
func ExportDataAsCode ¶
Export data to code (.h), returns true on success
func FileRename ¶
Rename file (if exists)
func FileTextFindIndex ¶
Find text in existing file
func FileTextReplace ¶
Replace text in an existing file
func GetApplicationDirectory ¶
Get the directory of the running application (uses static string)
func GetCharPressed ¶
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
func GetCodepoint ¶
Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
func GetCodepointCount ¶
Get total number of codepoints in a UTF-8 encoded string
func GetCodepointNext ¶
Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
func GetCodepointPrevious ¶
Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
func GetDirectoryFileCount ¶
Get the file count in a directory
func GetDirectoryFileCountEx ¶
Get the file count in a directory with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
func GetDirectoryPath ¶
Get full path for a given fileName with path (uses static string)
func GetFileExtension ¶
Get pointer to extension for a filename string (includes dot: '.png')
func GetFileLength ¶
Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
func GetFileModTime ¶
Get file modification time (last write time)
func GetFileName ¶
Get pointer to filename for a path string
func GetFileNameWithoutExt ¶
Get filename string without extension (uses static string)
func GetFrameTime ¶
Get time in seconds for last frame drawn (delta time)
func GetGamepadAxisCount ¶
Get axis count for a gamepad
func GetGamepadAxisMovement ¶
Get movement value for a gamepad axis
func GetGamepadButtonPressed ¶
Get the last gamepad button pressed
func GetGestureHoldDuration ¶
Get gesture hold time in seconds
func GetKeyName ¶
Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)
func GetKeyPressed ¶
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
func GetMonitorHeight ¶
Get specified monitor height (current video mode used by monitor)
func GetMonitorName ¶
Get the human-readable, UTF-8 encoded name of the specified monitor
func GetMonitorPhysicalHeight ¶
Get specified monitor physical height in millimetres
func GetMonitorPhysicalWidth ¶
Get specified monitor physical width in millimetres
func GetMonitorRefreshRate ¶
Get specified monitor refresh rate
func GetMonitorWidth ¶
Get specified monitor width (current video mode used by monitor)
func GetMouseWheelMove ¶
Get mouse wheel movement for X or Y, whichever is larger
func GetPixelDataSize ¶
Get pixel data size in bytes for certain format
func GetPrevDirectoryPath ¶
Get previous directory path for a given path (uses static string)
func GetRandomValue ¶
Get a random value between min and max (both included)
func GetTextBetween ¶
Get text between two strings
func GetTouchPointId ¶
Get touch point identifier for given index
func GetWorkingDirectory ¶
Get current working directory (uses static string)
func InitWindow ¶
Window-related functions
func IsAudioDeviceReady ¶
func IsAudioDeviceReady() bool
Check if audio device has been initialized successfully
func IsFileExtension ¶
Check file extension (recommended include point: .png, .wav)
func IsFileNameValid ¶
Check if fileName is valid for the platform/OS
func IsGamepadAvailable ¶
Input-related functions: gamepads
func IsGamepadButtonDown ¶
Check if a gamepad button is being pressed
func IsGamepadButtonPressed ¶
Check if a gamepad button has been pressed once
func IsGamepadButtonReleased ¶
Check if a gamepad button has been released once
func IsGamepadButtonUp ¶
Check if a gamepad button is NOT being pressed
func IsGestureDetected ¶
Check if a gesture have been detected
func IsKeyPressedRepeat ¶
Check if a key has been pressed again
func IsMouseButtonDown ¶
Check if a mouse button is being pressed
func IsMouseButtonPressed ¶
Input-related functions: mouse
func IsMouseButtonReleased ¶
Check if a mouse button has been released once
func IsMouseButtonUp ¶
Check if a mouse button is NOT being pressed
func IsWindowState ¶
Check if one specific window flag is enabled
func LoadCodepoints ¶
Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
func LoadFileData ¶
File system management functions
func LoadFileText ¶
Load text data from file (read), returns a '\0' terminated string
func LoadRandomSequence ¶
Load random values sequence, no values repeated
func LoadTextLines ¶
Text strings management functions (no UTF-8 strings, only byte chars) WARNING 1: Most of these functions use internal static buffers[], it's recommended to store returned data on user-side for re-use WARNING 2: Some functions allocate memory internally for the returned strings, those strings must be freed by user using MemFree()
func MakeDirectory ¶
Create directories (including full path requested), returns 0 on success
func MeasureText ¶
Measure string width for default font
func MemRealloc ¶
Internal memory reallocator
func SaveFileData ¶
Save data to file from byte array (write), returns true on success
func SaveFileText ¶
Save text data to file (write), string must be '\0' terminated, returns true on success
func SetAudioStreamBufferSizeDefault ¶
Default size for new audio streams
func SetAutomationEventBaseFrame ¶
Set automation event internal base frame to start recording
func SetGamepadMappings ¶
Set internal gamepad mappings (SDL_GameControllerDB)
func SetGamepadVibration ¶
Set gamepad vibration for both motors (duration in seconds)
func SetGesturesEnabled ¶
------------------------------------------------------------------------------------ Gestures and Touch Handling Functions (Module: rgestures) ------------------------------------------------------------------------------------
func SetLoadFileDataCallback ¶
func SetLoadFileDataCallback(callback LoadFileDataCallback)
File access custom callbacks WARNING: Callbacks setup is intended for advanced users
func SetLoadFileTextCallback ¶
func SetLoadFileTextCallback(callback LoadFileTextCallback)
Set custom file text data loader
func SetPixelColor ¶
Set color formatted into destination pixel pointer
func SetSaveFileDataCallback ¶
func SetSaveFileDataCallback(callback SaveFileDataCallback)
Set custom file binary data saver
func SetSaveFileTextCallback ¶
func SetSaveFileTextCallback(callback SaveFileTextCallback)
Set custom file text data saver
func SetWindowMaxSize ¶
Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
func SetWindowMinSize ¶
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
func StartAutomationEventRecording ¶
func StartAutomationEventRecording()
Start recording automation events (AutomationEventList must be set)
func StopAutomationEventRecording ¶
func StopAutomationEventRecording()
Stop recording automation events
func SwapScreenBuffer ¶
func SwapScreenBuffer()
Custom frame control functions NOTE: Those functions are intended for advanced users that want full control over the frame processing By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
func TextAppend ¶
Append text at specific position and move cursor
func TextFindIndex ¶
Find first text occurrence within a string, -1 if not found
func TextFormat ¶
Text formatting with variables (sprintf() style)
func TextInsert ¶
Insert text in a defined byte position
func TextInsertAlloc ¶
Insert text in a defined byte position, memory must be MemFree()
func TextIsEqual ¶
Check if two text string are equal
func TextRemoveSpaces ¶
Remove text spaces, concat words
func TextReplace ¶
Replace text string with new string
func TextReplaceAlloc ¶
Replace text string with new string, memory must be MemFree()
func TextReplaceBetween ¶
Replace text between two specific strings
func TextReplaceBetweenAlloc ¶
Replace text between two specific strings, memory must be MemFree()
func TextSubtext ¶
Get a piece of a text string
func TextToCamel ¶
Get Camel case notation version of provided string
func TextToPascal ¶
Get Pascal case notation version of provided string
func TextToSnake ¶
Get Snake case notation version of provided string
func ToggleBorderlessWindowed ¶
func ToggleBorderlessWindowed()
Toggle window state: borderless windowed, resizes window to match monitor resolution
func ToggleFullscreen ¶
func ToggleFullscreen()
Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
func UnloadFileText ¶
Unload file text data allocated by LoadFileText()
func UnloadImageColors ¶ added in v0.3.0
func UnloadImageColors(colors *Color)
Unload color data loaded with LoadImageColors()
func UnloadImagePalette ¶ added in v0.3.0
func UnloadImagePalette(colors *Color)
Unload colors palette loaded with LoadImagePalette()
func UnloadRandomSequence ¶
Unload random values sequence
func UnloadWaveSamples ¶
Unload samples data loaded with LoadWaveSamples()
func WindowShouldClose ¶
func WindowShouldClose() bool
Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
Types ¶
type AudioCallback ¶
------------------------------------------------------------------------------------ Audio Loading and Playing Functions (Module: audio) ------------------------------------------------------------------------------------
type AudioStream ¶
type AudioStream struct {
Buffer *RAudioBuffer
Processor *RAudioProcessor
SampleRate c.Uint
SampleSize c.Uint
Channels c.Uint
}
AudioStream, custom audio stream
func LoadAudioStream ¶
AudioStream management functions
func (AudioStream) AttachAudioStreamProcessor ¶
func (self AudioStream) AttachAudioStreamProcessor(processor AudioCallback)
Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo)
func (AudioStream) DetachAudioStreamProcessor ¶
func (self AudioStream) DetachAudioStreamProcessor(processor AudioCallback)
Detach audio stream processor from stream
func (AudioStream) IsAudioStreamPlaying ¶
func (self AudioStream) IsAudioStreamPlaying() bool
Check if audio stream is playing
func (AudioStream) IsAudioStreamProcessed ¶
func (self AudioStream) IsAudioStreamProcessed() bool
Check if any audio stream buffers requires refill
func (AudioStream) IsAudioStreamValid ¶
func (self AudioStream) IsAudioStreamValid() bool
Checks if an audio stream is valid (buffers initialized)
func (AudioStream) SetAudioStreamCallback ¶
func (self AudioStream) SetAudioStreamCallback(callback AudioCallback)
Audio thread callback to request new data
func (AudioStream) SetAudioStreamPan ¶
func (self AudioStream) SetAudioStreamPan(pan c.Float)
Set pan for audio stream (-1.0 to 1.0 range, 0.0 is centered)
func (AudioStream) SetAudioStreamPitch ¶
func (self AudioStream) SetAudioStreamPitch(pitch c.Float)
Set pitch for audio stream (1.0 is base level)
func (AudioStream) SetAudioStreamVolume ¶
func (self AudioStream) SetAudioStreamVolume(volume c.Float)
Set volume for audio stream (1.0 is max level)
type AutomationEvent ¶
Automation event
type AutomationEventList ¶
type AutomationEventList struct {
Capacity c.Uint
Count c.Uint
Events *AutomationEvent
}
Automation event list
func LoadAutomationEventList ¶
func LoadAutomationEventList(fileName *c.Char) AutomationEventList
Automation events functionality
func (AutomationEventList) Export ¶
func (self AutomationEventList) Export(fileName *c.Char) bool
Export automation events list as text file
func (*AutomationEventList) Set ¶
func (self *AutomationEventList) Set()
Set automation event list to record to
func (AutomationEventList) Unload ¶
func (self AutomationEventList) Unload()
Unload automation events list from file
type BoundingBox ¶
BoundingBox
func (BoundingBox) CheckCollisionBoxSphere ¶
func (self BoundingBox) CheckCollisionBoxSphere(center Vector3, radius c.Float) bool
Check collision between box and sphere
type Camera ¶
type Camera = Camera3D
Camera type fallback, defaults to Camera3D
func (Camera) DrawBillboard ¶
Draw a billboard texture
func (Camera) DrawBillboardPro ¶
func (self Camera) DrawBillboardPro(texture Texture2D, source Rectangle, position Vector3, up Vector3, size Vector2, origin Vector2, rotation c.Float, tint Color)
Draw a billboard texture defined by source and rotation
func (Camera) DrawBillboardRec ¶
func (self Camera) DrawBillboardRec(texture Texture2D, source Rectangle, position Vector3, size Vector2, tint Color)
Draw a billboard texture defined by source
func (*Camera) GetCameraUp ¶
func (*Camera) MoveForward ¶
Camera movement
func (*Camera) MoveToTarget ¶
func (*Camera) Update ¶
------------------------------------------------------------------------------------ Camera System Functions (Module: rcamera) ------------------------------------------------------------------------------------
func (*Camera) UpdateCameraPro ¶
Update camera movement/rotation
func (*Camera) ViewMatrix ¶
type Camera2D ¶
Camera2D, defines position/orientation in 2d space
func (Camera2D) BeginMode2D ¶
func (self Camera2D) BeginMode2D()
Begin 2D mode with custom camera (2D)
func (Camera2D) CameraMatrix2D ¶
Get camera 2d transform matrix
type Camera3D ¶
Camera, defines position/orientation in 3d space
func (Camera3D) BeginMode3D ¶
func (self Camera3D) BeginMode3D()
Begin 3D mode with custom camera (3D)
type Color ¶
type Color uint32
Color, 4 components, R8G8B8A8 (32bit) R, G, B, A uint8
func ColorAlpha ¶ added in v0.3.0
Get color with alpha applied, alpha goes from 0.0f to 1.0f
func ColorAlphaBlend ¶ added in v0.3.0
Get src alpha-blended into dst color with tint
func ColorBrightness ¶ added in v0.3.0
Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
func ColorContrast ¶ added in v0.3.0
Get color with contrast correction, contrast values between -1.0f and 1.0f
func ColorFromHSV ¶
Get a Color from HSV values, hue [0..360], saturation/value [0..1]
func ColorLerp ¶ added in v0.3.0
Get color lerp interpolation between two colors, factor [0.0f..1.0f]
type ConfigFlags ¶
---------------------------------------------------------------------------------- Enumerators Definition ---------------------------------------------------------------------------------- System/Window config flags NOTE: Every bit registers one state (use it with bit masks) By default all flags are set to 0
type FilePathList ¶
File path list
func LoadDirectoryFiles ¶
func LoadDirectoryFiles(dirPath *c.Char) FilePathList
Load directory filepaths, files and directories, no subdirs scan
func LoadDirectoryFilesEx ¶
Load directory filepaths with extension filtering and subdir scan; some filters available: "*.*", "FILES*", "DIRS*"
func (FilePathList) UnloadDirectoryFiles ¶
func (self FilePathList) UnloadDirectoryFiles()
Unload filepaths
func (FilePathList) UnloadDroppedFiles ¶
func (self FilePathList) UnloadDroppedFiles()
Unload dropped filepaths
type Font ¶
type Font struct {
BaseSize c.Int
GlyphCount c.Int
GlyphPadding c.Int
Texture Texture2D
Recs *Rectangle
Glyphs *GlyphInfo
}
Font, font texture and GlyphInfo array data
func LoadFontEx ¶
Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
func LoadFontFromMemory ¶
func LoadFontFromMemory(fileType *c.Char, fileData *uint8, dataSize c.Int, fontSize c.Int, codepoints *c.Int, codepointCount c.Int) Font
Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
func (Font) DrawTextCodepoint ¶
Draw one character (codepoint)
func (Font) DrawTextCodepoints ¶
func (self Font) DrawTextCodepoints(codepoints *c.Int, codepointCount c.Int, position Vector2, fontSize c.Float, spacing c.Float, tint Color)
Draw multiple character (codepoint)
func (Font) DrawTextEx ¶
func (self Font) DrawTextEx(text *c.Char, position Vector2, fontSize c.Float, spacing c.Float, tint Color)
Draw text using font and additional parameters
func (Font) DrawTextPro ¶
func (self Font) DrawTextPro(text *c.Char, position Vector2, origin Vector2, rotation c.Float, fontSize c.Float, spacing c.Float, tint Color)
Draw text using Font and pro parameters (rotation)
func (Font) ExportFontAsCode ¶
Export font as code file, returns true on success
func (Font) GlyphAtlasRec ¶
Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
func (Font) GlyphIndex ¶
Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
func (Font) GlyphInfo ¶
Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
func (Font) ImageTextEx ¶
Create an image from text (custom sprite font)
func (Font) IsFontValid ¶
Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
func (Font) MeasureTextCodepoints ¶
func (self Font) MeasureTextCodepoints(codepoints *c.Int, length c.Int, fontSize c.Float, spacing c.Float) Vector2
Measure string size for an existing array of codepoints for Font
func (Font) MeasureTextEx ¶
Measure string size for Font
type GlyphInfo ¶
GlyphInfo, font characters glyphs info
func LoadFontData ¶
func LoadFontData(fileData *uint8, dataSize c.Int, fontSize c.Int, codepoints *c.Int, codepointCount c.Int, type_ c.Int, glyphCount *c.Int) *GlyphInfo
Load font data for further use
func (*GlyphInfo) GenImageFontAtlas ¶
func (self *GlyphInfo) GenImageFontAtlas(glyphRecs **Rectangle, glyphCount c.Int, fontSize c.Int, padding c.Int, packMethod c.Int) Image
Generate image font atlas using chars info
func (*GlyphInfo) UnloadFontData ¶
Unload font chars info data (RAM)
type Image ¶
Image, pixel data stored in CPU memory (RAM)
func GenImageCellular ¶
Generate image: cellular algorithm, bigger tileSize means bigger cells
func GenImageChecked ¶
func GenImageChecked(width c.Int, height c.Int, checksX c.Int, checksY c.Int, col1 Color, col2 Color) Image
Generate image: checked
func GenImageColor ¶
Image generation functions
func GenImageGradientLinear ¶
func GenImageGradientLinear(width c.Int, height c.Int, direction c.Int, start Color, end Color) Image
Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
func GenImageGradientRadial ¶
func GenImageGradientRadial(width c.Int, height c.Int, density c.Float, inner Color, outer Color) Image
Generate image: radial gradient
func GenImageGradientSquare ¶
func GenImageGradientSquare(width c.Int, height c.Int, density c.Float, inner Color, outer Color) Image
Generate image: square gradient
func GenImagePerlinNoise ¶
func GenImagePerlinNoise(width c.Int, height c.Int, offsetX c.Int, offsetY c.Int, scale c.Float) Image
Generate image: perlin noise
func GenImageText ¶
Generate image: grayscale image from text data
func GenImageWhiteNoise ¶
Generate image: white noise
func LoadImageAnim ¶
Load image sequence from file (frames appended to image.data)
func LoadImageAnimFromMemory ¶
func LoadImageAnimFromMemory(fileType *c.Char, fileData *uint8, dataSize c.Int, frames *c.Int) Image
Load image sequence from memory buffer
func LoadImageFromMemory ¶
Load image from memory buffer, fileType refers to extension: i.e. '.png'
func LoadImageFromScreen ¶
func LoadImageFromScreen() Image
Load image from screen buffer and (screenshot)
func LoadImageRaw ¶
func LoadImageRaw(fileName *c.Char, width c.Int, height c.Int, format c.Int, headerSize c.Int) Image
Load image from RAW file data
func (Image) AlphaBorder ¶
Get image alpha border rectangle
func (*Image) AlphaClear ¶
Clear alpha channel to desired color
func (*Image) BlurGaussian ¶
Apply Gaussian blur using a box blur approximation
func (*Image) ClearBackground ¶
Image drawing functions NOTE: Image software-rendering functions (CPU)
func (*Image) ColorBrightness ¶
Modify image color: brightness (-255 to 255)
func (*Image) ColorContrast ¶
Modify image color: contrast (-100 to 100)
func (*Image) ColorReplace ¶
Modify image color: replace color
func (*Image) DrawCircle ¶
Draw a filled circle within an image
func (*Image) DrawCircleLines ¶
Draw circle outline within an image
func (*Image) DrawCircleLinesV ¶
Draw circle outline within an image (Vector version)
func (*Image) DrawCircleV ¶
Draw a filled circle within an image (Vector version)
func (*Image) DrawLine ¶
func (self *Image) DrawLine(startPosX c.Int, startPosY c.Int, endPosX c.Int, endPosY c.Int, color Color)
Draw line within an image
func (*Image) DrawLineEx ¶
Draw a line defining thickness within an image
func (*Image) DrawPixelV ¶
Draw pixel within an image (Vector version)
func (*Image) DrawRectangle ¶
Draw rectangle within an image
func (*Image) DrawRectangleLines ¶
Draw rectangle lines within an image
func (*Image) DrawRectangleRec ¶
Draw rectangle within an image
func (*Image) DrawRectangleV ¶
Draw rectangle within an image (Vector version)
func (*Image) DrawTextEx ¶
func (self *Image) DrawTextEx(font Font, text *c.Char, position Vector2, fontSize c.Float, spacing c.Float, tint Color)
Draw text (custom sprite font) within an image (destination)
func (*Image) DrawTriangle ¶
Draw triangle within an image
func (*Image) DrawTriangleEx ¶
Draw triangle with interpolated colors within an image
func (*Image) DrawTriangleFan ¶
Draw a triangle fan defined by points within an image (first vertex is the center)
func (*Image) DrawTriangleLines ¶
Draw triangle outline within an image
func (*Image) DrawTriangleStrip ¶
Draw a triangle strip defined by points within an image
func (Image) ExportImageAsCode ¶
Export image as code file defining an array of bytes, returns true on success
func (Image) ExportImageToMemory ¶
Export image to memory buffer, memory must be MemFree()
func (Image) FromChannel ¶
Create an image from a selected channel of another image (GRAYSCALE)
func (Image) GenMeshCubicmap ¶
Generate cubes-based map mesh from image data
func (Image) GenMeshHeightmap ¶
Generate heightmap mesh from image data
func (*Image) ImageFormat ¶
Convert image data to desired format
func (*Image) ImageMipmaps ¶
func (self *Image) ImageMipmaps()
Compute all mipmap levels for a provided image
func (Image) IsImageValid ¶
Check if an image is valid (data and parameters)
func (*Image) KernelConvolution ¶
Apply custom square convolution kernel to image
func (Image) LoadFontFrom ¶
Load font from Image (XNA style)
func (Image) LoadImageColors ¶
Load color data from image as a Color array (RGBA - 32bit)
func (Image) LoadImagePalette ¶
Load colors palette from image as a Color array (RGBA - 32bit)
func (Image) LoadTextureCubemap ¶
func (self Image) LoadTextureCubemap(layout c.Int) TextureCubemap
Load cubemap from image, multiple image cubemap layouts supported
func (Image) LoadTextureFrom ¶
Load texture from image data
func (*Image) ResizeCanvas ¶
func (self *Image) ResizeCanvas(newWidth c.Int, newHeight c.Int, offsetX c.Int, offsetY c.Int, fill Color)
Resize canvas and fill with color
func (Image) SetWindowIcon ¶
func (self Image) SetWindowIcon()
Set icon for window (single image, RGBA 32bit)
func (*Image) SetWindowIcons ¶
Set icon for window (multiple images, RGBA 32bit)
type KeyboardKey ¶
Keyboard keys (US keyboard layout) NOTE: Use GetKeyPressed() to allow redefining required keys for alternative layouts
type LoadFileDataCallback ¶
FileIO: Load binary data
type LoadFileTextCallback ¶
FileIO: Load text data
type Material ¶
type Material struct {
Shader Shader
Maps *MaterialMap
Params [4]c.Float
}
Material, includes shader and maps
func LoadMaterialDefault ¶
func LoadMaterialDefault() Material
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
func LoadMaterials ¶
Material loading/unloading functions
func (Material) IsMaterialValid ¶
Check if a material is valid (shader assigned, map textures loaded in GPU)
func (*Material) SetMaterialTexture ¶
Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
type MaterialMap ¶
MaterialMap
type Matrix ¶
type Matrix struct {
M0 c.Float
M4 c.Float
M8 c.Float
M12 c.Float
M1 c.Float
M5 c.Float
M9 c.Float
M13 c.Float
M2 c.Float
M6 c.Float
M10 c.Float
M14 c.Float
M3 c.Float
M7 c.Float
M11 c.Float
M15 c.Float
}
Matrix, 4x4 components, column major, OpenGL style, right-handed
type Mesh ¶
type Mesh struct {
VertexCount c.Int
TriangleCount c.Int
Vertices *c.Float
Texcoords *c.Float
Texcoords2 *c.Float
Normals *c.Float
Tangents *c.Float
Colors *uint8
Indices *uint16
BoneCount c.Int
BoneIndices *uint8
BoneWeights *c.Float
AnimVertices *c.Float
AnimNormals *c.Float
VaoId c.Uint
VboId *c.Uint
}
Mesh, vertex data and vao/vbo
func GenMeshCone ¶
Generate cone/pyramid mesh
func GenMeshCube ¶
Generate cuboid mesh
func GenMeshCylinder ¶
Generate cylinder mesh
func GenMeshHemiSphere ¶
Generate half-sphere mesh (no bottom cap)
func GenMeshKnot ¶
Generate trefoil knot mesh
func GenMeshPlane ¶
Generate plane mesh (with subdivisions)
func GenMeshSphere ¶
Generate sphere mesh (standard sphere)
func GenMeshTorus ¶
Generate torus mesh
func (Mesh) BoundingBox ¶
func (self Mesh) BoundingBox() BoundingBox
Compute mesh bounding box limits
func (Mesh) DrawMeshInstanced ¶
Draw multiple mesh instances with material and different transforms
func (Mesh) ExportMeshAsCode ¶
Export mesh as code file (.h) defining multiple arrays of vertex attributes
func (Mesh) LoadModelFrom ¶
Load model from generated mesh (default material)
func (Mesh) UpdateMeshBuffer ¶
Update mesh vertex data in GPU for a specific buffer index
type Model ¶
type Model struct {
Transform Matrix
MeshCount c.Int
MaterialCount c.Int
Meshes *Mesh
Materials *Material
MeshMaterial *c.Int
Skeleton ModelSkeleton
CurrentPose ModelAnimPose
BoneMatrices *Matrix
}
Model, meshes, materials and animation data
func (Model) BoundingBox ¶
func (self Model) BoundingBox() BoundingBox
Compute model bounding box limits (considers all meshes)
func (Model) DrawModelEx ¶
func (self Model) DrawModelEx(position Vector3, rotationAxis Vector3, rotationAngle c.Float, scale Vector3, tint Color)
Draw a model with extended parameters
func (Model) DrawModelWires ¶
Draw a model wires (with texture if set)
func (Model) DrawModelWiresEx ¶
func (self Model) DrawModelWiresEx(position Vector3, rotationAxis Vector3, rotationAngle c.Float, scale Vector3, tint Color)
Draw a model wires (with texture if set) with extended parameters
func (Model) IsModelAnimationValid ¶
func (self Model) IsModelAnimationValid(anim ModelAnimation) bool
Check model animation skeleton match
func (Model) IsModelValid ¶
Check if a model is valid (loaded in GPU, VAO/VBOs)
func (*Model) SetModelMeshMaterial ¶
Set material for a mesh
func (Model) Unload ¶
func (self Model) Unload()
Unload model (including meshes) from memory (RAM and/or VRAM)
func (Model) UpdateModelAnimation ¶
func (self Model) UpdateModelAnimation(anim ModelAnimation, frame c.Float)
Update model animation pose (vertex buffers and bone matrices)
func (Model) UpdateModelAnimationEx ¶
func (self Model) UpdateModelAnimationEx(animA ModelAnimation, frameA c.Float, animB ModelAnimation, frameB c.Float, blend c.Float)
Update model animation pose, blending two animations
type ModelAnimation ¶
type ModelAnimation struct {
Name [32]c.Char
BoneCount c.Int
KeyframeCount c.Int
KeyframePoses *ModelAnimPose
}
ModelAnimation, contains a full animation sequence
func LoadModelAnimations ¶
func LoadModelAnimations(fileName *c.Char, animCount *c.Int) *ModelAnimation
Model animations loading/unloading functions
func (*ModelAnimation) UnloadModelAnimations ¶
func (self *ModelAnimation) UnloadModelAnimations(animCount c.Int)
Unload animation array data
type ModelSkeleton ¶
type ModelSkeleton struct {
BoneCount c.Int
Bones *BoneInfo
BindPose ModelAnimPose
}
Skeleton, animation bones hierarchy
type Music ¶
type Music struct {
Stream AudioStream
FrameCount c.Uint
Looping bool
CtxType c.Int
CtxData unsafe.Pointer
}
Music, audio stream, anything longer than ~10 seconds should be streamed
func LoadMusicStreamFromMemory ¶
Load music stream from data
func (Music) IsMusicStreamPlaying ¶
Check if music is playing
func (Music) IsMusicValid ¶
Checks if a music stream is valid (context and buffers initialized)
func (Music) SeekMusicStream ¶
Seek music to a position (in seconds)
func (Music) SetMusicPan ¶
Set pan for a music (-1.0 left, 0.0 center, 1.0 right)
func (Music) SetMusicPitch ¶
Set pitch for a music (1.0 is base level)
func (Music) SetMusicVolume ¶
Set volume for music (1.0 is max level)
func (Music) TimePlayed ¶
Get current music time played (in seconds)
func (Music) UpdateMusicStream ¶
func (self Music) UpdateMusicStream()
Updates buffers for music streaming
type NPatchInfo ¶
type NPatchInfo struct {
Source Rectangle
Left c.Int
Top c.Int
Right c.Int
Bottom c.Int
Layout c.Int
}
NPatchInfo, n-patch layout info
type PixelFormat ¶
Pixel formats NOTE: Support depends on OpenGL version and platform
type RAudioBuffer ¶
type RAudioBuffer struct {
}
type RAudioProcessor ¶
type RAudioProcessor struct {
}
type Ray ¶
Ray, ray for raycasting
func (Ray) CollisionBox ¶
func (self Ray) CollisionBox(box BoundingBox) RayCollision
Get collision info between ray and box
func (Ray) CollisionMesh ¶
func (self Ray) CollisionMesh(mesh Mesh, transform Matrix) RayCollision
Get collision info between ray and mesh
func (Ray) CollisionQuad ¶
Get collision info between ray and quad
func (Ray) CollisionSphere ¶
func (self Ray) CollisionSphere(center Vector3, radius c.Float) RayCollision
Get collision info between ray and sphere
func (Ray) CollisionTriangle ¶
func (self Ray) CollisionTriangle(p1 Vector3, p2 Vector3, p3 Vector3) RayCollision
Get collision info between ray and triangle
type RayCollision ¶
RayCollision, ray hit information
type Rectangle ¶
Rectangle, 4 components
func GetCollisionRec ¶
Get collision rectangle for two rectangles collision
func GetShapesTextureRectangle ¶
func GetShapesTextureRectangle() Rectangle
Get texture source rectangle that is used for shapes drawing
func (Rectangle) DrawRectangleGradientEx ¶
func (self Rectangle) DrawRectangleGradientEx(topLeft Color, bottomLeft Color, bottomRight Color, topRight Color)
Draw a gradient-filled rectangle with custom vertex colors
func (Rectangle) DrawRectangleLinesEx ¶
Draw rectangle outline with extended parameters
func (Rectangle) DrawRectanglePro ¶
Draw a color-filled rectangle with pro parameters
func (Rectangle) DrawRectangleRec ¶
Draw a color-filled rectangle
func (Rectangle) DrawRectangleRounded ¶
Draw rectangle with rounded edges
func (Rectangle) DrawRectangleRoundedLines ¶
Draw rectangle lines with rounded edges
type RenderTexture ¶
RenderTexture, fbo for texture rendering
type RenderTexture2D ¶
type RenderTexture2D = RenderTexture
RenderTexture2D, same as RenderTexture
func LoadRenderTexture ¶
func LoadRenderTexture(width c.Int, height c.Int) RenderTexture2D
Load texture for rendering (framebuffer)
func (RenderTexture2D) BeginTextureMode ¶
func (self RenderTexture2D) BeginTextureMode()
Begin drawing to render texture
func (RenderTexture2D) IsRenderTextureValid ¶
func (self RenderTexture2D) IsRenderTextureValid() bool
Check if a render texture is valid (loaded in GPU)
func (RenderTexture2D) UnloadRenderTexture ¶
func (self RenderTexture2D) UnloadRenderTexture()
Unload render texture from GPU memory (VRAM)
type SaveFileDataCallback ¶
type SaveFileDataCallback = func(_llcppg_param1 *c.Char, _llcppg_param2 unsafe.Pointer, _llcppg_param3 c.Int) bool
FileIO: Save binary data
type SaveFileTextCallback ¶
FileIO: Save text data
type Shader ¶
Shader
func LoadShader ¶
Shader management functions NOTE: Shader functionality is not available on OpenGL 1.1
func LoadShaderFromMemory ¶
Load shader from code strings and bind default locations
func (Shader) IsShaderValid ¶
Check if a shader is valid (loaded on GPU)
func (Shader) LocationAttrib ¶
Get shader attribute location
func (Shader) SetShaderValue ¶
Set shader uniform value
func (Shader) SetShaderValueMatrix ¶
Set shader uniform value (matrix 4x4)
func (Shader) SetShaderValueTexture ¶
Set shader uniform value and bind the texture (sampler2d)
type ShaderLocationIndex ¶
Shader location index NOTE: Some locations are tried to be set automatically on shader loading, but only if default attributes/uniforms names are found, check config.h for names
type Sound ¶
type Sound struct {
Stream AudioStream
FrameCount c.Uint
}
Sound
func (Sound) IsSoundPlaying ¶
Check if a sound is currently playing
func (Sound) IsSoundValid ¶
Checks if a sound is valid (data loaded and buffers initialized)
func (Sound) LoadSoundAlias ¶
Create a new sound that shares the same sample data as the source sound, does not own the sound data
func (Sound) SetSoundPan ¶
Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)
func (Sound) SetSoundPitch ¶
Set pitch for a sound (1.0 is base level)
func (Sound) SetSoundVolume ¶
Set volume for a sound (1.0 is max level)
func (Sound) UnloadSoundAlias ¶
func (self Sound) UnloadSoundAlias()
Unload a sound alias (does not deallocate sample data)
type Texture2D ¶
type Texture2D = Texture
Texture2D, same as Texture
func GetShapesTexture ¶
func GetShapesTexture() Texture2D
Get texture that is used for shapes drawing
func LoadTexture ¶
Texture loading functions NOTE: These functions require GPU access
func (Texture2D) DrawTexture ¶
Texture drawing functions
func (Texture2D) DrawTextureEx ¶
Draw a Texture2D with extended parameters
func (Texture2D) DrawTextureNPatch ¶
func (self Texture2D) DrawTextureNPatch(nPatchInfo NPatchInfo, dest Rectangle, origin Vector2, rotation c.Float, tint Color)
Draws a texture (or part of it) that stretches or shrinks nicely
func (Texture2D) DrawTexturePro ¶
func (self Texture2D) DrawTexturePro(source Rectangle, dest Rectangle, origin Vector2, rotation c.Float, tint Color)
Draw a part of a texture defined by a rectangle with 'pro' parameters
func (Texture2D) DrawTextureRec ¶
Draw a part of a texture defined by a rectangle
func (Texture2D) DrawTextureV ¶
Draw a Texture2D with position defined as Vector2
func (*Texture2D) GenTextureMipmaps ¶
func (self *Texture2D) GenTextureMipmaps()
Texture configuration functions
func (Texture2D) IsTextureValid ¶
Check if a texture is valid (loaded in GPU)
func (Texture2D) LoadImageFromTexture ¶
Load image from GPU texture data
func (Texture2D) SetShapesTexture ¶
------------------------------------------------------------------------------------ Basic Shapes Drawing Functions (Module: shapes) ------------------------------------------------------------------------------------ Set texture and rectangle to be used on shapes drawing NOTE: It can be useful when using basic shapes and one single font, defining a font char white rectangle would allow drawing everything in a single draw call
func (Texture2D) SetTextureFilter ¶
Set texture scaling filter mode
func (Texture2D) SetTextureWrap ¶
Set texture wrapping mode
func (Texture2D) UnloadTexture ¶
func (self Texture2D) UnloadTexture()
Unload texture from GPU memory (VRAM)
func (Texture2D) UpdateTexture ¶
Update GPU texture with new data (pixels should be able to fill texture)
type TextureFilter ¶
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 TraceLogCallback ¶
Callbacks to hook some internal functions WARNING: These callbacks are intended for advanced users
type Transform ¶
type Transform struct {
Translation Vector3
Rotation Quaternion
Scale Vector3
}
Transform, vertex transformation data
type Vector2 ¶
Vector2, 2 components
func GetMonitorPosition ¶
Get specified monitor position
func GetMouseWheelMoveV ¶
func GetMouseWheelMoveV() Vector2
Get mouse wheel movement for both X and Y
func GetTouchPosition ¶
Get touch position XY for a touch point index (relative to screen size)
func (Vector2) CheckCollisionCircleLine ¶
Check if circle collides with a line created betweeen two points [p1] and [p2]
func (Vector2) CheckCollisionCircleRec ¶
Check collision between circle and rectangle
func (Vector2) CheckCollisionCircles ¶
Check collision between two circles
func (Vector2) CheckCollisionLines ¶
func (self Vector2) CheckCollisionLines(endPos1 Vector2, startPos2 Vector2, endPos2 Vector2, collisionPoint *Vector2) bool
Check the collision between two lines defined by two points each, returns collision point by reference
func (Vector2) CheckCollisionPointCircle ¶
Check if point is inside circle
func (Vector2) CheckCollisionPointLine ¶
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
func (Vector2) CheckCollisionPointPoly ¶
Check if point is within a polygon described by array of vertices
func (Vector2) CheckCollisionPointRec ¶
Check if point is inside rectangle
func (Vector2) CheckCollisionPointTriangle ¶
Check if point is inside a triangle
func (Vector2) DrawCircleGradient ¶
Draw a gradient-filled circle
func (Vector2) DrawCircleLinesV ¶
Draw circle outline (Vector version)
func (Vector2) DrawCircleSector ¶
func (self Vector2) DrawCircleSector(radius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, color Color)
Draw a piece of a circle
func (Vector2) DrawCircleSectorLines ¶
func (self Vector2) DrawCircleSectorLines(radius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, color Color)
Draw circle sector outline
func (Vector2) DrawCircleV ¶
Draw a color-filled circle (Vector version)
func (Vector2) DrawEllipseLinesV ¶
Draw ellipse outline (Vector version)
func (Vector2) DrawEllipseV ¶
Draw ellipse (Vector version)
func (Vector2) DrawLineBezier ¶
Draw line segment cubic-bezier in-out interpolation
func (Vector2) DrawLineDashed ¶
Draw a dashed line
func (Vector2) DrawLineEx ¶
Draw a line (using triangles/quads)
func (*Vector2) DrawLineStrip ¶
Draw lines sequence (using gl lines)
func (Vector2) DrawPixelV ¶
Draw a pixel using geometry (Vector version) [Can be slow, use with care]
func (Vector2) DrawPolyLines ¶
Draw a polygon outline of n sides
func (Vector2) DrawPolyLinesEx ¶
func (self Vector2) DrawPolyLinesEx(sides c.Int, radius c.Float, rotation c.Float, lineThick c.Float, color Color)
Draw a polygon outline of n sides with extended parameters
func (Vector2) DrawRectangleV ¶
Draw a color-filled rectangle (Vector version)
func (Vector2) DrawRing ¶
func (self Vector2) DrawRing(innerRadius c.Float, outerRadius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, color Color)
Draw ring
func (Vector2) DrawRingLines ¶
func (self Vector2) DrawRingLines(innerRadius c.Float, outerRadius c.Float, startAngle c.Float, endAngle c.Float, segments c.Int, color Color)
Draw ring outline
func (*Vector2) DrawSplineBasis ¶
Draw spline: B-Spline, minimum 4 points
func (*Vector2) DrawSplineBezierCubic ¶
Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
func (*Vector2) DrawSplineBezierQuadratic ¶
Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
func (*Vector2) DrawSplineCatmullRom ¶
Draw spline: Catmull-Rom, minimum 4 points
func (*Vector2) DrawSplineLinear ¶
Splines drawing functions
func (Vector2) DrawSplineSegmentBasis ¶
func (self Vector2) DrawSplineSegmentBasis(p2 Vector2, p3 Vector2, p4 Vector2, thick c.Float, color Color)
Draw spline segment: B-Spline, 4 points
func (Vector2) DrawSplineSegmentBezierCubic ¶
func (self Vector2) DrawSplineSegmentBezierCubic(c2 Vector2, c3 Vector2, p4 Vector2, thick c.Float, color Color)
Draw spline segment: Cubic Bezier, 2 points, 2 control points
func (Vector2) DrawSplineSegmentBezierQuadratic ¶
func (self Vector2) DrawSplineSegmentBezierQuadratic(c2 Vector2, p3 Vector2, thick c.Float, color Color)
Draw spline segment: Quadratic Bezier, 2 points, 1 control point
func (Vector2) DrawSplineSegmentCatmullRom ¶
func (self Vector2) DrawSplineSegmentCatmullRom(p2 Vector2, p3 Vector2, p4 Vector2, thick c.Float, color Color)
Draw spline segment: Catmull-Rom, 4 points
func (Vector2) DrawSplineSegmentLinear ¶
Draw spline segment: Linear, 2 points
func (Vector2) DrawTriangle ¶
Draw a color-filled triangle (vertex in counter-clockwise order!)
func (*Vector2) DrawTriangleFan ¶
Draw a triangle fan defined by points (first vertex is the center)
func (Vector2) DrawTriangleLines ¶
Draw triangle outline (vertex in counter-clockwise order!)
func (*Vector2) DrawTriangleStrip ¶
Draw a triangle strip defined by points
func (Vector2) ScreenToWorld2D ¶
Get the world space position for a 2d camera screen space position
func (Vector2) ScreenToWorldRay ¶
Get a ray trace from screen position (i.e mouse)
func (Vector2) ScreenToWorldRayEx ¶
Get a ray trace from screen position (i.e mouse) in a viewport
func (Vector2) SplinePointBasis ¶
Get (evaluate) spline point: B-Spline
func (Vector2) SplinePointBezierCubic ¶
Get (evaluate) spline point: Cubic Bezier
func (Vector2) SplinePointBezierQuad ¶
Get (evaluate) spline point: Quadratic Bezier
func (Vector2) SplinePointCatmullRom ¶
Get (evaluate) spline point: Catmull-Rom
func (Vector2) SplinePointLinear ¶
Spline segment point evaluation functions, for a given t [0.0f .. 1.0f]
func (Vector2) WorldToScreen2D ¶
Get the screen space position for a 2d camera world space position
type Vector3 ¶
Vector3, 3 components
func ColorToHSV ¶ added in v0.3.0
Get HSV values for a Color, hue [0..360], saturation/value [0..1]
func (Vector3) CheckCollisionSpheres ¶
Collision detection functions
func (Vector3) DrawCapsule ¶
func (self Vector3) DrawCapsule(endPos Vector3, radius c.Float, slices c.Int, rings c.Int, color Color)
Draw a capsule with the center of its sphere caps at startPos and endPos
func (Vector3) DrawCapsuleWires ¶
func (self Vector3) DrawCapsuleWires(endPos Vector3, radius c.Float, slices c.Int, rings c.Int, color Color)
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
func (Vector3) DrawCircle3D ¶
func (self Vector3) DrawCircle3D(radius c.Float, rotationAxis Vector3, rotationAngle c.Float, color Color)
Draw a circle in 3D world space
func (Vector3) DrawCubeWires ¶
Draw cube wires
func (Vector3) DrawCubeWiresV ¶
Draw cube wires (Vector version)
func (Vector3) DrawCylinder ¶
func (self Vector3) DrawCylinder(radiusTop c.Float, radiusBottom c.Float, height c.Float, slices c.Int, color Color)
Draw a cylinder/cone
func (Vector3) DrawCylinderEx ¶
func (self Vector3) DrawCylinderEx(endPos Vector3, startRadius c.Float, endRadius c.Float, sides c.Int, color Color)
Draw a cylinder with base at startPos and top at endPos
func (Vector3) DrawCylinderWires ¶
func (self Vector3) DrawCylinderWires(radiusTop c.Float, radiusBottom c.Float, height c.Float, slices c.Int, color Color)
Draw a cylinder/cone wires
func (Vector3) DrawCylinderWiresEx ¶
func (self Vector3) DrawCylinderWiresEx(endPos Vector3, startRadius c.Float, endRadius c.Float, sides c.Int, color Color)
Draw a cylinder wires with base at startPos and top at endPos
func (Vector3) DrawLine3D ¶
Basic geometric 3D shapes drawing functions
func (Vector3) DrawPoint3D ¶
Draw a point in 3D space, actually a small line
func (Vector3) DrawSphereEx ¶
Draw sphere with extended parameters
func (Vector3) DrawSphereWires ¶
Draw sphere wires
func (Vector3) DrawTriangle3D ¶
Draw a color-filled triangle (vertex in counter-clockwise order!)
func (*Vector3) DrawTriangleStrip3D ¶
Draw a triangle strip defined by points
func (Vector3) WorldToScreen ¶
Get the screen space position for a 3d world space position
type Vector4 ¶
Vector4, 4 components
func ColorNormalize ¶ added in v0.3.0
Get Color normalized as float [0..1]
func (Vector4) ColorFromNormalized ¶
Get Color from normalized values [0..1]
type VrDeviceInfo ¶
type VrDeviceInfo struct {
HResolution c.Int
VResolution c.Int
HScreenSize c.Float
VScreenSize c.Float
EyeToScreenDistance c.Float
LensSeparationDistance c.Float
InterpupillaryDistance c.Float
LensDistortionValues [4]c.Float
ChromaAbCorrection [4]c.Float
}
VrDeviceInfo, Head-Mounted-Display device parameters
func (VrDeviceInfo) LoadVrStereoConfig ¶
func (self VrDeviceInfo) LoadVrStereoConfig() VrStereoConfig
VR stereo config functions for VR simulator
type VrStereoConfig ¶
type VrStereoConfig struct {
Projection [2]Matrix
ViewOffset [2]Matrix
LeftLensCenter [2]c.Float
RightLensCenter [2]c.Float
LeftScreenCenter [2]c.Float
RightScreenCenter [2]c.Float
Scale [2]c.Float
ScaleIn [2]c.Float
}
VrStereoConfig, VR stereo rendering configuration for simulator
func (VrStereoConfig) BeginVrStereoMode ¶
func (self VrStereoConfig) BeginVrStereoMode()
Begin stereo rendering (requires VR simulator)
type Wave ¶
type Wave struct {
FrameCount c.Uint
SampleRate c.Uint
SampleSize c.Uint
Channels c.Uint
Data unsafe.Pointer
}
Wave, audio wave data
func LoadWaveFromMemory ¶
Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
func (Wave) ExportWaveAsCode ¶
Export wave sample data to code (.h), returns true on success
func (Wave) IsWaveValid ¶
Checks if wave data is valid (data loaded and parameters)
func (Wave) LoadWaveSamples ¶
Load samples data from wave as a 32bit float data array