Skip to content
Dima Marhitych edited this page Oct 24, 2023 · 2 revisions

Welcome to the vertex wiki! In this wiki there are gonna be tutorials, API and some docs.

General Setup

Everything needed

Vertex needs a C compiler and some special libraries (only for linux), here is what you need:

Ubuntu/Debian-like Linux Distributions

On Ubuntu/Debian-like Linux distributions, you need to install the following packages:

sudo apt-get install libgl1-mesa-dev xorg-dev

macOS

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

Windows

For Windows, you will need a C compiler. We recommend using TDM-GCC.

Prepared go module

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).

Getting the Go package

Vertex is an ordinary go package, so you can get it using this command:

go get github.com/dimkauzh/vertex@latest

Example

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})
  }
}

About vertex

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.

Clone this wiki locally