-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the vertex wiki! In this wiki there are gonna be tutorials, API and some docs.
Vertex needs a C compiler and some special libraries (only for linux), here is what you need:
On Ubuntu/Debian-like Linux distributions, you need to install the following packages:
sudo apt-get install libgl1-mesa-dev xorg-dev
On macOS, you need to have either Xcode or Command Line Tools for Xcode installed. You can install the Command Line Tools by running:
xcode-select --install
For Windows, you will need a C compiler. We recommend using TDM-GCC.
You need to have a Go module in your directory to use this. Create a go module using this command:
go mod init example.com
Change the example.com to your own package name or url (like Github).
Vertex is an ordinary go package, so you can get it using this command:
go get github.com/dimkauzh/vertex@latest
This is a example of the engine:
package main
import (
"github.com/dimkauzh/vertex"
"github.com/dimkauzh/vertex/src/draw"
w "github.com/dimkauzh/vertex/src/window"
)
func main() {
vertex.Init()
defer vertex.Quit()
window := w.NewWindow(800, 600, "Vertex Engine")
for window.Loop() {
draw.SetBackgroundColor([3]float32{0.2, 0.2, 0.2})
draw.DrawLine(100, 100, 500, 100, [3]float32{1, 0, 0})
draw.DrawRect(200, 200, 100, 100, [3]float32{0, 1, 1})
}
}
vertex is a lightweight super-fast open-source game engine built with Go and OpenGL. Its easy, fast and minimal for maximum performace. It uses OpenGL 2.1 to render graphics fast.