Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wireframe

A simple 3D terrain visualizer written in Go. When developing this project, I quickly found out how mildly inconvenient it is to do any form of computer graphics programming in a language without support for classes, static fields/methods, operator overloading, and even implicit narrowing conversions. Nevertheless, I wanted to try out Golang, so I thought I'd rewrite something I'm familiar with even if it may not be the best use case for the language. I used raylib and raylib-go for creating windows and drawing lines/vertices, and did the rest of the rendering on the cpu.

Features include:

  • A fully controllable camera in 3d space
  • A controllable sphere along the terrain's surface
  • Variable terrain hill size and mesh resolution
  • Backface culling
  • Terrain rasterization (doesn't actually color the polygons correctly but generates a solid terrain)

Terrain

Checkout the demo

How to build

  1. Install cgo
apt-get install libgl1-mesa-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev libwayland-dev libxkbcommon-dev
  1. Install raylib-go
go install -v github.com/gen2brain/raylib-go/raylib@latest
  1. Build the project
go build .

About

A 3D terrain renderer that runs on the CPU

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages