https://github.com/vekjja/in3d
A relatively simple Go powered OpenGL Graphics Engine
https://github.com/vekjja/in3d
3d 3d-game-engine 3d-graphics 3d-models game-dev game-development game-engine glsl go golang graphics-engine graphics-programming mtl objectloader opengl shaders wavefront wavefront-obj
Last synced: 3 months ago
JSON representation
A relatively simple Go powered OpenGL Graphics Engine
- Host: GitHub
- URL: https://github.com/vekjja/in3d
- Owner: vekjja
- Created: 2017-09-04T14:21:04.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-05-30T00:26:50.000Z (5 months ago)
- Last Synced: 2025-05-30T00:27:08.494Z (5 months ago)
- Topics: 3d, 3d-game-engine, 3d-graphics, 3d-models, game-dev, game-development, game-engine, glsl, go, golang, graphics-engine, graphics-programming, mtl, objectloader, opengl, shaders, wavefront, wavefront-obj
- Language: Go
- Homepage:
- Size: 208 MB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: .github/README.md
Awesome Lists containing this project
README
# in3D
A relatively simple Go powered OpenGL Graphics Engine
Create a new Window, Get OpenGL Context, Setup Camera Projection, create 3D object, Draw!
Go Ahead, you can do it yourself... `go get github.com/vekjja/in3D`
```go
package main
import (
"github.com/vekjja/in3D"
)
func main() {
in3D.Init(800, 600, "Simple Cube in3D")
in3D.NewLight().Position =
in3D.Position{X: 10, Y: 1, Z: 10}
in3D.SetRelPath("../assets/textures")
texture := in3D.NewTexture("vekjja.jpg")
color := []float32{1, 1, 1}
obj := in3D.NewPointsObject(
in3D.NewPosition(0, 0, -7),
in3D.Cube,
texture,
color,
in3D.Shader["phong"],
)
obj.SceneLogic = func(s *in3D.SceneData) {
s.XRotation++
s.YRotation++
}
for !in3D.ShouldClose() {
in3D.Update()
obj.Draw()
in3D.SwapBuffers()
}
}
```

### ME-TODO:
* Optimize all the things!
* Add Shadows, Ambient Occulsion and other light related things
* Have fun making examples!
### YOU-TODO:
* Checkout the other examples to see some more basic functionality
* `go run examples/mesh/mesh.go`
### Installation on Ubuntu
```
sudo apt install libgl1-mesa-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev
go get github.com/vekjja/in3D
```
### Installation on Fedora
```sh
sudo dnf install -y libXxf86vm-devel mesa-libGL-devel mesa-libGLES-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel libX11-devel
go get github.com/vekjja/in3D
```
##### Make sure OpenGL 4.1 is supported by your system, drivers and hardware