How gen2brain/raylib-go works
Main Components
a. Core Components:
• Raylib Core (raylib/)
• Physics Engine (physics/)
• GUI System (raygui/)
• Resource Management (rres/)
• Easing Functions (easings/)
b. Platform Support Layer:
• Desktop (Windows/Linux/macOS)
• Android
• DRM (Direct Rendering Manager)
• Multiple Backend Options (GLFW/SDL/RGFW)
Architectural Layers
Layer 1 (Top) - Go API Interface:
• Public Go bindings
• Type conversions
• Memory management
Layer 2 - Bridge Layer:
• CGO bindings
• Platform-specific implementations
• Pure Go implementation (Windows)
Layer 3 - Native Implementation:
• Raylib C core
• External dependencies
• Platform-specific code
Component Relationships
[Go Applications]
• ↓
[Raylib-Go Bindings]
• ↓
[CGO/PureGo Bridge]
• ↙ ↓ ↘
[GLFW] [SDL] [RGFW]
• ↘ ↓ ↙
[Graphics Backend]
• ↓
[Platform Layer]
Implementation Details
• Physics engine integration
• GUI system
• Resource management
• Platform-specific code