Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlendMode(mode BlendMode)
- func BeginDrawing()
- func BeginMode2D(camera Camera2D)
- func BeginMode3D(camera Camera)
- func BeginScissorMode(x int, y int, width int, height int)
- func BeginShaderMode(shader Shader)
- func BeginTextureMode(target RenderTexture2D)
- func BeginVrDrawing()
- func CheckCollisionBoxSphere(box BoundingBox, center Vector3, radius float32) bool
- func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
- func CheckCollisionCircleRec(center Vector2, radius float32, rec Rectangle) bool
- func CheckCollisionCircles(center1 Vector2, radius1 float32, center2 Vector2, radius2 float32) bool
- func CheckCollisionPointCircle(point Vector2, center Vector2, radius float32) bool
- func CheckCollisionPointRec(point Vector2, r Rectangle) bool
- func CheckCollisionPointTriangle(point Vector2, p1 Vector2, p2 Vector2, p3 Vector2) bool
- func CheckCollisionRayBox(ray Ray, box BoundingBox) bool
- func CheckCollisionRaySphere(ray Ray, center Vector3, radius float32) bool
- func CheckCollisionRecs(r Rectangle, rect Rectangle) bool
- func CheckCollisionSpheres(centerA Vector3, radiusA float32, centerB Vector3, radiusB float32) bool
- func Clamp(v float64, min float64, max float64) float64
- func Clamp32(v float32, min float32, max float32) float32
- func ClearBackground(color Color)
- func ClearDroppedFiles()
- func CloseAudioDevice()
- func CloseAudioStream(stream *AudioStream)
- func CloseVrSimulator()
- func CloseWindow()
- func ColorToInt(color Color) int
- func DisableCursor()
- func DrawBillboard(camera Camera, texture Texture2D, center Vector3, size float32, tint Color)
- func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, ...)
- func DrawBoundingBox(box BoundingBox, color Color)
- func DrawCircle(centerX int, centerY int, radius float32, color Color)
- func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawCircleGradient(centerX int, centerY int, radius float32, color1 Color, color2 Color)
- func DrawCircleLines(centerX int, centerY int, radius float32, color Color)
- func DrawCircleSector(center Vector2, radius float32, startAngle int, endAngle int, segments int, ...)
- func DrawCircleSectorLines(center Vector2, radius float32, startAngle int, endAngle int, segments int, ...)
- func DrawCircleV(center Vector2, radius float32, color Color)
- func DrawCube(position Vector3, width float32, height float32, length float32, color Color)
- func DrawCubeTexture(texture Texture2D, position Vector3, width float32, height float32, ...)
- func DrawCubeV(position Vector3, size Vector3, color Color)
- func DrawCubeWires(position Vector3, width float32, height float32, length float32, color Color)
- func DrawCubeWiresV(position Vector3, size Vector3, color Color)
- func DrawCylinder(position Vector3, radiusTop float32, radiusBottom float32, height float32, ...)
- func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, ...)
- func DrawFPS(posX int, posY int)
- func DrawGizmo(position Vector3)
- func DrawGrid(slices int, spacing float32)
- func DrawLine(startPosX int, startPosY int, endPosX int, endPosY int, color Color)
- func DrawLine3D(startPos Vector3, endPos Vector3, color Color)
- func DrawLineBezier(startPos Vector2, endPos Vector2, thick float32, color Color)
- func DrawLineEx(startPos Vector2, endPos Vector2, thick float32, color Color)
- func DrawLineV(startPos Vector2, endPos Vector2, color Color)
- func DrawModel(model Model, position Vector3, scale float32, tint Color)
- func DrawModelEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawModelWires(model Model, position Vector3, scale float32, tint Color)
- func DrawModelWiresEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, ...)
- func DrawPixel(posX int, posY int, color Color)
- func DrawPixelV(position Vector2, color Color)
- func DrawPlane(centerPos Vector3, size Vector2, color Color)
- func DrawPoly(center Vector2, sides int, radius float32, rotation float32, color Color)
- func DrawRay(ray Ray, color Color)
- func DrawRectangle(posX int, posY int, width int, height int, color Color)
- func DrawRectangleGradientEx(rec Rectangle, col1 Color, col2 Color, col3 Color, col4 Color)
- func DrawRectangleGradientH(posX int, posY int, width int, height int, color1 Color, color2 Color)
- func DrawRectangleGradientHRec(rect Rectangle, color1 Color, color2 Color)
- func DrawRectangleGradientV(posX int, posY int, width int, height int, color1 Color, color2 Color)
- func DrawRectangleGradientVRec(rect Rectangle, color1 Color, color2 Color)
- func DrawRectangleLines(posX int, posY int, width int, height int, color Color)
- func DrawRectangleLinesEx(rec Rectangle, lineThick int, color Color)
- func DrawRectanglePro(rec Rectangle, origin Vector2, rotation float32, color Color)
- func DrawRectangleRec(rec Rectangle, color Color)
- func DrawRectangleRounded(rec Rectangle, roundness float32, segments int, color Color)
- func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments int, lineThick int, color Color)
- func DrawRectangleV(position Vector2, size Vector2, color Color)
- func DrawRing(center Vector2, innerRadius float32, outerRadius float32, startAngle int, ...)
- func DrawRingLines(center Vector2, innerRadius float32, outerRadius float32, startAngle int, ...)
- func DrawSphere(centerPos Vector3, radius float32, color Color)
- func DrawSphereEx(centerPos Vector3, radius float32, rings int, slices int, color Color)
- func DrawSphereWires(centerPos Vector3, radius float32, rings int, slices int, color Color)
- func DrawText(text string, posX int, posY int, fontSize int, color Color)
- func DrawTextEx(font Font, text string, position Vector2, fontSize float32, spacing float32, ...)
- func DrawTextRec(font Font, text string, rec Rectangle, fontSize float32, spacing float32, ...)
- func DrawTextRecEx(font Font, text string, rec Rectangle, fontSize float32, spacing float32, ...)
- func DrawTexture(texture Texture2D, posX int, posY int, tint Color)
- func DrawTextureEx(texture Texture2D, position Vector2, rotation float32, scale float32, ...)
- func DrawTextureNPatch(texture Texture2D, nPatchInfo NPatchInfo, destRec Rectangle, origin Vector2, ...)
- func DrawTexturePro(texture Texture2D, sourceRec Rectangle, destRec Rectangle, origin Vector2, ...)
- func DrawTextureQuad(texture Texture2D, tiling Vector2, offset Vector2, quad Rectangle, tint Color)
- func DrawTextureRec(texture Texture2D, sourceRec Rectangle, position Vector2, tint Color)
- func DrawTextureV(texture Texture2D, position Vector2, tint Color)
- func DrawTriangle(v1 Vector2, v2 Vector2, v3 Vector2, color Color)
- func DrawTriangleLines(v1 Vector2, v2 Vector2, v3 Vector2, color Color)
- func EnableCursor()
- func EndBlendMode()
- func EndDrawing()
- func EndMode2D()
- func EndMode3D()
- func EndScissorMode()
- func EndShaderMode()
- func EndTextureMode()
- func EndVrDrawing()
- func ExportImage(image *Image, fileName string)
- func ExportImageAsCode(image *Image, fileName string)
- func ExportMesh(mesh *Mesh, fileName string)
- func ExportWave(wave *Wave, fileName string)
- func ExportWaveAsCode(wave *Wave, fileName string)
- func Float32frombits(b uint32) float32
- func GenTextureMipmaps(texture Texture2D)
- func GetClipboardText() string
- func GetDroppedFiles() []string
- func GetFPS() int
- func GetFrameTime() float32
- func GetGamepadAxisCount(gamepad GamepadNumber) int
- func GetGamepadAxisMovement(gamepad GamepadNumber, axis GamepadAxis) float32
- func GetGamepadButtonPressed() int
- func GetGamepadName(gamepad GamepadNumber) string
- func GetGestureDragAngle() float32
- func GetGestureHoldDuration() float32
- func GetGesturePinchAngle() float32
- func GetGlyphIndex(font Font, character int) int
- func GetMonitorCount() int
- func GetMonitorHeight(monitor int) int
- func GetMonitorName(monitor int) string
- func GetMonitorPhysicalHeight(monitor int) int
- func GetMonitorPhysicalWidth(monitor int) int
- func GetMonitorWidth(monitor int) int
- func GetMouseWheelMove() int
- func GetMouseX() int
- func GetMouseY() int
- func GetMusicTimeLength(music *Music) float32
- func GetMusicTimePlayed(music *Music) float32
- func GetPixelDataSize(width int, height int, format PixelFormat) int
- func GetRandomValue(min int, max int) int
- func GetScreenHeight() int
- func GetScreenWidth() int
- func GetShaderLocation(shader Shader, uniformName string) int
- func GetSoundsPlaying() int
- func GetTime() float64
- func GetTouchPointsCount() int
- func GetTouchX() int
- func GetTouchY() int
- func GetWaveData(wave Wave) []float32
- func GetWindowHandle()
- func GuiButton(bounds Rectangle, text string) bool
- func GuiCheckBox(bounds Rectangle, text string, checked bool) bool
- func GuiComboBox(bounds Rectangle, text string, active int) int
- func GuiDisable()
- func GuiDropdownBox(bounds Rectangle, text string, active int, editMode bool) (bool, int)
- func GuiDummyRec(bounds Rectangle, text string)
- func GuiEnable()
- func GuiEnabled() bool
- func GuiFade(alpha float32)
- func GuiGetState() int
- func GuiGetStyle(control GuiControl, property GuiProperty) int
- func GuiGroupBox(bounds Rectangle, text string)
- func GuiIconText(iconId int, text string) string
- func GuiImageButton(bounds Rectangle, text string, texture Texture2D) bool
- func GuiImageButtonEx(bounds Rectangle, text string, texture Texture2D, texSource Rectangle) bool
- func GuiLabel(bounds Rectangle, text string)
- func GuiLabelButton(bounds Rectangle, text string) bool
- func GuiLine(bounds Rectangle, text string)
- func GuiListView(bounds Rectangle, text string, scrollIndex int, active int) (int, int)
- func GuiListViewEx(bounds Rectangle, text []string, count int, focus int, scrollIndex int, ...) (int, int, int)
- func GuiLoadStyle(fileName string)
- func GuiLoadStyleDefault()
- func GuiLock()
- func GuiLocked() bool
- func GuiMessageBox(bounds Rectangle, title string, message string, buttons string) int
- func GuiPanel(bounds Rectangle)
- func GuiProgressBar(bounds Rectangle, textLeft string, textRight string, value float32, ...) float32
- func GuiScrollBar(bounds Rectangle, value int, minValue int, maxValue int) int
- func GuiScrollPanel(bounds Rectangle, content Rectangle, scroll Vector2) (Rectangle, Vector2)
- func GuiSetFont(font Font)
- func GuiSetState(state int)
- func GuiSetStyle(control GuiControl, property GuiProperty, value int)
- func GuiSlider(bounds Rectangle, textLeft string, textRight string, value float32, ...) float32
- func GuiSliderBar(bounds Rectangle, textLeft string, textRight string, value float32, ...) float32
- func GuiSpinner(bounds Rectangle, text string, value int, minValue int, maxValue int, ...) (bool, int)
- func GuiStatusBar(bounds Rectangle, text string)
- func GuiTextBox(bounds Rectangle, text string, maxCharacters int, editMode bool) (bool, string)
- func GuiTextBoxCopy(text string)
- func GuiTextBoxCut(text string) string
- func GuiTextBoxDelete(text string, length int, before bool) (int, string)
- func GuiTextBoxGetByteIndex(text string, start int, from int, to int) int
- func GuiTextBoxGetCursor() int
- func GuiTextBoxIsActive(bounds Rectangle) bool
- func GuiTextBoxMulti(bounds Rectangle, text string, maxCharacters int, editMode bool) (bool, string)
- func GuiTextBoxPaste(text string, textSize int) string
- func GuiTextBoxSelectAll(text string)
- func GuiTextBoxSetActive(bounds Rectangle)
- func GuiTextBoxSetCursor(cursor int)
- func GuiTextBoxSetSelection(start int, length int)
- func GuiTextBoxSetState(state GuiTextBoxState)
- func GuiTextInputBox(bounds Rectangle, title string, message string, buttons string, text string) (int, string)
- func GuiToggle(bounds Rectangle, text string, active bool) bool
- func GuiToggleGroup(bounds Rectangle, text string, active int) int
- func GuiUnlock()
- func GuiValueBox(bounds Rectangle, text string, value int, minValue int, maxValue int, ...) (bool, int)
- func GuiWindowBox(bounds Rectangle, title string) bool
- func HideCursor()
- func HideWindow()
- func ImageAlphaClear(image *Image, color Color, threshold float32)
- func ImageAlphaCrop(image *Image, threshold float32)
- func ImageAlphaMask(image *Image, alphaMask *Image)
- func ImageAlphaPremultiply(image *Image)
- func ImageColorBrightness(image *Image, brightness int)
- func ImageColorContrast(image *Image, contrast float32)
- func ImageColorGrayscale(image *Image)
- func ImageColorInvert(image *Image)
- func ImageColorReplace(image *Image, color Color, replace Color)
- func ImageColorTint(image *Image, color Color)
- func ImageCrop(image *Image, crop Rectangle)
- func ImageDither(image *Image, rBpp int, gBpp int, bBpp int, aBpp int)
- func ImageDraw(dst *Image, src *Image, srcRec Rectangle, dstRec Rectangle, tint Color)
- func ImageDrawRectangle(dst *Image, rec Rectangle, color Color)
- func ImageDrawRectangleLines(dst *Image, rec Rectangle, thick int, color Color)
- func ImageDrawText(dst *Image, position Vector2, text string, fontSize int, color Color)
- func ImageDrawTextEx(dst *Image, position Vector2, font *Font, text string, fontSize float32, ...)
- func ImageFlipHorizontal(image *Image)
- func ImageFlipVertical(image *Image)
- func ImageFormat(image *Image, newFormat PixelFormat)
- func ImageMipmaps(image *Image)
- func ImageResize(image *Image, newWidth int, newHeight int)
- func ImageResizeCanvas(image *Image, newWidth int, newHeight int, offsetX int, offsetY int, ...)
- func ImageResizeNN(image *Image, newWidth int, newHeight int)
- func ImageRotateCCW(image *Image)
- func ImageRotateCW(image *Image)
- func ImageToPOT(image *Image, fillColor Color)
- func Inf(sign int) float32
- func InitAudioDevice()
- func InitVrSimulator()
- func InitWindow(width int, height int, title string)
- func IsAudioDeviceReady() bool
- func IsAudioStreamPlaying(stream *AudioStream) bool
- func IsAudioStreamProcessed(stream *AudioStream) bool
- func IsCursorHidden() bool
- func IsFileDropped() bool
- func IsGamepadAvailable(gamepad GamepadNumber) bool
- func IsGamepadButtonDown(gamepad GamepadNumber, button GamepadButton) bool
- func IsGamepadButtonPressed(gamepad GamepadNumber, button GamepadButton) bool
- func IsGamepadButtonReleased(gamepad GamepadNumber, button GamepadButton) bool
- func IsGamepadButtonUp(gamepad GamepadNumber, button GamepadButton) bool
- func IsGamepadName(gamepad GamepadNumber, name string) bool
- func IsGestureDetected(gesture GestureType) bool
- func IsKeyDown(key Key) bool
- func IsKeyPressed(key Key) bool
- func IsKeyReleased(key Key) bool
- func IsKeyUp(key Key) bool
- func IsModelAnimationValid(model *Model, anim *ModelAnimation) bool
- func IsMouseButtonDown(button MouseButton) bool
- func IsMouseButtonPressed(button MouseButton) bool
- func IsMouseButtonReleased(button MouseButton) bool
- func IsMouseButtonUp(button MouseButton) bool
- func IsMusicPlaying(music *Music) bool
- func IsSoundPlaying(sound *Sound) bool
- func IsVrSimulatorReady() bool
- func IsWindowHidden() bool
- func IsWindowMinimized() bool
- func IsWindowReady() bool
- func IsWindowResized() bool
- func MeasureText(text string, fontSize int) int
- func MeshBinormals(mesh *Mesh)
- func MeshTangents(mesh *Mesh)
- func NaN32() float32
- func OpenURL(url string) error
- func PauseAudioStream(stream *AudioStream)
- func PauseMusicStream(music *Music)
- func PauseSound(sound *Sound)
- func PlayAudioStream(stream *AudioStream)
- func PlayMusicStream(music *Music)
- func PlaySound(sound *Sound)
- func PlaySoundMulti(sound *Sound)
- func RegisterUnloadable(unloadable Unloadable)
- func ReportGlErrors()
- func ResumeAudioStream(stream *AudioStream)
- func ResumeMusicStream(music *Music)
- func ResumeSound(sound *Sound)
- func SetAudioStreamPitch(stream *AudioStream, pitch float32)
- func SetAudioStreamVolume(stream *AudioStream, volume float32)
- func SetCameraAltControl(altKey Key)
- func SetCameraMode(camera *Camera, mode CameraMode)
- func SetCameraMoveControls(frontKey Key, backKey Key, rightKey Key, leftKey Key, upKey Key, downKey Key)
- func SetCameraPanControl(panKey Key)
- func SetCameraSmoothZoomControl(szKey Key)
- func SetClipboardText(text string)
- func SetConfigFlags(flags uint32)
- func SetExitKey(key Key)
- func SetGesturesEnabled(gestureFlags uint32)
- func SetMasterVolume(volume float32)
- func SetMaterialTexture(material *Material, mapType MaterialMapType, texture Texture2D)
- func SetMatrixModelview(view Matrix)
- func SetMatrixProjection(proj Matrix)
- func SetModelMeshMaterial(model *Model, meshId int, materialId int)
- func SetMouseOffset(offsetX int, offsetY int)
- func SetMousePosition(x int, y int)
- func SetMouseScale(scaleX float32, scaleY float32)
- func SetMusicLoopCount(music *Music, count int)
- func SetMusicPitch(music *Music, pitch float32)
- func SetMusicVolume(music *Music, volume float32)
- func SetShaderValueFloat32(shader *Shader, uniformLoc int, value []float32, ...)
- func SetShaderValueFloat32V(shader *Shader, uniformLoc int, values []float32, ...)
- func SetShaderValueInt32(shader *Shader, uniformLoc int, value []int32, ...)
- func SetShaderValueInt32V(shader *Shader, uniformLoc int, values []int32, ...)
- func SetShaderValueMatrix(shader Shader, uniformLoc int, mat Matrix)
- func SetShaderValueTexture(shader Shader, uniformLoc int, texture Texture2D)
- func SetShapesTexture(texture Texture2D, source Rectangle)
- func SetSoundPitch(sound *Sound, pitch float32)
- func SetSoundVolume(sound *Sound, volume float32)
- func SetTargetFPS(fps int)
- func SetTextureFilter(texture Texture2D, filterMode TextureFilterMode)
- func SetTextureWrap(texture *Texture2D, wrapMode TextureWrapMode)
- func SetTraceLogCallback(callback func(logType TraceLogType, text string))
- func SetTraceLogExit(logType TraceLogType)
- func SetTraceLogLevel(logType TraceLogType)
- func SetVrConfiguration(info VrDeviceInfo, distortion Shader)
- func SetWindowIcon(image Image)
- func SetWindowMinSize(width int, height int)
- func SetWindowMonitor(monitor int)
- func SetWindowPosition(x int, y int)
- func SetWindowSize(width int, height int)
- func SetWindowTitle(title string)
- func ShowCursor()
- func StopAudioStream(stream *AudioStream)
- func StopMusicStream(music *Music)
- func StopSound(sound *Sound)
- func StopSoundMulti()
- func StorageLoadValue(position int) int
- func StorageSaveValue(position int, value int)
- func TakeScreenshot(fileName string)
- func ToggleFullscreen()
- func ToggleVrMode()
- func Trace(a ...interface{})
- func TraceError(a ...interface{})
- func TraceFatal(a ...interface{})
- func TraceInfo(a ...interface{})
- func TraceLog(logType TraceLogType, a ...interface{})
- func TraceWarning(a ...interface{})
- func UnhideWindow()
- func UnloadAll()
- func UnloadFont(font *Font)
- func UnloadImage(image *Image)
- func UnloadMaterial(material *Material)
- func UnloadMesh(mesh *Mesh)
- func UnloadModel(model *Model)
- func UnloadModelAnimation(anim *ModelAnimation)
- func UnloadMusicStream(music *Music)
- func UnloadRenderTexture(target RenderTexture2D)
- func UnloadShader(shader Shader)
- func UnloadSound(sound *Sound)
- func UnloadTexture(texture Texture2D)
- func UnloadWave(wave *Wave)
- func UnregisterUnloadable(unloadable Unloadable)
- func UpdateAudioStream(stream *AudioStream, data []float32, samplesCount int)
- func UpdateCamera(camera *Camera)
- func UpdateModelAnimation(model *Model, anim *ModelAnimation, frame int)
- func UpdateMusicStream(music *Music)
- func UpdateSound(sound *Sound, data unsafe.Pointer, samplesCount int)
- func UpdateTexture(texture *Texture2D, pixels []Color)
- func UpdateVrTracking(camera *Camera)
- func WaveCrop(wave *Wave, initSample int, finalSample int)
- func WaveFormat(wave *Wave, sampleRate int, sampleSize int, channels int)
- func WindowShouldClose() bool
- type AudioStream
- func (stream *AudioStream) IsPlaying() bool
- func (stream *AudioStream) IsProcessed() bool
- func (as *AudioStream) IsValid() bool
- func (stream *AudioStream) Pause()
- func (stream *AudioStream) Play()
- func (stream *AudioStream) Resume()
- func (stream *AudioStream) SetPitch(pitch float32)
- func (stream *AudioStream) SetVolume(volume float32)
- func (stream *AudioStream) Stop()
- func (stream *AudioStream) Unload()
- func (stream *AudioStream) Update(data []float32, samplesCount int)
- type BlendMode
- type BoneInfo
- type BoundingBox
- type Camera
- type Camera2D
- type Camera3D
- type CameraMode
- type CameraType
- type CharInfo
- type Color
- func ColorFromHSV(hsv Vector3) Color
- func Fade(color Color, alpha float32) Color
- func GetColor(hexValue int) Color
- func GetImageData(image *Image) []Color
- func GuiColorPicker(bounds Rectangle, color Color) Color
- func ImageExtractPalette(image *Image, maxPaletteSize int) ([]Color, int)
- func NewColor(r, g, b, a uint8) Color
- func NewColorFromHSV(hsv Vector3) Color
- func NewColorFromNormalized(normalized Vector4) Color
- func NewColorInt(hexValue int) Color
- type CubemapLayoutType
- type Font
- type FontType
- type GamepadAxis
- type GamepadButton
- type GamepadNumber
- type GestureType
- type GuiControl
- type GuiProperty
- type GuiState
- type GuiTextBoxState
- type Image
- func GenImageCellular(width int, height int, tileSize int) *Image
- func GenImageChecked(width int, height int, checksX int, checksY int, col1 Color, col2 Color) *Image
- func GenImageColor(width int, height int, color Color) *Image
- func GenImageGradientH(width int, height int, left Color, right Color) *Image
- func GenImageGradientRadial(width int, height int, density float32, inner Color, outer Color) *Image
- func GenImageGradientV(width int, height int, top Color, bottom Color) *Image
- func GenImagePerlinNoise(width int, height int, offsetX int, offsetY int, scale float32) *Image
- func GenImageWhiteNoise(width int, height int, factor float32) *Image
- func GetScreenData() *Image
- func GetTextureData(texture Texture2D) *Image
- func ImageCopy(image *Image) *Image
- func ImageFromImage(image *Image, rec Rectangle) *Image
- func ImageText(text string, fontSize int, color Color) *Image
- func ImageTextEx(font Font, text string, fontSize float32, spacing float32, tint Color) *Image
- func LoadImage(fileName string) *Image
- func LoadImageEx(pixels []Color, width, height int32) *Image
- func LoadImageFromGo(img image.Image) *Image
- func LoadImagePro(pixels []byte, width, height int32, format PixelFormat) *Image
- func LoadImageRaw(fileName string, width int, height int, format int, headerSize int) *Image
- func (image *Image) AlphaClear(color Color, threshold float32)
- func (image *Image) AlphaCrop(threshold float32)
- func (image *Image) AlphaMask(alphaMask *Image)
- func (image *Image) AlphaPremultiply()
- func (image *Image) ColorBrightness(brightness int)
- func (image *Image) ColorContrast(contrast float32)
- func (image *Image) ColorGrayscale()
- func (image *Image) ColorInvert()
- func (image *Image) ColorReplace(color Color, replace Color)
- func (image *Image) ColorTint(color Color)
- func (image *Image) Copy() *Image
- func (image *Image) CreateMipmaps()
- func (image *Image) Crop(crop Rectangle)
- func (image *Image) Dither(rBpp int, gBpp int, bBpp int, aBpp int)
- func (dst *Image) Draw(src *Image, srcRec Rectangle, dstRec Rectangle, tint Color)
- func (dst *Image) DrawRectangle(rec Rectangle, color Color)
- func (dst *Image) DrawRectangleLines(rec Rectangle, thick int, color Color)
- func (dst *Image) DrawText(position Vector2, text string, fontSize int, color Color)
- func (dst *Image) DrawTextEx(position Vector2, font *Font, text string, fontSize float32, spacing float32, ...)
- func (image *Image) Export(fileName string)
- func (image *Image) ExportAsCode(fileName string)
- func (image *Image) ExtractPalette(maxPaletteSize int) ([]Color, int)
- func (image *Image) FlipHorizontal()
- func (image *Image) FlipVertical()
- func (image *Image) FromImage(rec Rectangle) *Image
- func (cubicmap *Image) GenMeshCubicmap(cubeSize Vector3) *Mesh
- func (heightmap *Image) GenMeshHeightmap(size Vector3) *Mesh
- func (image *Image) GetAlphaBorder(threshold float32) Rectangle
- func (image *Image) GetPixels() []Color
- func (image *Image) GetPixelsNormalized() []Vector4
- func (image *Image) Resize(newWidth int, newHeight int)
- func (image *Image) ResizeCanvas(newWidth int, newHeight int, offsetX int, offsetY int, color Color)
- func (image *Image) ResizeNN(newWidth int, newHeight int)
- func (image *Image) RotateCCW()
- func (image *Image) RotateCW()
- func (image *Image) SetFormat(newFormat PixelFormat)
- func (image *Image) ToPOT(fillColor Color)
- func (image *Image) Unload()
- type Key
- type Material
- type MaterialMap
- type MaterialMapType
- type Matrix
- func GetCameraMatrix(camera Camera) Matrix
- func GetCameraMatrix2D(camera Camera2D) Matrix
- func GetMatrixModelview() Matrix
- func GetMatrixProjection() Matrix
- func NewMatrixFromQuaternion(q Quaternion) Matrix
- func NewMatrixFrustum(left, right, bottom, top, near, far float64) Matrix
- func NewMatrixIdentity() Matrix
- func NewMatrixLookAt(eye, target, up Vector3) Matrix
- func NewMatrixOrtho(left, right, bottom, top, near, far float64) Matrix
- func NewMatrixPerspective(fovy, aspect, near, far float64) Matrix
- func NewMatrixRotate(axis Vector3, radians float32) Matrix
- func NewMatrixRotateX(radians float32) Matrix
- func NewMatrixRotateXYZ(radians Vector3) Matrix
- func NewMatrixRotateY(radians float32) Matrix
- func NewMatrixRotateZ(radians float32) Matrix
- func NewMatrixScale(scale Vector3) Matrix
- func NewMatrixTranslate(x, y, z float32) Matrix
- func (m Matrix) Add(right Matrix) Matrix
- func (m Matrix) Decompose() []float32
- func (m Matrix) Detrimant() float32
- func (m Matrix) Invert() Matrix
- func (m Matrix) Multiply(right Matrix) Matrix
- func (m Matrix) Normalize() Matrix
- func (m Matrix) Subtract(right Matrix) Matrix
- func (m Matrix) ToQuaternion() Quaternion
- func (m Matrix) Trace() float32
- func (m Matrix) Transpose() Matrix
- type Mesh
- func GenMeshCube(width float32, height float32, length float32) *Mesh
- func GenMeshCubicmap(cubicmap *Image, cubeSize Vector3) *Mesh
- func GenMeshCylinder(radius float32, height float32, slices int) *Mesh
- func GenMeshHeightmap(heightmap *Image, size Vector3) *Mesh
- func GenMeshHemiSphere(radius float32, rings int, slices int) *Mesh
- func GenMeshKnot(radius float32, size float32, radSeg int, sides int) *Mesh
- func GenMeshPlane(width float32, length float32, resX int, resZ int) *Mesh
- func GenMeshPoly(sides int, radius float32) *Mesh
- func GenMeshSphere(radius float32, rings int, slices int) *Mesh
- func GenMeshTorus(radius float32, size float32, radSeg int, sides int) *Mesh
- type Model
- type ModelAnimation
- type MouseButton
- type Music
- func (music *Music) GetTimeLength() float32
- func (music *Music) GetTimePlayed() float32
- func (music *Music) IsPlaying() bool
- func (music *Music) IsValid() bool
- func (music *Music) PauseStream()
- func (music *Music) PlayStream()
- func (music *Music) ResumeStream()
- func (music *Music) SetLoopCount(count int)
- func (music *Music) SetPitch(pitch float32)
- func (music *Music) SetVolume(volume float32)
- func (music *Music) StopStream()
- func (music *Music) Unload()
- func (music *Music) UpdateStream()
- type NPatchInfo
- type NPatchType
- type PixelFormat
- type Quaternion
- func (q Quaternion) Decompose() []float32
- func (q Quaternion) Invert() Quaternion
- func (q Quaternion) Length() float32
- func (q Quaternion) Lerp(target Quaternion, amount float32) Quaternion
- func (q Quaternion) Multiply(q2 Quaternion) Quaternion
- func (q Quaternion) Nlerp(target Quaternion, amount float32) Quaternion
- func (q Quaternion) Normalize() Quaternion
- func (q Quaternion) Scale(scale float32) Quaternion
- func (q Quaternion) Slerp(q2 Quaternion, amount float32) Quaternion
- func (q Quaternion) SqrLength() float32
- func (q Quaternion) ToAxisAngle() (Vector3, float32)
- func (q Quaternion) ToEuler() Vector3
- func (q Quaternion) ToMatrix() Matrix
- func (q Quaternion) Transform(mat Matrix) Quaternion
- type Ray
- type RayHitInfo
- type Rectangle
- func GetCollisionRec(rec1 Rectangle, rec2 Rectangle) Rectangle
- func GetImageAlphaBorder(image *Image, threshold float32) Rectangle
- func GuiTextBoxGetActive() Rectangle
- func NewRectangle(x, y, width, height float32) Rectangle
- func NewRectangleFromPositionSize(position, size Vector2) Rectangle
- func NewRectangleFromVector4(vector Vector4) Rectangle
- func (r Rectangle) Center() Vector2
- func (r Rectangle) Contains(point Vector2) bool
- func (rec1 Rectangle) GetOverlapRec(rec2 Rectangle) Rectangle
- func (r Rectangle) Grow(x, y float32) Rectangle
- func (r Rectangle) GrowV(v Vector2) Rectangle
- func (r Rectangle) Lerp(target Rectangle, amount float32) Rectangle
- func (r Rectangle) LerpPosition(pos Vector2, amount float32) Rectangle
- func (r Rectangle) MaxPosition() Vector2
- func (r Rectangle) MinPosition() Vector2
- func (r Rectangle) Move(x, y float32) Rectangle
- func (r Rectangle) MoveV(v Vector2) Rectangle
- func (r Rectangle) Overlaps(rect Rectangle) bool
- func (r Rectangle) Position() Vector2
- func (r Rectangle) Scale(scale float32) Rectangle
- func (r Rectangle) SetPosition(v Vector2) Rectangle
- func (r Rectangle) SetSize(v Vector2) Rectangle
- func (r Rectangle) Size() Vector2
- func (r Rectangle) ToVector4() Vector4
- type RenderTexture2D
- type Shader
- func (shader Shader) GetLocation(uniformName string) int
- func (shader *Shader) SetValueFloat32(uniformLoc int, value []float32, uniformType ShaderUniformDataType)
- func (shader *Shader) SetValueFloat32V(uniformLoc int, values []float32, uniformType ShaderUniformDataType)
- func (shader *Shader) SetValueInt32(uniformLoc int, value []int32, uniformType ShaderUniformDataType)
- func (shader *Shader) SetValueInt32V(uniformLoc int, values []int32, uniformType ShaderUniformDataType)
- func (shader Shader) SetValueMatrix(uniformLoc int, mat Matrix)
- func (shader Shader) SetValueTexture(uniformLoc int, texture Texture2D)
- func (shader Shader) Unload()
- type ShaderLocationIndex
- type ShaderUniformDataType
- type Sound
- func (sound *Sound) IsPlaying() bool
- func (s *Sound) IsValid() bool
- func (sound *Sound) Pause()
- func (sound *Sound) Play()
- func (sound *Sound) PlayMulti()
- func (sound *Sound) Resume()
- func (sound *Sound) SetPitch(pitch float32)
- func (sound *Sound) SetVolume(volume float32)
- func (sound *Sound) Stop()
- func (sound *Sound) Unload()
- func (sound *Sound) Update(data unsafe.Pointer, samplesCount int)
- type Texture2D
- func GenTextureBRDF(shader Shader, size int) Texture2D
- func GenTextureCubemap(shader Shader, skyHDR Texture2D, size int) Texture2D
- func GenTextureIrradiance(shader Shader, cubemap Texture2D, size int) Texture2D
- func GenTexturePrefilter(shader Shader, cubemap Texture2D, size int) Texture2D
- func GetTextureDefault() Texture2D
- func LoadTexture(fileName string) Texture2D
- func LoadTextureFromGo(image image.Image) Texture2D
- func LoadTextureFromImage(image *Image) Texture2D
- func (texture Texture2D) GenTextureMipmaps()
- func (texture Texture2D) GetTextureData() *Image
- func (texture Texture2D) SetTextureFilter(filterMode TextureFilterMode)
- func (texture *Texture2D) SetWrap(wrapMode TextureWrapMode)
- func (texture Texture2D) Unload()
- func (texture *Texture2D) UpdateTexture(pixels []Color)
- type TextureCubemap
- type TextureFilterMode
- type TextureWrapMode
- type TraceLogType
- type Transform
- type Unloadable
- type Vector
- type Vector2
- func DrawLineStrip(points Vector2, numPoints int, color Color) Vector2
- func DrawTriangleFan(points Vector2, numPoints int, color Color) Vector2
- func DrawTriangleStrip(points Vector2, pointsCount int, color Color) Vector2
- func GetGestureDragVector() Vector2
- func GetGesturePinchVector() Vector2
- func GetMousePosition() Vector2
- func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2
- func GetTouchPosition(index int) Vector2
- func GetWindowPosition() Vector2
- func GetWorldToScreen(position Vector3, camera Camera) Vector2
- func GetWorldToScreen2D(position Vector2, camera Camera2D) Vector2
- func GuiGrid(bounds Rectangle, spacing float32, subdivs int) Vector2
- func GuiTextBoxGetSelection() Vector2
- func MeasureTextEx(font Font, text string, fontSize float32, spacing float32) Vector2
- func NewVector2(x, y float32) Vector2
- func NewVector2Right() Vector2
- func NewVector2Up() Vector2
- func NewVector2Zero() Vector2
- func (v Vector2) Add(v2 Vector2) Vector2
- func (v Vector2) Angle(v2 Vector2) float32
- func (v Vector2) Decompose() []float32
- func (v Vector2) Distance(v2 Vector2) float32
- func (v Vector2) Divide(d float32) Vector2
- func (v Vector2) DivideV(v2 Vector2) Vector2
- func (v Vector2) DotProduct(v2 Vector2) float32
- func (v Vector2) Length() float32
- func (v Vector2) Lerp(target Vector2, amount float32) Vector2
- func (v Vector2) Max(v2 Vector2) Vector2
- func (v Vector2) Min(v2 Vector2) Vector2
- func (v Vector2) Multiply(v2 Vector2) Vector2
- func (v Vector2) Negate() Vector2
- func (v Vector2) Normalize() Vector2
- func (v Vector2) Perpendicular() Vector2
- func (v Vector2) Reflect(mirrorNormal Vector2) Vector2
- func (v Vector2) RotateByRadians(radians float32) Vector2
- func (v Vector2) Scale(scale float32) Vector2
- func (v Vector2) SqrLength() float32
- func (v Vector2) Subtract(v2 Vector2) Vector2
- func (v Vector2) ToVector3() Vector3
- type Vector3
- func CheckCollisionRaySphereEx(ray Ray, center Vector3, radius float32, collisionPoint Vector3) (bool, Vector3)
- func ColorToHSV(color Color) Vector3
- func NewVector3(x, y, z float32) Vector3
- func NewVector3Forward() Vector3
- func NewVector3Right() Vector3
- func NewVector3Up() Vector3
- func NewVector3Zero() Vector3
- func (v Vector3) Add(v2 Vector3) Vector3
- func (v Vector3) Angle(v2 Vector3) float32
- func (v Vector3) Barycenter(a, b, c Vector3) Vector3
- func (v Vector3) CrossProduct(v2 Vector3) Vector3
- func (v Vector3) Decompose() []float32
- func (v Vector3) Distance(v2 Vector3) float32
- func (v Vector3) Divide(d float32) Vector3
- func (v Vector3) DivideV(v2 Vector3) Vector3
- func (v Vector3) DotProduct(v2 Vector3) float32
- func (v Vector3) Length() float32
- func (v Vector3) Lerp(target Vector3, amount float32) Vector3
- func (v Vector3) Max(v2 Vector3) Vector3
- func (v Vector3) Min(v2 Vector3) Vector3
- func (v Vector3) Multiply(v2 Vector3) Vector3
- func (v Vector3) Negate() Vector3
- func (v Vector3) Normalize() Vector3
- func (v *Vector3) OrthoNormalize(v2 *Vector3)
- func (v Vector3) Perpendicular() Vector3
- func (v Vector3) QuaternionToo(v2 Vector3) Quaternion
- func (v Vector3) Reflect(mirrorNormal Vector3) Vector3
- func (v Vector3) RotateByQuaternion(q Quaternion) Vector3
- func (v Vector3) Scale(scale float32) Vector3
- func (v Vector3) SqrLength() float32
- func (v Vector3) Subtract(v2 Vector3) Vector3
- func (v Vector3) ToVector4() Vector4
- func (v Vector3) Transform(m Matrix) Vector3
- type Vector4
- func (v Vector4) Add(v2 Vector4) Vector4
- func (v Vector4) Decompose() []float32
- func (v Vector4) Distance(v2 Vector4) float32
- func (v Vector4) Divide(d float32) Vector4
- func (v Vector4) DivideV(v2 Vector4) Vector4
- func (v Vector4) DotProduct(v2 Vector4) float32
- func (v Vector4) Length() float32
- func (v Vector4) Lerp(target Vector4, amount float32) Vector4
- func (v Vector4) Max(v2 Vector4) Vector4
- func (v Vector4) Min(v2 Vector4) Vector4
- func (v Vector4) Multiply(v2 Vector4) Vector4
- func (v Vector4) Negate() Vector4
- func (v Vector4) Normalize() Vector4
- func (v Vector4) Scale(scale float32) Vector4
- func (v Vector4) SqrLength() float32
- func (v Vector4) Subtract(v2 Vector4) Vector4
- type VrDeviceInfo
- type Wave
Constants ¶
const ( // alphanumeric KeyS KeyApostrophe Key = 39 KeyComma = 44 KeyMinus = 45 KeyPeriod = 46 KeySlash = 47 KeyZero = 48 KeyOne = 49 KeyTwo = 50 KeyThree = 51 KeyFour = 52 KeyFive = 53 KeySix = 54 KeySeven = 55 KeyEight = 56 KeyNine = 57 KeySemicolon = 59 KeyEqual = 61 KeyA = 65 KeyB = 66 KeyC = 67 KeyD = 68 KeyE = 69 KeyF = 70 KeyG = 71 KeyH = 72 KeyI = 73 KeyJ = 74 KeyK = 75 KeyL = 76 KeyM = 77 KeyN = 78 KeyO = 79 KeyP = 80 KeyQ = 81 KeyR = 82 KeyS = 83 KeyT = 84 KeyU = 85 KeyV = 86 KeyW = 87 KeyX = 88 KeyY = 89 KeyZ = 90 // function KeyS KeySpace = 32 KeyEscape = 256 KeyEnter = 257 KeyTab = 258 KeyBackspace = 259 KeyInsert = 260 KeyDelete = 261 KeyRight = 262 KeyLeft = 263 KeyDown = 264 KeyUp = 265 KeyPageUp = 266 KeyPageDown = 267 KeyHome = 268 KeyEnd = 269 KeyCapsLock = 280 KeyScrollLock = 281 KeyNumLock = 282 KeyPrintScreen = 283 KeyPause = 284 KeyF1 = 290 KeyF2 = 291 KeyF3 = 292 KeyF4 = 293 KeyF5 = 294 KeyF6 = 295 KeyF7 = 296 KeyF8 = 297 KeyF9 = 298 KeyF10 = 299 KeyF11 = 300 KeyF12 = 301 KeyLeftShift = 340 KeyLeftControl = 341 KeyLeftAlt = 342 KeyLeftSuper = 343 KeyRightShift = 344 KeyRightControl = 345 KeyRightAlt = 346 KeyRightSuper = 347 KeyKbMenu = 348 KeyLeftBracket = 91 KeyBackslash = 92 KeyRightBracket = 93 KeyGrave = 96 // KeyPad KeyS KeyKp0 = 320 KeyKp1 = 321 KeyKp2 = 322 KeyKp3 = 323 KeyKp4 = 324 KeyKp5 = 325 KeyKp6 = 326 KeyKp7 = 327 KeyKp8 = 328 KeyKp9 = 329 KeyKpDecimal = 330 KeyKpDivide = 331 KeyKpMultiply = 332 KeyKpSubtract = 333 KeyKpAdd = 334 KeyKpEnter = 335 KeyKpEqual = 336 )
const ( // Set to show raylib logo at startup FlagShowLogo = 1 // Set to run program in fullscreen FlagFullscreenMode = 2 // Set to allow resizable window FlagWindowResizable = 4 // Set to disable window decoration (frame and buttons) FlagWindowUndecorated = 8 // Set to allow transparent window FlagWindowTransparent = 16 // Set to try enabling MSAA 4X FlagMsaa4xHint = 32 // Set to try enabling V-Sync on GPU FlagVsyncHint = 64 )
const ( //PI 3.1415 PI float32 = 3.14159265358979323846 //Deg2Rad used to convert degrees into radians Deg2Rad float32 = PI / 180 //Rad2Deg used to convert radians into degrees Rad2Deg float32 = 180 / PI )
const ( MaxMeshVertices = 1 << 28 MaxMeshIndices = 1 << 28 MaxMeshTexCoords = 1 << 28 MaxMeshAnimatedVertices = 1 << 28 MaxMeshBones = 1 << 28 )
const ( MaxModelMeshes = 1 << 28 MaxModelMaterials = 1 << 28 MaxModelBones = 1 << 28 MaxModelBinds = 1 << 28 )
const MaxMaterialMaps = 12
const MaxMaterialParams = 1 << 28
const MaxShaderLocations = 32
Variables ¶
var ( // LightGray ... LightGray = NewColor(200, 200, 200, 255) //Gray ... Gray = NewColor(130, 130, 130, 255) //DarkGray ... DarkGray = NewColor(80, 80, 80, 255) //Yellow ... Yellow = NewColor(253, 249, 0, 255) // Yellow //Gold ... Gold = NewColor(255, 203, 0, 255) // Gold //Orange ... Orange = NewColor(255, 161, 0, 255) // Orange //Pink ... Pink = NewColor(255, 109, 194, 255) // Pink //Red ... Red = NewColor(230, 41, 55, 255) // Red //Maroon ... Maroon = NewColor(190, 33, 55, 255) // Maroon //Green ... Green = NewColor(0, 228, 48, 255) // Green //Lime ... Lime = NewColor(0, 158, 47, 255) // Lime //DarkGreen ... DarkGreen = NewColor(0, 117, 44, 255) // Dark Green //SkyBlue ... SkyBlue = NewColor(102, 191, 255, 255) // Sky Blue //Blue ... Blue = NewColor(0, 121, 241, 255) // Blue //DarkBlue ... DarkBlue = NewColor(0, 82, 172, 255) // Dark Blue //Purple ... Purple = NewColor(200, 122, 255, 255) // Purple //Violet ... Violet = NewColor(135, 60, 190, 255) // Violet //DarkPurple ... DarkPurple = NewColor(112, 31, 126, 255) // Dark Purple //Beige ... Beige = NewColor(211, 176, 131, 255) // Beige //Brown ... Brown = NewColor(127, 106, 79, 255) // Brown //DarkBrown ... DarkBrown = NewColor(76, 63, 47, 255) // Dark Brown //White ... White = NewColor(255, 255, 255, 255) // White //Black ... Black = NewColor(0, 0, 0, 255) // Black //Blank (Transparent) Blank = NewColor(0, 0, 0, 0) // Blank (Transparent) //Magenta ... Magenta = NewColor(255, 0, 255, 255) // Magenta //RayWhite - Off White RayWhite = NewColor(245, 245, 245, 255) // My own White (raylib logo) //Aqua Aqua = NewColor(0, 162, 156, 255) //Gopher Blue GopherBlue = NewColor(1, 173, 216, 255) //Transparent Transparent = NewColor(0, 0, 0, 0) )
Functions ¶
func BeginBlendMode ¶
func BeginBlendMode(mode BlendMode)
BeginBlendMode : Begin blending mode (alpha, additive, multiplied)
func BeginMode2D ¶
func BeginMode2D(camera Camera2D)
BeginMode2D : Initialize 2D mode with custom camera (2D)
func BeginMode3D ¶
func BeginMode3D(camera Camera)
BeginMode3D : Initializes 3D mode with custom camera (3D)
func BeginScissorMode ¶
BeginScissorMode : Begin scissor mode (define screen area for following drawing)
func BeginShaderMode ¶
func BeginShaderMode(shader Shader)
BeginShaderMode : Begin custom shader drawing
func BeginTextureMode ¶
func BeginTextureMode(target RenderTexture2D)
BeginTextureMode : Initializes render texture for drawing
func CheckCollisionBoxSphere ¶
func CheckCollisionBoxSphere(box BoundingBox, center Vector3, radius float32) bool
CheckCollisionBoxSphere : Detect collision between box and sphere
func CheckCollisionBoxes ¶
func CheckCollisionBoxes(box1 BoundingBox, box2 BoundingBox) bool
CheckCollisionBoxes : Detect collision between two bounding boxes
func CheckCollisionCircleRec ¶
CheckCollisionCircleRec : Check collision between circle and rectangle
func CheckCollisionCircles ¶
CheckCollisionCircles : Check collision between two circles
func CheckCollisionPointCircle ¶
CheckCollisionPointCircle : Check if point is inside circle
func CheckCollisionPointRec ¶
CheckCollisionPointRec : Check if point is inside rectangle
func CheckCollisionPointTriangle ¶
CheckCollisionPointTriangle : Check if point is inside a triangle
func CheckCollisionRayBox ¶
func CheckCollisionRayBox(ray Ray, box BoundingBox) bool
CheckCollisionRayBox : Detect collision between ray and box
func CheckCollisionRaySphere ¶
CheckCollisionRaySphere : Detect collision between ray and sphere
func CheckCollisionRecs ¶
CheckCollisionRecs : Check collision between two rectangles Alias of rec1.Overlaps(rect2) instead.
func CheckCollisionSpheres ¶
CheckCollisionSpheres : Detect collision between two spheres
func ClearBackground ¶
func ClearBackground(color Color)
ClearBackground : Set background color (framebuffer clear color)
func ClearDroppedFiles ¶
func ClearDroppedFiles()
ClearDroppedFiles : Clear dropped files paths buffer (free memory)
func CloseAudioDevice ¶
func CloseAudioDevice()
CloseAudioDevice : Close the audio device and context
func CloseAudioStream ¶
func CloseAudioStream(stream *AudioStream)
CloseAudioStream : Close audio stream and free memory Recommended to use stream.Unload() instead
func CloseVrSimulator ¶
func CloseVrSimulator()
CloseVrSimulator : Close VR simulator for current device
func ColorToInt ¶
ColorToInt : Returns hexadecimal value for a Color
func DrawBillboard ¶
DrawBillboard : Draw a billboard texture
func DrawBillboardRec ¶
func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec Rectangle, center Vector3, size float32, tint Color)
DrawBillboardRec : Draw a billboard texture defined by sourceRec
func DrawBoundingBox ¶
func DrawBoundingBox(box BoundingBox, color Color)
DrawBoundingBox : Draw bounding box (wires)
func DrawCircle ¶
DrawCircle : Draw a color-filled circle
func DrawCircle3D ¶
func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotationAngle float32, color Color)
DrawCircle3D : Draw a circle in 3D world space
func DrawCircleGradient ¶
DrawCircleGradient : Draw a gradient-filled circle
func DrawCircleLines ¶
DrawCircleLines : Draw circle outline
func DrawCircleSector ¶
func DrawCircleSector(center Vector2, radius float32, startAngle int, endAngle int, segments int, color Color)
DrawCircleSector : Draw a piece of a circle
func DrawCircleSectorLines ¶
func DrawCircleSectorLines(center Vector2, radius float32, startAngle int, endAngle int, segments int, color Color)
DrawCircleSectorLines : Draw circle sector outline
func DrawCircleV ¶
DrawCircleV : Draw a color-filled circle (Vector version)
func DrawCubeTexture ¶
func DrawCubeTexture(texture Texture2D, position Vector3, width float32, height float32, length float32, color Color)
DrawCubeTexture : Draw cube textured
func DrawCubeWires ¶
DrawCubeWires : Draw cube wires
func DrawCubeWiresV ¶
DrawCubeWiresV : Draw cube wires (Vector version)
func DrawCylinder ¶
func DrawCylinder(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int, color Color)
DrawCylinder : Draw a cylinder/cone
func DrawCylinderWires ¶
func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int, color Color)
DrawCylinderWires : Draw a cylinder/cone wires
func DrawLine3D ¶
DrawLine3D : Draw a line in 3D world space
func DrawLineBezier ¶
DrawLineBezier : Draw a line using cubic-bezier curves in-out
func DrawLineEx ¶
DrawLineEx : Draw a line defining thickness
func DrawModelEx ¶
func DrawModelEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, scale Vector3, tint Color)
DrawModelEx : Draw a model with extended parameters
func DrawModelWires ¶
DrawModelWires : Draw a model wires (with texture if set)
func DrawModelWiresEx ¶
func DrawModelWiresEx(model Model, position Vector3, rotationAxis Vector3, rotationAngle float32, scale Vector3, tint Color)
DrawModelWiresEx : Draw a model wires (with texture if set) with extended parameters
func DrawPixelV ¶
DrawPixelV : Draw a pixel (Vector version)
func DrawRectangle ¶
DrawRectangle : Draw a color-filled rectangle
func DrawRectangleGradientEx ¶
DrawRectangleGradientEx : Draw a gradient-filled rectangle with custom vertex colors
func DrawRectangleGradientH ¶
DrawRectangleGradientH : Draw a horizontal-gradient-filled rectangle
func DrawRectangleGradientHRec ¶
DrawRectangleGradientH : Draw a horizontal-gradient-filled rectangle
func DrawRectangleGradientV ¶
DrawRectangleGradientV : Draw a vertical-gradient-filled rectangle
func DrawRectangleGradientVRec ¶
DrawRectangleGradientV : Draw a vertical-gradient-filled rectangle
func DrawRectangleLines ¶
DrawRectangleLines : Draw rectangle outline
func DrawRectangleLinesEx ¶
DrawRectangleLinesEx : Draw rectangle outline with extended parameters
func DrawRectanglePro ¶
DrawRectanglePro : Draw a color-filled rectangle with pro parameters
func DrawRectangleRec ¶
DrawRectangleRec : Draw a color-filled rectangle
func DrawRectangleRounded ¶
DrawRectangleRounded : Draw rectangle with rounded edges
func DrawRectangleRoundedLines ¶
func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments int, lineThick int, color Color)
DrawRectangleRoundedLines : Draw rectangle with rounded edges outline
func DrawRectangleV ¶
DrawRectangleV : Draw a color-filled rectangle (Vector version)
func DrawRing ¶
func DrawRing(center Vector2, innerRadius float32, outerRadius float32, startAngle int, endAngle int, segments int, color Color)
DrawRing : Draw ring
func DrawRingLines ¶
func DrawRingLines(center Vector2, innerRadius float32, outerRadius float32, startAngle int, endAngle int, segments int, color Color)
DrawRingLines : Draw ring outline
func DrawSphere ¶
DrawSphere : Draw sphere
func DrawSphereEx ¶
DrawSphereEx : Draw sphere with extended parameters
func DrawSphereWires ¶
DrawSphereWires : Draw sphere wires
func DrawTextEx ¶
func DrawTextEx(font Font, text string, position Vector2, fontSize float32, spacing float32, tint Color)
DrawTextEx : Draw text using font and additional parameters
func DrawTextRec ¶
func DrawTextRec(font Font, text string, rec Rectangle, fontSize float32, spacing float32, wordWrap bool, tint Color)
DrawTextRec : Draw text using font inside rectangle limits
func DrawTextRecEx ¶
func DrawTextRecEx(font Font, text string, rec Rectangle, fontSize float32, spacing float32, wordWrap bool, tint Color, selectStart int, selectLength int, selectText Color, selectBack Color)
DrawTextRecEx : Draw text using font inside rectangle limits with support for text selection
func DrawTexture ¶
DrawTexture : Draw a Texture2D
func DrawTextureEx ¶
func DrawTextureEx(texture Texture2D, position Vector2, rotation float32, scale float32, tint Color)
DrawTextureEx : Draw a Texture2D with extended parameters
func DrawTextureNPatch ¶
func DrawTextureNPatch(texture Texture2D, nPatchInfo NPatchInfo, destRec Rectangle, origin Vector2, rotation float32, tint Color)
DrawTextureNPatch : Draws a texture (or part of it) that stretches or shrinks nicely
func DrawTexturePro ¶
func DrawTexturePro(texture Texture2D, sourceRec Rectangle, destRec Rectangle, origin Vector2, rotation float32, tint Color)
DrawTexturePro : Draw a part of a texture defined by a rectangle with 'pro' parameters
func DrawTextureQuad ¶
DrawTextureQuad : Draw texture quad with tiling and offset parameters
func DrawTextureRec ¶
DrawTextureRec : Draw a part of a texture defined by a rectangle
func DrawTextureV ¶
DrawTextureV : Draw a Texture2D with position defined as Vector2
func DrawTriangle ¶
DrawTriangle : Draw a color-filled triangle (vertex in counter-clockwise order!)
func DrawTriangleLines ¶
DrawTriangleLines : Draw triangle outline (vertex in counter-clockwise order!)
func EndBlendMode ¶
func EndBlendMode()
EndBlendMode : End blending mode (reset to default: alpha blending)
func EndDrawing ¶
func EndDrawing()
EndDrawing : End canvas drawing and swap buffers (double buffering)
func EndMode3D ¶
func EndMode3D()
EndMode3D : Ends 3D mode and returns to default 2D orthographic mode
func EndShaderMode ¶
func EndShaderMode()
EndShaderMode : End custom shader drawing (use default shader)
func ExportImage ¶
ExportImage : Export image data to file Recommended to use image.Export(fileName) instead
func ExportImageAsCode ¶
ExportImageAsCode : Export image as code file defining an array of bytes Recommended to use image.ExportAsCode(fileName) instead
func ExportMesh ¶
ExportMesh : Export mesh data to file Recommended to use mesh.Export(fileName) instead
func ExportWave ¶
ExportWave : Export wave data to file Recommended to use wave.Export(fileName) instead
func ExportWaveAsCode ¶
ExportWaveAsCode : Export wave sample data to code (.h) Recommended to use wave.ExportAsCode(fileName) instead
func Float32frombits ¶
Float32frombits returns the floating point number corresponding to the IEEE 754 binary representation b.
func GenTextureMipmaps ¶
func GenTextureMipmaps(texture Texture2D)
GenTextureMipmaps : Generate GPU mipmaps for a texture Recommended to use texture.GenTextureMipmaps() instead
func GetClipboardText ¶
func GetClipboardText() string
GetClipboardText : Get clipboard text content
func GetDroppedFiles ¶
func GetDroppedFiles() []string
GetDroppedFiles : Get dropped files names (memory should be freed)
func GetFrameTime ¶
func GetFrameTime() float32
GetFrameTime : Returns time in seconds for last frame drawn
func GetGamepadAxisCount ¶
func GetGamepadAxisCount(gamepad GamepadNumber) int
GetGamepadAxisCount : Return gamepad axis count for a gamepad
func GetGamepadAxisMovement ¶
func GetGamepadAxisMovement(gamepad GamepadNumber, axis GamepadAxis) float32
GetGamepadAxisMovement : Return axis movement value for a gamepad axis
func GetGamepadButtonPressed ¶
func GetGamepadButtonPressed() int
GetGamepadButtonPressed : Get the last gamepad button pressed
func GetGamepadName ¶
func GetGamepadName(gamepad GamepadNumber) string
GetGamepadName : Return gamepad internal name id
func GetGestureDragAngle ¶
func GetGestureDragAngle() float32
GetGestureDragAngle : Get gesture drag angle
func GetGestureHoldDuration ¶
func GetGestureHoldDuration() float32
GetGestureHoldDuration : Get gesture hold time in milliseconds
func GetGesturePinchAngle ¶
func GetGesturePinchAngle() float32
GetGesturePinchAngle : Get gesture pinch angle
func GetGlyphIndex ¶
GetGlyphIndex : Get index position for a unicode character on font
func GetMonitorCount ¶
func GetMonitorCount() int
GetMonitorCount : Get number of connected monitors
func GetMonitorHeight ¶
GetMonitorHeight : Get primary monitor height
func GetMonitorName ¶
GetMonitorName : Get the human-readable, UTF-8 encoded name of the primary monitor
func GetMonitorPhysicalHeight ¶
GetMonitorPhysicalHeight : Get primary monitor physical height in millimetres
func GetMonitorPhysicalWidth ¶
GetMonitorPhysicalWidth : Get primary monitor physical width in millimetres
func GetMonitorWidth ¶
GetMonitorWidth : Get primary monitor width
func GetMouseWheelMove ¶
func GetMouseWheelMove() int
GetMouseWheelMove : Returns mouse wheel movement Y
func GetMusicTimeLength ¶
GetMusicTimeLength : Get music time length (in seconds) Recommended to use music.GetTimeLength() instead
func GetMusicTimePlayed ¶
GetMusicTimePlayed : Get current music time played (in seconds) Recommended to use music.GetTimePlayed() instead
func GetPixelDataSize ¶
func GetPixelDataSize(width int, height int, format PixelFormat) int
GetPixelDataSize : Get pixel data size in bytes (image or texture)
func GetRandomValue ¶
GetRandomValue : Returns a random value between min and max (both included)
func GetShaderLocation ¶
GetShaderLocation : Get shader uniform location Recommended to use shader.GetLocation(uniformName) instead
func GetSoundsPlaying ¶
func GetSoundsPlaying() int
GetSoundsPlaying : Get number of sounds playing in the multichannel
func GetTouchPointsCount ¶
func GetTouchPointsCount() int
GetTouchPointsCount : Get touch points count
func GetTouchX ¶
func GetTouchX() int
GetTouchX : Returns touch position X for touch point 0 (relative to screen size)
func GetTouchY ¶
func GetTouchY() int
GetTouchY : Returns touch position Y for touch point 0 (relative to screen size)
func GetWaveData ¶
GetWaveData : Get samples data from wave as a floats array
func GuiCheckBox ¶
GuiCheckBox : Check Box control, returns true when active
func GuiComboBox ¶
GuiComboBox : Combo Box control, returns selected item index
func GuiDropdownBox ¶
GuiDropdownBox : Dropdown Box control, returns selected item
func GuiDummyRec ¶
GuiDummyRec : Dummy control for placeholders
func GuiFade ¶
func GuiFade(alpha float32)
GuiFade : Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
func GuiGetStyle ¶
func GuiGetStyle(control GuiControl, property GuiProperty) int
GuiGetStyle : Get one style property
func GuiGroupBox ¶
GuiGroupBox : Group Box control with text name
func GuiIconText ¶
GuiIconText : Get text with icon id prepended
func GuiImageButton ¶
GuiImageButton : Image button control, returns true when clicked
func GuiImageButtonEx ¶
GuiImageButtonEx : Image button extended control, returns true when clicked
func GuiLabelButton ¶
GuiLabelButton : Label button control, show true when clicked
func GuiListView ¶
GuiListView : List View control, returns selected list item index
func GuiListViewEx ¶
func GuiListViewEx(bounds Rectangle, text []string, count int, focus int, scrollIndex int, active int) (int, int, int)
GuiListViewEx : List View with extended parameters
func GuiLoadStyleDefault ¶
func GuiLoadStyleDefault()
GuiLoadStyleDefault : Load style default over global style
func GuiMessageBox ¶
GuiMessageBox : Message Box control, displays a message
func GuiProgressBar ¶
func GuiProgressBar(bounds Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32
GuiProgressBar : Progress Bar control, shows current progress value
func GuiScrollBar ¶
GuiScrollBar : Scroll Bar control
func GuiScrollPanel ¶
GuiScrollPanel : Scroll Panel control
func GuiSetStyle ¶
func GuiSetStyle(control GuiControl, property GuiProperty, value int)
GuiSetStyle : Set one style property
func GuiSlider ¶
func GuiSlider(bounds Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32
GuiSlider : Slider control, returns selected value
func GuiSliderBar ¶
func GuiSliderBar(bounds Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32
GuiSliderBar : Slider Bar control, returns selected value
func GuiSpinner ¶
func GuiSpinner(bounds Rectangle, text string, value int, minValue int, maxValue int, editMode bool) (bool, int)
GuiSpinner : Spinner control, returns selected value
func GuiStatusBar ¶
GuiStatusBar : Status Bar control, shows info text
func GuiTextBox ¶
GuiTextBox : Text Box control, updates input text
func GuiTextBoxCopy ¶
func GuiTextBoxCopy(text string)
GuiTextBoxCopy : Copy selected text to clipboard from the active textbox (same as pressing `CTRL` + `C`)
func GuiTextBoxCut ¶
GuiTextBoxCut : Cut selected text in the active textbox and copy it to clipboard (same as pressing `CTRL` + `X`)
func GuiTextBoxDelete ¶
GuiTextBoxDelete : Deletes a character or selection before from the active textbox (depending on `before`). Returns bytes deleted.
func GuiTextBoxGetByteIndex ¶
GuiTextBoxGetByteIndex : Get the byte index for a character starting at position `from` with index `start` until position `to`.
func GuiTextBoxGetCursor ¶
func GuiTextBoxGetCursor() int
GuiTextBoxGetCursor : Get cursor position of active textbox
func GuiTextBoxIsActive ¶
GuiTextBoxIsActive : Returns true if a textbox control with specified `bounds` is the active textbox
func GuiTextBoxMulti ¶
func GuiTextBoxMulti(bounds Rectangle, text string, maxCharacters int, editMode bool) (bool, string)
GuiTextBox : Text Box control, updates input text
func GuiTextBoxPaste ¶
GuiTextBoxPaste : Paste text from clipboard into the textbox (same as pressing `CTRL` + `V`)
func GuiTextBoxSelectAll ¶
func GuiTextBoxSelectAll(text string)
GuiTextBoxSelectAll : Select all characters in the active textbox (same as pressing `CTRL` + `A`)
func GuiTextBoxSetActive ¶
func GuiTextBoxSetActive(bounds Rectangle)
GuiTextBoxSetActive : Sets the active textbox
func GuiTextBoxSetCursor ¶
func GuiTextBoxSetCursor(cursor int)
GuiTextBoxSetCursor : Set cursor position of active textbox
func GuiTextBoxSetSelection ¶
GuiTextBoxSetSelection : Set selection of active textbox
func GuiTextBoxSetState ¶
func GuiTextBoxSetState(state GuiTextBoxState)
GuiTextBoxSetState : Set state for the active textbox (state must be valid else things will break)
func GuiTextInputBox ¶
func GuiTextInputBox(bounds Rectangle, title string, message string, buttons string, text string) (int, string)
GuiTextInputBox : Text Input Box control, ask for text
func GuiToggleGroup ¶
GuiToggleGroup : Toggle Group control, returns active toggle index
func GuiValueBox ¶
func GuiValueBox(bounds Rectangle, text string, value int, minValue int, maxValue int, editMode bool) (bool, int)
GuiValueBox : Value Box control, updates input text with numbers
func GuiWindowBox ¶
GuiWindowBox : Window Box control, shows a window that can be closed
func ImageAlphaClear ¶
ImageAlphaClear : Clear alpha channel to desired color Recommended to use image.AlphaClear(color, threshold) instead
func ImageAlphaCrop ¶
ImageAlphaCrop : Crop image depending on alpha value Recommended to use image.AlphaCrop(threshold) instead
func ImageAlphaMask ¶
ImageAlphaMask : Apply alpha mask to image Recommended to use image.AlphaMask(alphaMask) instead
func ImageAlphaPremultiply ¶
func ImageAlphaPremultiply(image *Image)
ImageAlphaPremultiply : Premultiply alpha channel Recommended to use image.AlphaPremultiply() instead
func ImageColorBrightness ¶
ImageColorBrightness : Modify image color: brightness (-255 to 255) Recommended to use image.ColorBrightness(brightness) instead
func ImageColorContrast ¶
ImageColorContrast : Modify image color: contrast (-100 to 100) Recommended to use image.ColorContrast(contrast) instead
func ImageColorGrayscale ¶
func ImageColorGrayscale(image *Image)
ImageColorGrayscale : Modify image color: grayscale Recommended to use image.ColorGrayscale() instead
func ImageColorInvert ¶
func ImageColorInvert(image *Image)
ImageColorInvert : Modify image color: invert Recommended to use image.ColorInvert() instead
func ImageColorReplace ¶
ImageColorReplace : Modify image color: replace color Recommended to use image.ColorReplace(color, replace) instead
func ImageColorTint ¶
ImageColorTint : Modify image color: tint Recommended to use image.ColorTint(color) instead
func ImageCrop ¶
ImageCrop : Crop an image to a defined rectangle Recommended to use image.Crop(crop) instead
func ImageDither ¶
ImageDither : Dither image data to 16bpp or lower (Floyd-Steinberg dithering) Recommended to use image.Dither(rBpp, gBpp, bBpp, aBpp) instead
func ImageDraw ¶
ImageDraw : Draw a source image within a destination image (tint applied to source) Recommended to use dst.Draw(src, srcRec, dstRec, tint) instead
func ImageDrawRectangle ¶
ImageDrawRectangle : Draw rectangle within an image Recommended to use dst.DrawRectangle(rec, color) instead
func ImageDrawRectangleLines ¶
ImageDrawRectangleLines : Draw rectangle lines within an image Recommended to use dst.DrawRectangleLines(rec, thick, color) instead
func ImageDrawText ¶
ImageDrawText : Draw text (default font) within an image (destination) Recommended to use dst.DrawText(position, text, fontSize, color) instead
func ImageDrawTextEx ¶
func ImageDrawTextEx(dst *Image, position Vector2, font *Font, text string, fontSize float32, spacing float32, color Color)
ImageDrawTextEx : Draw text (custom sprite font) within an image (destination) Recommended to use dst.DrawTextEx(position, font, text, fontSize, spacing, color) instead
func ImageFlipHorizontal ¶
func ImageFlipHorizontal(image *Image)
ImageFlipHorizontal : Flip image horizontally Recommended to use image.FlipHorizontal() instead
func ImageFlipVertical ¶
func ImageFlipVertical(image *Image)
ImageFlipVertical : Flip image vertically Recommended to use image.FlipVertical() instead
func ImageFormat ¶
func ImageFormat(image *Image, newFormat PixelFormat)
ImageFormat : Convert image data to desired format Recommended to use image.SetFormat(newFormat) instead
func ImageMipmaps ¶
func ImageMipmaps(image *Image)
ImageMipmaps : Generate all mipmap levels for a provided image Recommended to use image.CreateMipmaps() instead
func ImageResize ¶
ImageResize : Resize image (Bicubic scaling algorithm) Recommended to use image.Resize(newWidth, newHeight) instead
func ImageResizeCanvas ¶
func ImageResizeCanvas(image *Image, newWidth int, newHeight int, offsetX int, offsetY int, color Color)
ImageResizeCanvas : Resize canvas and fill with color Recommended to use image.ResizeCanvas(newWidth, newHeight, offsetX, offsetY, color) instead
func ImageResizeNN ¶
ImageResizeNN : Resize image (Nearest-Neighbor scaling algorithm) Recommended to use image.ResizeNN(newWidth, newHeight) instead
func ImageRotateCCW ¶
func ImageRotateCCW(image *Image)
ImageRotateCCW : Rotate image counter-clockwise 90deg Recommended to use image.RotateCCW() instead
func ImageRotateCW ¶
func ImageRotateCW(image *Image)
ImageRotateCW : Rotate image clockwise 90deg Recommended to use image.RotateCW() instead
func ImageToPOT ¶
ImageToPOT : Convert image to POT (power-of-two) Recommended to use image.ToPOT(fillColor) instead
func InitVrSimulator ¶
func InitVrSimulator()
InitVrSimulator : Init VR simulator for selected device parameters
func InitWindow ¶
InitWindow : Initialize window and OpenGL context
func IsAudioDeviceReady ¶
func IsAudioDeviceReady() bool
IsAudioDeviceReady : Check if audio device has been initialized successfully
func IsAudioStreamPlaying ¶
func IsAudioStreamPlaying(stream *AudioStream) bool
IsAudioStreamPlaying : Check if audio stream is playing Recommended to use stream.IsPlaying() instead
func IsAudioStreamProcessed ¶
func IsAudioStreamProcessed(stream *AudioStream) bool
IsAudioStreamProcessed : Check if any audio stream buffers requires refill Recommended to use stream.IsProcessed() instead
func IsFileDropped ¶
func IsFileDropped() bool
IsFileDropped : Check if a file has been dropped into window
func IsGamepadAvailable ¶
func IsGamepadAvailable(gamepad GamepadNumber) bool
IsGamepadAvailable : Detect if a gamepad is available
func IsGamepadButtonDown ¶
func IsGamepadButtonDown(gamepad GamepadNumber, button GamepadButton) bool
IsGamepadButtonDown : Detect if a gamepad button is being pressed
func IsGamepadButtonPressed ¶
func IsGamepadButtonPressed(gamepad GamepadNumber, button GamepadButton) bool
IsGamepadButtonPressed : Detect if a gamepad button has been pressed once
func IsGamepadButtonReleased ¶
func IsGamepadButtonReleased(gamepad GamepadNumber, button GamepadButton) bool
IsGamepadButtonReleased : Detect if a gamepad button has been released once
func IsGamepadButtonUp ¶
func IsGamepadButtonUp(gamepad GamepadNumber, button GamepadButton) bool
IsGamepadButtonUp : Detect if a gamepad button is NOT being pressed
func IsGamepadName ¶
func IsGamepadName(gamepad GamepadNumber, name string) bool
IsGamepadName : Check gamepad name (if available)
func IsGestureDetected ¶
func IsGestureDetected(gesture GestureType) bool
IsGestureDetected : Check if a gesture have been detected
func IsKeyPressed ¶
IsKeyPressed : Detect if a key has been pressed once
func IsKeyReleased ¶
IsKeyReleased : Detect if a key has been released once
func IsModelAnimationValid ¶
func IsModelAnimationValid(model *Model, anim *ModelAnimation) bool
IsModelAnimationValid : Check model animation skeleton match Recommended to use model.IsAnimationValid(anim) instead
func IsMouseButtonDown ¶
func IsMouseButtonDown(button MouseButton) bool
IsMouseButtonDown : Detect if a mouse button is being pressed
func IsMouseButtonPressed ¶
func IsMouseButtonPressed(button MouseButton) bool
IsMouseButtonPressed : Detect if a mouse button has been pressed once
func IsMouseButtonReleased ¶
func IsMouseButtonReleased(button MouseButton) bool
IsMouseButtonReleased : Detect if a mouse button has been released once
func IsMouseButtonUp ¶
func IsMouseButtonUp(button MouseButton) bool
IsMouseButtonUp : Detect if a mouse button is NOT being pressed
func IsMusicPlaying ¶
IsMusicPlaying : Check if music is playing Recommended to use music.IsPlaying() instead
func IsSoundPlaying ¶
IsSoundPlaying : Check if a sound is currently playing Recommended to use sound.IsPlaying() instead
func IsVrSimulatorReady ¶
func IsVrSimulatorReady() bool
IsVrSimulatorReady : Detect if VR simulator is ready
func IsWindowHidden ¶
func IsWindowHidden() bool
IsWindowHidden : Check if window is currently hidden
func IsWindowMinimized ¶
func IsWindowMinimized() bool
IsWindowMinimized : Check if window has been minimized (or lost focus)
func IsWindowReady ¶
func IsWindowReady() bool
IsWindowReady : Check if window has been initialized successfully
func IsWindowResized ¶
func IsWindowResized() bool
IsWindowResized : Check if window has been resized
func MeasureText ¶
MeasureText : Measure string width for default font
func MeshBinormals ¶
func MeshBinormals(mesh *Mesh)
MeshBinormals : Compute mesh binormals Recommended to use mesh.ComputeBinormals() instead
func MeshTangents ¶
func MeshTangents(mesh *Mesh)
MeshTangents : Compute mesh tangents Recommended to use mesh.ComputeTangents() instead
func NaN32 ¶
func NaN32() float32
NaN32 returns an IEEE 754 “not-a-number” value. Source: https://github.com/chewxy/math32/blob/9a000fcb79dff2019bd78fc28bd676198ff3a616/bits.go
func PauseAudioStream ¶
func PauseAudioStream(stream *AudioStream)
PauseAudioStream : Pause audio stream Recommended to use stream.Pause() instead
func PauseMusicStream ¶
func PauseMusicStream(music *Music)
PauseMusicStream : Pause music playing Recommended to use music.PauseStream() instead
func PauseSound ¶
func PauseSound(sound *Sound)
PauseSound : Pause a sound Recommended to use sound.Pause() instead
func PlayAudioStream ¶
func PlayAudioStream(stream *AudioStream)
PlayAudioStream : Play audio stream Recommended to use stream.Play() instead
func PlayMusicStream ¶
func PlayMusicStream(music *Music)
PlayMusicStream : Start music playing Recommended to use music.PlayStream() instead
func PlaySound ¶
func PlaySound(sound *Sound)
PlaySound : Play a sound Recommended to use sound.Play() instead
func PlaySoundMulti ¶
func PlaySoundMulti(sound *Sound)
PlaySoundMulti : Play a sound (using multichannel buffer pool) Recommended to use sound.PlayMulti() instead
func RegisterUnloadable ¶
func RegisterUnloadable(unloadable Unloadable)
RegisterUnloadable registers an unloadable to the slice This is called on Load functions
func ReportGlErrors ¶
func ReportGlErrors()
func ResumeAudioStream ¶
func ResumeAudioStream(stream *AudioStream)
ResumeAudioStream : Resume audio stream Recommended to use stream.Resume() instead
func ResumeMusicStream ¶
func ResumeMusicStream(music *Music)
ResumeMusicStream : Resume playing paused music Recommended to use music.ResumeStream() instead
func ResumeSound ¶
func ResumeSound(sound *Sound)
ResumeSound : Resume a paused sound Recommended to use sound.Resume() instead
func SetAudioStreamPitch ¶
func SetAudioStreamPitch(stream *AudioStream, pitch float32)
SetAudioStreamPitch : Set pitch for audio stream (1.0 is base level) Recommended to use stream.SetPitch(pitch) instead
func SetAudioStreamVolume ¶
func SetAudioStreamVolume(stream *AudioStream, volume float32)
SetAudioStreamVolume : Set volume for audio stream (1.0 is max level) Recommended to use stream.SetVolume(volume) instead
func SetCameraAltControl ¶
func SetCameraAltControl(altKey Key)
SetCameraAltControl : Set camera alt key to combine with mouse movement (free camera)
func SetCameraMode ¶
func SetCameraMode(camera *Camera, mode CameraMode)
SetCameraMode : Set camera mode (multiple camera modes available) Recommended to use camera.SetMode(mode) instead
func SetCameraMoveControls ¶
func SetCameraMoveControls(frontKey Key, backKey Key, rightKey Key, leftKey Key, upKey Key, downKey Key)
SetCameraMoveControls : Set camera move controls (1st person and 3rd person cameras)
func SetCameraPanControl ¶
func SetCameraPanControl(panKey Key)
SetCameraPanControl : Set camera pan key to combine with mouse movement (free camera)
func SetCameraSmoothZoomControl ¶
func SetCameraSmoothZoomControl(szKey Key)
SetCameraSmoothZoomControl : Set camera smooth zoom key to combine with mouse (free camera)
func SetClipboardText ¶
func SetClipboardText(text string)
SetClipboardText : Set clipboard text content
func SetConfigFlags ¶
func SetConfigFlags(flags uint32)
SetConfigFlags : Setup window configuration flags (view FLAGS)
func SetExitKey ¶
func SetExitKey(key Key)
SetExitKey : Set a custom key to exit program (default is ESC)
func SetGesturesEnabled ¶
func SetGesturesEnabled(gestureFlags uint32)
SetGesturesEnabled : Enable a set of gestures using flags
func SetMasterVolume ¶
func SetMasterVolume(volume float32)
SetMasterVolume : Set master volume (listener)
func SetMaterialTexture ¶
func SetMaterialTexture(material *Material, mapType MaterialMapType, texture Texture2D)
SetMaterialTexture : Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) Recommended to use material.SetTexture(mapType, texture) instead
func SetMatrixModelview ¶
func SetMatrixModelview(view Matrix)
SetMatrixModelview : Set a custom modelview matrix (replaces internal modelview matrix)
func SetMatrixProjection ¶
func SetMatrixProjection(proj Matrix)
SetMatrixProjection : Set a custom projection matrix (replaces internal projection matrix)
func SetModelMeshMaterial ¶
SetModelMeshMaterial : Set material for a mesh Recommended to use model.SetMeshMaterial(meshId, materialId) instead
func SetMouseOffset ¶
SetMouseOffset : Set mouse offset
func SetMousePosition ¶
SetMousePosition : Set mouse position XY
func SetMouseScale ¶
SetMouseScale : Set mouse scaling
func SetMusicLoopCount ¶
SetMusicLoopCount : Set music loop count (loop repeats) Recommended to use music.SetLoopCount(count) instead
func SetMusicPitch ¶
SetMusicPitch : Set pitch for a music (1.0 is base level) Recommended to use music.SetPitch(pitch) instead
func SetMusicVolume ¶
SetMusicVolume : Set volume for music (1.0 is max level) Recommended to use music.SetVolume(volume) instead
func SetShaderValueFloat32 ¶
func SetShaderValueFloat32(shader *Shader, uniformLoc int, value []float32, uniformType ShaderUniformDataType)
SetShaderValueFloat32 : Set shader uniform value Recommended to use shader.SetValueFloat32(uniformLoc, value, uniformType) instead
func SetShaderValueFloat32V ¶
func SetShaderValueFloat32V(shader *Shader, uniformLoc int, values []float32, uniformType ShaderUniformDataType)
SetShaderValueFloat32V : Sets a float vector (array) of uniform values Recommended to use shader.SetValueFloat32V(uniformLoc, value, uniformType) instead
func SetShaderValueInt32 ¶
func SetShaderValueInt32(shader *Shader, uniformLoc int, value []int32, uniformType ShaderUniformDataType)
SetShaderValueInt32 : Set shader uniform value Recommended to use shader.SetValueInt32(uniformLoc, value, uniformType) instead
func SetShaderValueInt32V ¶
func SetShaderValueInt32V(shader *Shader, uniformLoc int, values []int32, uniformType ShaderUniformDataType)
SetShaderValueInt32V : Sets a vector (array) of uniform values Recommended to use shader.SetValueInt32V(uniformLoc, value, uniformType) instead
func SetShaderValueMatrix ¶
SetShaderValueMatrix : Set shader uniform value (matrix 4x4) Recommended to use shader.SetValueMatrix(uniformLoc, mat) instead
func SetShaderValueTexture ¶
SetShaderValueTexture : Set shader uniform value for texture Recommended to use shader.SetValueTexture(uniformLoc, texture) instead
func SetShapesTexture ¶
SetShapesTexture : Define default texture used to draw shapes
func SetSoundPitch ¶
SetSoundPitch : Set pitch for a sound (1.0 is base level) Recommended to use sound.SetPitch(pitch) instead
func SetSoundVolume ¶
SetSoundVolume : Set volume for a sound (1.0 is max level) Recommended to use sound.SetVolume(volume) instead
func SetTextureFilter ¶
func SetTextureFilter(texture Texture2D, filterMode TextureFilterMode)
SetTextureFilter : Set texture scaling filter mode Recommended to use texture.SetTextureFilter(filterMode) instead
func SetTextureWrap ¶
func SetTextureWrap(texture *Texture2D, wrapMode TextureWrapMode)
SetTextureWrap : Set texture wrapping mode Recommended to use texture.SetWrap(wrapMode) instead
func SetTraceLogCallback ¶
func SetTraceLogCallback(callback func(logType TraceLogType, text string))
SetTraceLogCallback : Set the callback for custom logging.
func SetTraceLogExit ¶
func SetTraceLogExit(logType TraceLogType)
SetTraceLogExit : Set the exit threshold (minimum) log level Set to NONE to disable this. (none is above all log levels).
func SetTraceLogLevel ¶
func SetTraceLogLevel(logType TraceLogType)
SetTraceLogLevel : Set the current threshold (minimum) log level
func SetVrConfiguration ¶
func SetVrConfiguration(info VrDeviceInfo, distortion Shader)
SetVrConfiguration : Set stereo rendering configuration parameters
func SetWindowIcon ¶
func SetWindowIcon(image Image)
SetWindowIcon : Set icon for window (only PLATFORM_DESKTOP)
func SetWindowMinSize ¶
SetWindowMinSize : Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
func SetWindowMonitor ¶
func SetWindowMonitor(monitor int)
SetWindowMonitor : Set monitor for the current window (fullscreen mode)
func SetWindowPosition ¶
SetWindowPosition : Set window position on screen (only PLATFORM_DESKTOP)
func SetWindowSize ¶
SetWindowSize : Set window dimensions
func SetWindowTitle ¶
func SetWindowTitle(title string)
SetWindowTitle : Set title for window (only PLATFORM_DESKTOP)
func StopAudioStream ¶
func StopAudioStream(stream *AudioStream)
StopAudioStream : Stop audio stream Recommended to use stream.Stop() instead
func StopMusicStream ¶
func StopMusicStream(music *Music)
StopMusicStream : Stop music playing Recommended to use music.StopStream() instead
func StopSound ¶
func StopSound(sound *Sound)
StopSound : Stop playing a sound Recommended to use sound.Stop() instead
func StopSoundMulti ¶
func StopSoundMulti()
StopSoundMulti : Stop any sound playing (using multichannel buffer pool)
func StorageLoadValue ¶
StorageLoadValue : Load integer value from storage file (from defined position)
func StorageSaveValue ¶
StorageSaveValue : Save integer value to storage file (to defined position)
func TakeScreenshot ¶
func TakeScreenshot(fileName string)
SetTraceLogCallback is in trace.go TakeScreenshot : Takes a screenshot of current screen (saved a .png)
func ToggleFullscreen ¶
func ToggleFullscreen()
ToggleFullscreen : Toggle fullscreen mode (only PLATFORM_DESKTOP)
func TraceLog ¶
func TraceLog(logType TraceLogType, a ...interface{})
TraceLog creates a new log with a particular type. If a custom callback for logs is set, then it will directly invoke it, avoiding the raylib function.
func UnloadAll ¶
func UnloadAll()
UnloadAll clears all unloadables that have been recorded. NOTE: Not everything maybe included in this list and it is experimental feature.
Please unload these objects when you are not using them anyways.
func UnloadFont ¶
func UnloadFont(font *Font)
UnloadFont : Unload Font from GPU memory (VRAM) Recommended to use font.Unload() instead
func UnloadImage ¶
func UnloadImage(image *Image)
UnloadImage : Unload image from CPU memory (RAM) Recommended to use image.Unload() instead
func UnloadMaterial ¶
func UnloadMaterial(material *Material)
UnloadMaterial : Unload material from GPU memory (VRAM) Recommended to use material.Unload() instead
func UnloadMesh ¶
func UnloadMesh(mesh *Mesh)
UnloadMesh : Unload mesh from memory (RAM and/or VRAM) Recommended to use mesh.Unload() instead
func UnloadModel ¶
func UnloadModel(model *Model)
UnloadModel : Unload model from memory (RAM and/or VRAM) Recommended to use model.Unload() instead
func UnloadModelAnimation ¶
func UnloadModelAnimation(anim *ModelAnimation)
UnloadModelAnimation : Unload animation data Recommended to use anim.Unload() instead
func UnloadMusicStream ¶
func UnloadMusicStream(music *Music)
UnloadMusicStream : Unload music stream
func UnloadRenderTexture ¶
func UnloadRenderTexture(target RenderTexture2D)
UnloadRenderTexture : Unload render texture from GPU memory (VRAM) Recommended to use target.Unload() instead
func UnloadShader ¶
func UnloadShader(shader Shader)
UnloadShader : Unload shader from GPU memory (VRAM) Recommended to use shader.Unload() instead
func UnloadSound ¶
func UnloadSound(sound *Sound)
UnloadSound : Unload sound Recommended to use sound.Unload() instead
func UnloadTexture ¶
func UnloadTexture(texture Texture2D)
UnloadTexture : Unload texture from GPU memory (VRAM) Recommended to use texture.Unload() instead
func UnloadWave ¶
func UnloadWave(wave *Wave)
UnloadWave : Unload wave data Recommended to use wave.Unload() instead
func UnregisterUnloadable ¶
func UnregisterUnloadable(unloadable Unloadable)
UnregisterUnloadable unregisters an unloadable to the slice This is called on Unload functions This does not remove from the slice if unloadingAll is true (as that will clear post)
func UpdateAudioStream ¶
func UpdateAudioStream(stream *AudioStream, data []float32, samplesCount int)
UpdateSound : Update audio stream buffers with data Recommended to use stream.Update(data, samplesCount) instead
func UpdateCamera ¶
func UpdateCamera(camera *Camera)
UpdateCamera : Update camera position for selected mode Recommended to use camera.Update() instead
func UpdateModelAnimation ¶
func UpdateModelAnimation(model *Model, anim *ModelAnimation, frame int)
UpdateModelAnimation : Update model animation pose Recommended to use model.UpdateAnimation(anim, frame) instead
func UpdateMusicStream ¶
func UpdateMusicStream(music *Music)
UpdateMusicStream : Updates buffers for music streaming Recommended to use music.UpdateStream() instead
func UpdateSound ¶
UpdateSound : Update sound buffer with new data Recommended to use sound.Update(data, samplesCount) instead
func UpdateTexture ¶
UpdateTexture : Update GPU texture with new data Recommended to use texture.UpdateTexture(pixels) instead
func UpdateVrTracking ¶
func UpdateVrTracking(camera *Camera)
UpdateVrTracking : Update VR tracking (position and orientation) and camera
func WaveCrop ¶
WaveCrop : Crop a wave to defined samples range Recommended to use wave.Crop(initSample, finalSample) instead
func WaveFormat ¶
WaveFormat : Convert wave data to desired format Recommended to use wave.Format(sampleRate, sampleSize, channels) instead
func WindowShouldClose ¶
func WindowShouldClose() bool
WindowShouldClose : Check if KEY_ESCAPE pressed or Close icon pressed
Types ¶
type AudioStream ¶
type AudioStream struct { SampleRate uint32 SampleSize uint32 Channels uint32 Buffer unsafe.Pointer }
AudioStream can be used to create custom audio streams. Note that Buffer is an unsafe.Pointer and is a C stream.
func InitAudioStream ¶
func InitAudioStream(sampleRate uint32, sampleSize uint32, channels uint32) *AudioStream
InitAudioStream : Init audio stream (to stream raw audio pcm data)
func (*AudioStream) IsPlaying ¶
func (stream *AudioStream) IsPlaying() bool
IsPlaying : Check if audio stream is playing
func (*AudioStream) IsProcessed ¶
func (stream *AudioStream) IsProcessed() bool
IsProcessed : Check if any audio stream buffers requires refill
func (*AudioStream) IsValid ¶
func (as *AudioStream) IsValid() bool
IsValid returns true the audio has channels
func (*AudioStream) SetPitch ¶
func (stream *AudioStream) SetPitch(pitch float32)
SetPitch : Set pitch for audio stream (1.0 is base level)
func (*AudioStream) SetVolume ¶
func (stream *AudioStream) SetVolume(volume float32)
SetVolume : Set volume for audio stream (1.0 is max level)
func (*AudioStream) Unload ¶
func (stream *AudioStream) Unload()
Unload : Close audio stream and free memory
func (*AudioStream) Update ¶
func (stream *AudioStream) Update(data []float32, samplesCount int)
Update : Update audio stream buffers with data
type BoundingBox ¶
func MeshBoundingBox ¶
func MeshBoundingBox(mesh *Mesh) BoundingBox
MeshBoundingBox : Compute mesh bounding box limits Recommended to use mesh.BoundingBox() instead
func NewBoundingBox ¶
func NewBoundingBox(min, max Vector3) BoundingBox
NewBoundingBox - Returns new BoundingBox
func (BoundingBox) Center ¶
func (bb BoundingBox) Center() Vector3
Center gets the center position of the bounding box
func (BoundingBox) Size ¶
func (bb BoundingBox) Size() Vector3
Size gets the size of the bounding box
type Camera ¶
type Camera Camera3D
Camera is a fallback, defaults to Camera3D
func NewCamera ¶
func NewCamera(position, target, up Vector3, fovy float32, cameraType CameraType) Camera
NewCamera creates a new camera
func (*Camera) SetMode ¶
func (camera *Camera) SetMode(mode CameraMode)
SetMode : Set camera mode (multiple camera modes available)
func (*Camera) ToCamera3D ¶
type Camera3D ¶
type Camera3D struct { Position Vector3 Target Vector3 Up Vector3 FOVY float32 Type CameraType }
Camera3D defines a camera in 3D space
type CameraMode ¶
type CameraMode int32
const ( CameraCustom CameraMode = iota CameraFree CameraOrbital CameraFirstPerson CameraThirdPerson )
type CameraType ¶
type CameraType int32
const ( CameraTypePerspective CameraType = iota CameraTypeOrthographic )
type Color ¶
Color type, RGBA (32bit)
func ColorFromHSV ¶
ColorFromHSV : Returns a Color from HSV values
func GetImageData ¶
GetImageData : Get pixel data from image as a Color slice Recommended to use image.GetPixels instead.
func GuiColorPicker ¶
GuiColorPicker : Color Picker control
func ImageExtractPalette ¶
ImageExtractPalette : Extract color palette from image to maximum size (memory should be freed) Recommended to use image.ExtractPalette(maxPaletteSize) instead
func NewColorFromHSV ¶
NewColorFromHSV turns a HSV to a colour
func NewColorFromNormalized ¶
NewColorFromNormalized creates a colour from the normalized value [0..1]
func NewColorInt ¶
NewColorInt creates a colour from a hexadecimal int
func (Color) LerpHSV ¶
LerpHSV will lerp the color towards another, using their calculated HSV to do so. Note it is more efficient to store the calculated HSV of each and lerp between them
type CubemapLayoutType ¶
type CubemapLayoutType int32
const ( //CubmapAutoDetect automatically detect layout type CubmapAutoDetect CubemapLayoutType = iota //CubemapLineVertical Layout is defined by a vertical line with faces CubemapLineVertical //CubemapLineHorizontal Layout is defined by an horizontal line with faces CubemapLineHorizontal //CubemapCrossThreeByFour Layout is defined by a 3x4 cross with cubemap faces CubemapCrossThreeByFour //CubemapCrossFourByThree Layout is defined by a 4x3 cross with cubemap faces CubemapCrossFourByThree //CubemapPanorama Layout is defined by a panorama image (equirectangular map) CubemapPanorama )
type Font ¶
type Font struct { BaseSize int32 CharCount int32 Texture Texture2D Chars []CharInfo Recs *Rectangle }
func LoadFontEx ¶
LoadFontEx : Load font from file with extended parameters
func LoadFontFromImage ¶
LoadFontFromImage : Load font from Image (XNA style)
type GamepadAxis ¶
type GamepadAxis int32
const ( GamepadAxisUnkown GamepadAxis = iota GamepadAxisLeftX GamepadAxisLeftY GamepadAxisRightX GamepadAxisRightY GamepadAxisLeftTrigger GamepadAxisRightTrigger )
type GamepadButton ¶
type GamepadButton int32
const ( GamepadButtonUnkown GamepadButton = iota GamepadButtonLeftFaceUp GamepadButtonLeftFaceRight GamepadButtonLeftFaceDown GamepadButtonLeftFaceLeft GamepadButtonRightFaceUp GamepadButtonRightFaceRight GamepadButtonRightFaceDown GamepadButtonRightFaceLeft GamepadButtonLeftTrigger1 GamepadButtonLeftTrigger2 GamepadButtonRightTrigger1 GamepadButtonRightTrigger2 GamepadButtonMiddleLeft GamepadButtonMiddle GamepadButtonMiddleRight GamepadButtonLeftThumb GamepadButtonRightThumb )
type GamepadNumber ¶
type GamepadNumber int32
const ( GamepadPlayer1 GamepadNumber = iota GamepadPlayer2 GamepadPlayer3 GamepadPlayer4 )
type GestureType ¶
type GestureType int32
const ( GestureNone GestureType = 1 << iota GestureTap GestureDoubleTap GestureHold GestureDrag GestureSwipeRight GestureSwipeLeft GestureSwipeUp GestureSwipeDown GesturePinchIn GesturePinchOut )
func GetGestureDetected ¶
func GetGestureDetected() GestureType
GetGestureDetected : Get latest detected gesture
type GuiControl ¶
type GuiControl int32
GuiControl the ID of a control
const ( GuiControlDefault GuiControl = iota GuiControlLabel GuiControlButton GuiControlToggle GuiControlSlider GuiControlProgressBar GuiControlCheckBox GuiControlComboBox GuiControlDropDownBox GuiControlTextBox GuiControlValueBox GuiControlSpinner GuiControlListView GuiControlColorPicker GuiControlScrollBar GuiControlStatusBar )
type GuiProperty ¶
type GuiProperty int32
GuiProperty the property of a control
const ( GuiPropertyBorderColorNormal GuiProperty = iota GuiPropertyBaseColorNormal GuiPropertyTextColorNormal GuiPropertyBorderColorFocused GuiPropertyTextSize = 16 GuiPropertyTextSpacing = 17 )
type GuiTextBoxState ¶
GuiTextBoxState keeps the state of active textboxes
func GuiTextBoxGetState ¶
func GuiTextBoxGetState() GuiTextBoxState
GuiTextBoxGetState : Get state for the active textbox
type Image ¶
type Image struct { // Image base width Width int32 // Image base height Height int32 // Mipmap levels, 1 by default Mipmaps int32 // Data format (PixelFormat) Format PixelFormat // contains filtered or unexported fields }
Image type, bpp always RGBA (32bit) NOTE: Data stored in CPU memory (RAM) Source: https://github.com/gen2brain/raylib-go/blob/master/raylib/raylib.go
func GenImageCellular ¶
GenImageCellular : Generate image: cellular algorithm. Bigger tileSize means bigger cells
func GenImageChecked ¶
func GenImageChecked(width int, height int, checksX int, checksY int, col1 Color, col2 Color) *Image
GenImageChecked : Generate image: checked
func GenImageColor ¶
GenImageColor : Generate image: plain color
func GenImageGradientH ¶
GenImageGradientH : Generate image: horizontal gradient
func GenImageGradientRadial ¶
func GenImageGradientRadial(width int, height int, density float32, inner Color, outer Color) *Image
GenImageGradientRadial : Generate image: radial gradient
func GenImageGradientV ¶
GenImageGradientV : Generate image: vertical gradient
func GenImagePerlinNoise ¶
GenImagePerlinNoise : Generate image: perlin noise
func GenImageWhiteNoise ¶
GenImageWhiteNoise : Generate image: white noise
func GetScreenData ¶
func GetScreenData() *Image
GetScreenData : Get pixel data from screen buffer and return an Image (screenshot)
func GetTextureData ¶
GetTextureData : Get pixel data from GPU texture and return an Image Recommended to use texture.GetTextureData() instead
func ImageCopy ¶
ImageCopy : Create an image duplicate (useful for transformations) Recommended to use image.Copy() instead
func ImageFromImage ¶
ImageFromImage : Create an image from another image piece Recommended to use image.(rec) instead
func ImageTextEx ¶
ImageTextEx : Create an image from text (custom sprite font)
func LoadImageEx ¶
LoadImageEx Load image data from Color array data (RGBA - 32bit)
func LoadImageFromGo ¶
LoadImageFromGo Creates a new image from a Go Image
func LoadImagePro ¶
func LoadImagePro(pixels []byte, width, height int32, format PixelFormat) *Image
LoadImagePro loads raw data wtih parameters
func LoadImageRaw ¶
LoadImageRaw : Load image from RAW file data
func (*Image) AlphaClear ¶
AlphaClear : Clear alpha channel to desired color
func (*Image) AlphaPremultiply ¶
func (image *Image) AlphaPremultiply()
AlphaPremultiply : Premultiply alpha channel
func (*Image) ColorBrightness ¶
ColorBrightness : Modify image color: brightness (-255 to 255)
func (*Image) ColorContrast ¶
ColorContrast : Modify image color: contrast (-100 to 100)
func (*Image) ColorGrayscale ¶
func (image *Image) ColorGrayscale()
ColorGrayscale : Modify image color: grayscale
func (*Image) ColorInvert ¶
func (image *Image) ColorInvert()
ColorInvert : Modify image color: invert
func (*Image) ColorReplace ¶
ColorReplace : Modify image color: replace color
func (*Image) CreateMipmaps ¶
func (image *Image) CreateMipmaps()
CreateMipmaps : Generate all mipmap levels for a provided image
func (*Image) DrawRectangle ¶
DrawRectangle : Draw rectangle within an image
func (*Image) DrawRectangleLines ¶
DrawRectangleLines : Draw rectangle lines within an image
func (*Image) DrawTextEx ¶
func (dst *Image) DrawTextEx(position Vector2, font *Font, text string, fontSize float32, spacing float32, color Color)
DrawTextEx : Draw text (custom sprite font) within an image (destination)
func (*Image) ExportAsCode ¶
ExportAsCode : Export image as code file defining an array of bytes
func (*Image) ExtractPalette ¶
ExtractPalette : Extract color palette from image to maximum size
func (*Image) FlipHorizontal ¶
func (image *Image) FlipHorizontal()
FlipHorizontal : Flip image horizontally
func (*Image) FlipVertical ¶
func (image *Image) FlipVertical()
FlipVertical : Flip image vertically
func (*Image) GenMeshCubicmap ¶
GenMeshCubicmap : Generate cubes-based map mesh from image data
func (*Image) GenMeshHeightmap ¶
GenMeshHeightmap : Generate heightmap mesh from image data
func (*Image) GetAlphaBorder ¶
GetAlphaBorder : Get image alpha border rectangle
func (*Image) GetPixelsNormalized ¶
GetPixelsNormalized returns the pixel data from an image as a colour slice.
func (*Image) ResizeCanvas ¶
func (image *Image) ResizeCanvas(newWidth int, newHeight int, offsetX int, offsetY int, color Color)
ResizeCanvas : Resize canvas and fill with color
func (*Image) RotateCCW ¶
func (image *Image) RotateCCW()
RotateCCW : Rotate image counter-clockwise 90deg
func (*Image) SetFormat ¶
func (image *Image) SetFormat(newFormat PixelFormat)
Format : Convert image data to desired format
type Material ¶
type Material struct { Shader Shader Maps *[MaxMaterialMaps]MaterialMap Params *[MaxMaterialParams]float32 }
func LoadMaterialDefault ¶
func LoadMaterialDefault() *Material
LoadMaterialDefault : Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
func (*Material) SetTexture ¶
func (material *Material) SetTexture(mapType MaterialMapType, texture Texture2D)
SetTexture : Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
type MaterialMap ¶
type MaterialMapType ¶
type MaterialMapType int32
const ( MapAlbedo MaterialMapType = iota MapMetalness MapNormal MapRoughness MapOcclusion MapEmission MapHeight MapCubemap MapIrradiance MapPrefilter MapBRDF )
type Matrix ¶
type Matrix struct { M0 float32 M1 float32 M2 float32 M3 float32 M4 float32 M5 float32 M6 float32 M7 float32 M8 float32 M9 float32 M10 float32 M11 float32 M12 float32 M13 float32 M14 float32 M15 float32 }
Matrix A representation of a 4 x 4 matrix
func GetCameraMatrix ¶
GetCameraMatrix : Returns camera transform matrix (view matrix)
func GetCameraMatrix2D ¶
GetCameraMatrix2D : Returns camera 2d transform matrix
func GetMatrixModelview ¶
func GetMatrixModelview() Matrix
GetMatrixModelview : Get internal modelview matrix
func GetMatrixProjection ¶
func GetMatrixProjection() Matrix
GetMatrixProjection : Get internal projection matrix
func NewMatrixFromQuaternion ¶
func NewMatrixFromQuaternion(q Quaternion) Matrix
NewMatrixFromQuaternion creates a new rotation matrix from a quaternion
func NewMatrixFrustum ¶
NewMatrixFrustum creates a new perspective projection matrix
func NewMatrixLookAt ¶
NewMatrixLookAt creates a matrix to look at a target
func NewMatrixOrtho ¶
NewMatrixOrtho creates a orthographic projection
func NewMatrixPerspective ¶
NewMatrixPerspective creates a perspective projection matrix. Angles should be provided in radians
func NewMatrixRotate ¶
NewMatrixRotate creates a rotation matrix based of the acis and radians
func NewMatrixRotateX ¶
NewMatrixRotateX creates a new matrix that is rotated
func NewMatrixRotateXYZ ¶
NewMatrixRotateXYZ new xyz-rotation matrix (in radians)
func NewMatrixRotateY ¶
NewMatrixRotateY creates a new matrix that is rotated
func NewMatrixRotateZ ¶
NewMatrixRotateZ creates a new matrix that is rotated
func NewMatrixScale ¶
NewMatrixScale creates a new scalling matrix
func NewMatrixTranslate ¶
NewMatrixTranslate creates a blank translation matrix
func (Matrix) ToQuaternion ¶
func (m Matrix) ToQuaternion() Quaternion
ToQuaternion turns the rotation matrix into a Quaternion. Alias of newQuaternionFromMatrix
type Mesh ¶
type Mesh struct { // Number of vertices stored in arrays VertexCount int32 // Number of triangles stored (indexed or not) TriangleCount int32 // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) Vertices *[MaxMeshVertices]Vector3 // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) Texcoords *[MaxMeshTexCoords]Vector2 // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5) Texcoords2 *[MaxMeshTexCoords]Vector2 // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) Normals *[MaxMeshVertices]Vector3 // Vertex tangents (XYZ - 3 components per vertex) (shader-location = 4) Tangents *[MaxMeshVertices]Vector3 // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) Colors *[MaxMeshVertices]Color // Vertex indices (in case vertex data comes indexed) Indices *[MaxMeshIndices]uint16 AnimVertices *[MaxMeshAnimatedVertices]Vector3 AnimNormals *[MaxMeshAnimatedVertices]Vector3 BoneIds *[MaxMeshBones]int32 BoneWeights *[MaxMeshBones]float32 // OpenGL Vertex Array Object id VaoID uint32 // OpenGL Vertex Buffer Objects id (7 types of vertex data) VboID unsafe.Pointer }
Mesh is vertex data that is stored in CPU and GPU memory. Note that the values are pointing to C memory
func GenMeshCube ¶
GenMeshCube : Generate cuboid mesh
func GenMeshCubicmap ¶
GenMeshCubicmap : Generate cubes-based map mesh from image data Recommended to use cubicmap.GenMeshCubicmap(cubeSize) instead
func GenMeshCylinder ¶
GenMeshCylinder : Generate cylinder mesh
func GenMeshHeightmap ¶
GenMeshHeightmap : Generate heightmap mesh from image data Recommended to use heightmap.GenMeshHeightmap(size) instead
func GenMeshHemiSphere ¶
GenMeshHemiSphere : Generate half-sphere mesh (no bottom cap)
func GenMeshKnot ¶
GenMeshKnot : Generate trefoil knot mesh
func GenMeshPlane ¶
GenMeshPlane : Generate plane mesh (with subdivisions)
func GenMeshPoly ¶
GenMeshPoly : Generate polygonal mesh
func GenMeshSphere ¶
GenMeshSphere : Generate sphere mesh (standard sphere)
func GenMeshTorus ¶
GenMeshTorus : Generate torus mesh
func (*Mesh) BoundingBox ¶
func (mesh *Mesh) BoundingBox() BoundingBox
BoundingBox : Compute mesh bounding box limits
func (*Mesh) ComputeBinormals ¶
func (mesh *Mesh) ComputeBinormals()
ComputeBinormals : Compute mesh binormals
func (*Mesh) ComputeTangents ¶
func (mesh *Mesh) ComputeTangents()
ComputeTangents : Compute mesh tangents
type Model ¶
type Model struct { Transform Matrix MeshCount int32 Meshes *[MaxModelMeshes]Mesh MaterialCount int32 Materials *[MaxModelMaterials]Material MeshMaterial *int32 BoneCount int32 Bones *[MaxModelBones]BoneInfo BindPos *[MaxModelBinds]Transform }
func LoadModelFromMesh ¶
LoadModelFromMesh : Load model from generated mesh (default material)
func (*Model) IsAnimationValid ¶
func (model *Model) IsAnimationValid(anim *ModelAnimation) bool
IsAnimationValid : Check model animation skeleton match
func (*Model) SetMeshMaterial ¶
SetMeshMaterial : Set material for a mesh
func (*Model) Unload ¶
func (model *Model) Unload()
Unload : Unload model from memory (RAM and/or VRAM)
func (*Model) UpdateAnimation ¶
func (model *Model) UpdateAnimation(anim *ModelAnimation, frame int)
UpdateAnimation : Update model animation pose
type ModelAnimation ¶
type ModelAnimation struct { BoneCount int32 Bones *[]BoneInfo FrameCount int32 FramePoses *[](*[]Transform) }
func LoadModelAnimations ¶
func LoadModelAnimations(fileName string) ([]ModelAnimation, int32)
LoadModelAnimations : Load model animations from file
type MouseButton ¶
type MouseButton int32
const ( MouseLeftButton MouseButton = iota MouseRightButton MouseMiddleButton )
type Music ¶
type Music struct { CtxType int32 CtxData unsafe.Pointer SampleCount uint32 LoopCount uint32 Stream AudioStream }
Music stream type. Anything longer than ~10 seconds should be streamed.
func LoadMusicStream ¶
LoadMusicStream : Load music stream from file
func (*Music) GetTimeLength ¶
GetTimeLength : Get music time length (in seconds)
func (*Music) GetTimePlayed ¶
GetTimePlayed : Get current music time played (in seconds)
func (*Music) ResumeStream ¶
func (music *Music) ResumeStream()
ResumeStream : Resume playing paused music
func (*Music) SetLoopCount ¶
SetLoopCount : Set music loop count (loop repeats)
func (*Music) UpdateStream ¶
func (music *Music) UpdateStream()
UpdateStream : Updates buffers for music streaming
type NPatchInfo ¶
type NPatchInfo struct { SourceRectangle Rectangle Left int32 Top int32 Right int32 Bottom int32 Type NPatchType }
NPatchInfo is the N-Patch layout information
type NPatchType ¶
type NPatchType int32
const ( NPT9Patch NPatchType = iota NPT3PatchVertical NPT3PatchHorizontal )
type PixelFormat ¶
type PixelFormat int32
PixelFormat - Texture format
const ( // 8 bit per pixel (no alpha) UncompressedGrayscale PixelFormat = iota + 1 // 8*2 bpp (2 channels) UncompressedGrayAlpha // 16 bpp UncompressedR5g6b5 // 24 bpp UncompressedR8g8b8 // 16 bpp (1 bit alpha) UncompressedR5g5b5a1 // 16 bpp (4 bit alpha) UncompressedR4g4b4a4 // 32 bpp UncompressedR8g8b8a8 // 32 bpp (1 channel - float) UncompressedR32 // 32*3 bpp (3 channels - float) UncompressedR32g32b32 // 32*4 bpp (4 channels - float) UncompressedR32g32b32a32 // 4 bpp (no alpha) CompressedDxt1Rgb // 4 bpp (1 bit alpha) CompressedDxt1Rgba // 8 bpp CompressedDxt3Rgba // 8 bpp CompressedDxt5Rgba // 4 bpp CompressedEtc1Rgb // 4 bpp CompressedEtc2Rgb // 8 bpp CompressedEtc2EacRgba // 4 bpp CompressedPvrtRgb // 4 bpp CompressedPvrtRgba // 8 bpp CompressedAstc4x4Rgba // 2 bpp CompressedAstc8x8Rgba )
Texture formats NOTE: Support depends on OpenGL version and platform
type Quaternion ¶
Quaternion A represntation of rotations that does not suffer from gimbal lock
func NewQuaternionFromAxisAngle ¶
func NewQuaternionFromAxisAngle(axis Vector3, angle float32) Quaternion
NewQuaternionFromAxisAngle creates a quaternion from an axis and its rotation
func NewQuaternionFromEuler ¶
func NewQuaternionFromEuler(euler Vector3) Quaternion
NewQuaternionFromEuler creates a quaternion from euler angles (roll, yaw, pitch)
func NewQuaternionFromMatrix ¶
func NewQuaternionFromMatrix(mat Matrix) Quaternion
NewQuaternionFromMatrix creates a Quaternion from a rotation matrix
func NewQuaternionIdentity ¶
func NewQuaternionIdentity() Quaternion
NewQuaternionIdentity creates a Quaternion Identity (a blank quaternion)
func NewQuaternionVector3ToVector3 ¶
func NewQuaternionVector3ToVector3(from, too Vector3) Quaternion
NewQuaternionVector3ToVector3 creates a quaternion that is the angle between 2 vectors
func (Quaternion) Decompose ¶
func (q Quaternion) Decompose() []float32
Decompose the quaternion into a slice of floats
func (Quaternion) Lerp ¶
func (q Quaternion) Lerp(target Quaternion, amount float32) Quaternion
Lerp a vector towards another vector
func (Quaternion) Multiply ¶
func (q Quaternion) Multiply(q2 Quaternion) Quaternion
Multiply two Quaternion together, doing queraternion mathmatics
func (Quaternion) Nlerp ¶
func (q Quaternion) Nlerp(target Quaternion, amount float32) Quaternion
Nlerp slerp-optimized interpolation between two quaternions
func (Quaternion) Scale ¶
func (q Quaternion) Scale(scale float32) Quaternion
Scale the quaternion (v * scale)
func (Quaternion) Slerp ¶
func (q Quaternion) Slerp(q2 Quaternion, amount float32) Quaternion
Slerp Spherically Lerped
func (Quaternion) SqrLength ¶
func (q Quaternion) SqrLength() float32
SqrLength is the squared length of the quaternion
func (Quaternion) ToAxisAngle ¶
func (q Quaternion) ToAxisAngle() (Vector3, float32)
ToAxisAngle returns the rotation angle and axis for a given quaternion
func (Quaternion) ToEuler ¶
func (q Quaternion) ToEuler() Vector3
ToEuler turns the quaternion into equivalent euler angles (roll, putch, yaw). Values are returned in Degrees
func (Quaternion) ToMatrix ¶
func (q Quaternion) ToMatrix() Matrix
ToMatrix converts the quaternion into a rotation matrix
func (Quaternion) Transform ¶
func (q Quaternion) Transform(mat Matrix) Quaternion
Transform a quaternion, given a transformation matrix
type Ray ¶
func GetMouseRay ¶
GetMouseRay : Returns a ray trace from mouse position
type RayHitInfo ¶
func GetCollisionRayGround ¶
func GetCollisionRayGround(ray Ray, groundHeight float32) RayHitInfo
GetCollisionRayGround : Get collision info between ray and ground plane (Y-normal plane)
func GetCollisionRayModel ¶
func GetCollisionRayModel(ray Ray, model Model) RayHitInfo
GetCollisionRayModel : Get collision info between ray and model
func GetCollisionRayTriangle ¶
func GetCollisionRayTriangle(ray Ray, p1 Vector3, p2 Vector3, p3 Vector3) RayHitInfo
GetCollisionRayTriangle : Get collision info between ray and triangle
type Rectangle ¶
func GetCollisionRec ¶
GetCollisionRec : Get collision rectangle for two rectangles collision
func GetImageAlphaBorder ¶
GetImageAlphaBorder : Get image alpha border rectangle Recommended to use image.GetAlphaBorder(threshold) instead
func GuiTextBoxGetActive ¶
func GuiTextBoxGetActive() Rectangle
GuiTextBoxGetActive : Get bounds of active textbox
func NewRectangle ¶
NewRectangle creates a new rect
func NewRectangleFromPositionSize ¶
NewRectangleFromPositionSize creates a rectangle out of a position and size
func NewRectangleFromVector4 ¶
NewRectangleFromVector4 creates a rectangle out of a vector4
func (Rectangle) GetOverlapRec ¶
GetOverlapRec : Get collision rectangle for two rectangles collision Alias of GetCollisionRec
func (Rectangle) LerpPosition ¶
LerpPosition a rectangle to a target position
func (Rectangle) MaxPosition ¶
MaxPosition gets the maximum position within the bounds
func (Rectangle) MinPosition ¶
MinPosition gets the smallest position the rectangle can be. Alias of Position().
func (Rectangle) SetPosition ¶
SetPosition sets the position of the rectangle
type RenderTexture2D ¶
RenderTexture2D is a texture used for rendering
func LoadRenderTexture ¶
func LoadRenderTexture(width int, height int) RenderTexture2D
LoadRenderTexture : Load texture for rendering (framebuffer)
func (RenderTexture2D) Unload ¶
func (target RenderTexture2D) Unload()
Unload : Unload render texture from GPU memory (VRAM)
type Shader ¶
type Shader struct { Id uint32 Locs *[MaxShaderLocations]int32 }
func LoadShader ¶
//The following function has been ommitted because it is only available in OpenGL 1.1 and otherwise useless // It was not worth the effort to write functionality as raylib-convert is unable to parse this function (pointer return)
//LoadText load chars array from text file func LoadText(fileName string) string { return "" }
LoadShader : Load shader from files and bind default locations
func LoadShaderCode ¶
LoadShaderCode : Load shader from code strings and bind default locations
func (Shader) GetLocation ¶
GetLocation : Get shader uniform location
func (*Shader) SetValueFloat32 ¶
func (shader *Shader) SetValueFloat32(uniformLoc int, value []float32, uniformType ShaderUniformDataType)
SetValueFloat32 : Set shader uniform value
func (*Shader) SetValueFloat32V ¶
func (shader *Shader) SetValueFloat32V(uniformLoc int, values []float32, uniformType ShaderUniformDataType)
SetValueFloat32V : Sets a vector (array) of uniform values
func (*Shader) SetValueInt32 ¶
func (shader *Shader) SetValueInt32(uniformLoc int, value []int32, uniformType ShaderUniformDataType)
SetValueInt32 : Set shader uniform value
func (*Shader) SetValueInt32V ¶
func (shader *Shader) SetValueInt32V(uniformLoc int, values []int32, uniformType ShaderUniformDataType)
SetValueInt32V : Sets a integer vector (array) of uniform values
func (Shader) SetValueMatrix ¶
SetValueMatrix : Set shader uniform value (matrix 4x4)
func (Shader) SetValueTexture ¶
SetValueTexture : Set shader uniform value for texture
type ShaderLocationIndex ¶
type ShaderLocationIndex int32
Shader location point type
const ( LocVertexPosition ShaderLocationIndex = iota LocVertexTexcoord01 LocVertexTexcoord02 LocVertexNormal LocVertexTangent LocVertexColor LocMatrixMvp LocMatrixModel LocMatrixView LocMatrixProjection LocVectorView LocColorDiffuse LocColorSpecular LocColorAmbient LocMapAlbedoLocMapDiffuse LocMapMetalnessLocMapSpecular LocMapNormal LocMapRoughness LocMapOcclusion LocMapEmission LocMapHeight LocMapCubemap LocMapIrradiance LocMapPrefilter LocMapBrdf )
type ShaderUniformDataType ¶
type ShaderUniformDataType int32
const ( UniformFloat ShaderUniformDataType = iota UniformVec2 UniformVec3 UniformVec4 UniformInt UniformIVec2 UniformIVec3 UniformIVec4 UniformSampler2D )
type Sound ¶
type Sound struct { SampleCount uint32 Stream AudioStream }
Sound source type
func LoadSoundFromWave ¶
LoadSoundFromWave : Load sound from wave data
func (*Sound) PlayMulti ¶
func (sound *Sound) PlayMulti()
PlayMulti : Play a sound (using multichannel buffer pool)
type Texture2D ¶
Texture2D stores GPU based textures.
func GenTextureBRDF ¶
GenTextureBRDF : Generate BRDF texture
func GenTextureCubemap ¶
GenTextureCubemap : Generate cubemap texture from HDR texture
func GenTextureIrradiance ¶
GenTextureIrradiance : Generate irradiance texture using cubemap data
func GenTexturePrefilter ¶
GenTexturePrefilter : Generate prefilter texture using cubemap data
func LoadTexture ¶
LoadTexture : Load texture from file into GPU memory (VRAM)
func LoadTextureFromGo ¶
LoadTextureFromGo loads image data from image.Image. Uses NewImageFromGoImage.
func LoadTextureFromImage ¶
LoadTextureFromImage : Load texture from image data
func (Texture2D) GenTextureMipmaps ¶
func (texture Texture2D) GenTextureMipmaps()
GenTextureMipmaps : Generate GPU mipmaps for a texture
func (Texture2D) GetTextureData ¶
GetTextureData : Get pixel data from GPU texture and return an Image
func (Texture2D) SetTextureFilter ¶
func (texture Texture2D) SetTextureFilter(filterMode TextureFilterMode)
SetTextureFilter : Set texture scaling filter mode
func (*Texture2D) SetWrap ¶
func (texture *Texture2D) SetWrap(wrapMode TextureWrapMode)
SetWrap : Set texture wrapping mode
func (Texture2D) Unload ¶
func (texture Texture2D) Unload()
Unload : Unload texture from GPU memory (VRAM)
func (*Texture2D) UpdateTexture ¶
UpdateTexture : Update GPU texture with new data
type TextureCubemap ¶
type TextureCubemap Texture2D
TextureCubemap type, actuall the same as a Texture2D
func LoadTextureCubemap ¶
func LoadTextureCubemap(image *Image, layoutType CubemapLayoutType) *TextureCubemap
LoadTextureCubemap : Load cubemap from image, multiple image cubemap layouts supported
func (*TextureCubemap) Unload ¶
func (texture *TextureCubemap) Unload()
Unload : Unload texture from GPU memory (VRAM)
type TextureFilterMode ¶
type TextureFilterMode int32
const ( FilterPoint TextureFilterMode = iota FilterBilinear FilterTrilinear FilterAnisotropic4x FilterAnisotropic8x FilterAnisotropic16x )
type TextureWrapMode ¶
type TextureWrapMode int32
const ( WrapRepeat TextureWrapMode = iota WrapClamp WrapMirrorRepeat WrapMirrorClamp )
type TraceLogType ¶
type TraceLogType int32
const ( LogAll TraceLogType = iota LogTrace LogDebug LogInfo LogWarning LogError LogFatal LogNone )
func (TraceLogType) ToString ¶
func (v TraceLogType) ToString() string
ToString converts the TraceLogType to a string. This can be useful for custom loggers. seealso: ToUniformedString for a uniformed formatting.
func (TraceLogType) ToUniformedString ¶
func (v TraceLogType) ToUniformedString() string
ToUniformedString converts the trace log type to a string of fixed length (5) and all captials.
type Transform ¶
type Transform struct { Translation Vector3 Rotation Quaternion Scale Vector3 }
Transformation properties
func NewTransform ¶
func NewTransform(translation Vector3, rotation Quaternion, scale Vector3) Transform
NewTransform creates a new transform
type Unloadable ¶
type Unloadable interface {
Unload()
}
Unloadable is any object that has a Unload function and needs to be freed when it has finished being used.
type Vector2 ¶
Vector2 a 2 dimensional vector
func DrawLineStrip ¶
DrawLineStrip : Draw lines sequence
func DrawTriangleFan ¶
DrawTriangleFan : Draw a triangle fan defined by points (first vertex is the center)
func DrawTriangleStrip ¶
DrawTriangleStrip : Draw a triangle strip defined by points
func GetGestureDragVector ¶
func GetGestureDragVector() Vector2
GetGestureDragVector : Get gesture drag vector
func GetGesturePinchVector ¶
func GetGesturePinchVector() Vector2
GetGesturePinchVector : Get gesture pinch delta
func GetMousePosition ¶
func GetMousePosition() Vector2
GetMousePosition : Returns mouse position XY
func GetScreenToWorld2D ¶
GetScreenToWorld2D : Returns the world space position for a 2d camera screen space position
func GetTouchPosition ¶
GetTouchPosition : Returns touch position XY for a touch point index (relative to screen size)
func GetWindowPosition ¶
func GetWindowPosition() Vector2
GetWindowPosition : Get window position XY on monitor
func GetWorldToScreen ¶
GetWorldToScreen : Returns the screen space position for a 3d world space position
func GetWorldToScreen2D ¶
GetWorldToScreen2D : Returns the screen space position for a 2d camera world space position
func GuiTextBoxGetSelection ¶
func GuiTextBoxGetSelection() Vector2
GuiTextBoxGetSelection : Get selection of active textbox (x - selection start y - selection length)
func MeasureTextEx ¶
MeasureTextEx : Measure string size for Font
func NewVector2 ¶
NewVector2 creates a new vector with defined components
func NewVector2Right ¶
func NewVector2Right() Vector2
NewVector2Right creates a normalized vector pointing right
func NewVector2Up ¶
func NewVector2Up() Vector2
NewVector2Up creates a normalized vector pointing up
func NewVector2Zero ¶
func NewVector2Zero() Vector2
NewVector2Zero creates a vector with all components equaling 0
func (Vector2) DotProduct ¶
DotProduct of the vector
func (Vector2) Perpendicular ¶
Perpendicular to this vector
func (Vector2) Reflect ¶
Reflect a vector. The mirror normal can be invisioned as a mirror perpendicular to the surface that is hit.
func (Vector2) RotateByRadians ¶
RotateByRadians rotates the vector in radians. Use Deg2Rad to convert degress into radians.
type Vector3 ¶
Vector3 a 3 dimensional vector
func CheckCollisionRaySphereEx ¶
func CheckCollisionRaySphereEx(ray Ray, center Vector3, radius float32, collisionPoint Vector3) (bool, Vector3)
CheckCollisionRaySphereEx : Detect collision between ray and sphere, returns collision point
func NewVector3 ¶
NewVector3 creates a new vector with defined components
func NewVector3Forward ¶
func NewVector3Forward() Vector3
NewVector3Forward creates a normalized vector pointing forwards
func NewVector3Right ¶
func NewVector3Right() Vector3
NewVector3Right creates a normalized vector pointing right
func NewVector3Up ¶
func NewVector3Up() Vector3
NewVector3Up creates a normalized vector pointing up
func NewVector3Zero ¶
func NewVector3Zero() Vector3
NewVector3Zero creates a vector with all components equaling 0
func (Vector3) Barycenter ¶
Barycenter computers the coordinates (u, v, w) for the vector with respect to triangle (a, b, c). Assumes vector is on plane with triangle
func (Vector3) CrossProduct ¶
CrossProduct of the vector
func (Vector3) DotProduct ¶
DotProduct of the vector
func (*Vector3) OrthoNormalize ¶
OrthoNormalize makes two vectors normalized and orthogonal to each other
func (Vector3) Perpendicular ¶
Perpendicular to this vector
func (Vector3) QuaternionToo ¶
func (v Vector3) QuaternionToo(v2 Vector3) Quaternion
QuaternionToo calculates the Quaternion between the current vector and the next
func (Vector3) Reflect ¶
Reflect a vector. The mirror normal can be invisioned as a mirror perpendicular to the surface that is hit.
func (Vector3) RotateByQuaternion ¶
func (v Vector3) RotateByQuaternion(q Quaternion) Vector3
RotateByQuaternion rotates the vector
type Vector4 ¶
Vector4 A 4 dimensional vector
func ColorNormalize ¶
ColorNormalize : Returns color normalized as float [0..1]
func GetImageDataNormalized ¶
GetImageDataNormalized : Get pixel data from image as a Color slice Recommended to use image.GetPixelsNormalized instead.
func NewVector4 ¶
NewVector4 creates a new vector with defined components
func NewVector4Zero ¶
func NewVector4Zero() Vector4
NewVector4Zero creates a vector with all components equaling 0
func (Vector4) DotProduct ¶
DotProduct of the vector
type VrDeviceInfo ¶
type VrDeviceInfo struct { HorizontalResolution int32 VerticalResolution int32 HorizontalScreenSize float32 VerticalScreenSize float32 VerticalScreenCenter float32 EyeToScreenDistance float32 LensSeperationDistance float32 InterpupillaryDistance float32 LensDistortionValues [4]float32 ChromaAberrationCorrection [4]float32 }
type Wave ¶
type Wave struct { SampleCount uint32 SampleRate uint32 SampleSize uint32 Channels uint32 // contains filtered or unexported fields }
Wave defines audio wave data
func (*Wave) ExportAsCode ¶
ExportAsCode : Export wave sample data to code (.h)
Source Files ¶
- audio.go
- audio_gen.go
- camera.go
- camera_gen.go
- color.go
- drawing_gen.go
- font.go
- gestures.go
- gestures_gen.go
- image.go
- input.go
- input_gen.go
- keys.go
- main.go
- main_gen.go
- math.go
- matrix.go
- models.go
- models_gen.go
- quanterion.go
- ray.go
- raygui.go
- raygui_gen.go
- raylib.go
- rectangle.go
- shader.go
- shader_gen.go
- shapes.go
- shapes_gen.go
- text.go
- text_gen.go
- texture.go
- texture_gen.go
- trace.go
- trace_preamble.go
- unloadable.go
- vector.go
- vector_helpers.go
- vr.go
- vr_gen.go