Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seemywingz/in3d
A relatively simple Go powered OpenGL Graphics Engine
https://github.com/seemywingz/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: 5 days ago
JSON representation
A relatively simple Go powered OpenGL Graphics Engine
- Host: GitHub
- URL: https://github.com/seemywingz/in3d
- Owner: seemywingz
- Created: 2017-09-04T14:21:04.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-10-28T08:41:27.000Z (about 1 year ago)
- Last Synced: 2024-06-19T00:27:41.765Z (7 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: 45.8 MB
- Stars: 21
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# in3D
A relatively simple Go powered OpenGL Graphics EngineCreate a new Window, Get OpenGL Context, Setup Camera Projection, create 3D object, Draw!
Go Ahead, you can do it yourself... `go get github.com/seemywingz/in3D`
```go
package mainimport (
"github.com/seemywingz/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("seemywingz.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()
}
}```
![Simple Rotating Cude in3D](./examples/assets/textures/readme.png)
### ME-TODO:
* Optimize all the things!
* Add Shadows, Ambient Occulsion and other light related things
* Have more fun making weird examples!### YOU-TODO:
* Checkout the other examples to see some more basic functionality
* `go run examples/mesh/mesh.go`### Installation on Ubuntu
```
apt-get install libgl1-mesa-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-devgo get github.com/seemywingz/in3D
```
##### Make sure you are using the prorietary driver provided by the vendor of your graphics card
##### Note:
###### Some Names and method may change until version 1.0 is tagged
###### Texture UVs are imported upside down due to the openGL/texture coordinate systems ( flip your texture vertiacally to render correctly )