g3n

module
v0.2.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2024 License: BSD-2-Clause

README

G3N - Go 3D Game Engine

G3N is an OpenGL 3D Game Engine written in Go. It can be used to write cross-platform Go applications that show rich and dynamic 3D representations.

This repository is a fork of g3n/engine.

Features

  • Cross-platform: Windows, Linux, and macOS
  • Integrated GUI (graphical user interface) with many widgets
  • Hierarchical scene graph - nodes can contain other nodes
  • 3D spatial audio via OpenAL
  • Real-time lighting: ambient, directional, point, and spot lights
  • Physically-based rendering: fresnel reflectance, geometric occlusion, microfacet distribution
  • Model loaders: glTF (.gltf, .glb), Wavefront OBJ (.obj), and COLLADA (.dae)
  • Geometry generators: box, sphere, cylinder, torus, etc...
  • Geometries support morph targets and multimaterials
  • Support for animated sprites based on sprite sheets
  • Perspective and orthographic cameras
  • Text image generation and support for TrueType fonts
  • Image textures can be loaded from GIF, PNG or JPEG files
  • Animation framework for position, rotation, and scale of objects
  • Support for user-created GLSL shaders: vertex, fragment, and geometry shaders
  • Support for HiDPI displays

Dependencies

Go 1.23+ is required.

An OpenGL driver and a GCC-compatible C compiler is required.

See below for OS specific requirements.

Ubuntu/Debian-like
sudo apt-get install xorg-dev libgl1-mesa-dev libopenal1 libopenal-dev libvorbis0a libvorbis-dev libvorbisfile3
Fedora
sudo dnf -y install xorg-x11-proto-devel mesa-libGL mesa-libGL-devel openal-soft openal-soft-devel libvorbis libvorbis-devel glfw-devel libXi-devel libXxf86vm-devel
CentOS 7
# enable the EPEL repository
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install xorg-x11-proto-devel mesa-libGL mesa-libGL-devel openal-soft openal-soft-devel libvorbis libvorbis-devel glfw-devel libXi-devel libXxf86vm-devel
Arch
sudo pacman -S base-devel xorg-server mesa openal libvorbis
Void
sudo xbps-install git xorg-server-devel base-devel libvorbis-devel libvorbis libXxf86vm-devel libXcursor-devel libXrandr-devel libXinerama-devel libopenal libopenal-devel libglvnd-devel
Windows

Use the mingw-w64 toolchain by downloading this file.

Download the necessary audio DLLs and add them to your PATH, or build the DLLs yourself with instructions here.

macOS
brew install libvorbis openal-soft

Directories

Path Synopsis
Package animation
Package animation
Package app implements a cross-platform G3N app.
Package app implements a cross-platform G3N app.
Package audio contains sub packages for binding to external audio libraries and implements a spatial audio player.
Package audio contains sub packages for binding to external audio libraries and implements a spatial audio player.
al
Package al implements the Go bindings of a subset of the functions of the OpenAL C library.
Package al implements the Go bindings of a subset of the functions of the OpenAL C library.
ov
Package ov implements the Go bindings of a subset of the functions of the Ogg Vorbis File C library.
Package ov implements the Go bindings of a subset of the functions of the Ogg Vorbis File C library.
vorbis
Package vorbis implements the Go bindings of a subset (only one function) of the functions of the libvorbis library See API reference at: https://xiph.org/vorbis/doc/libvorbis/reference.html
Package vorbis implements the Go bindings of a subset (only one function) of the functions of the libvorbis library See API reference at: https://xiph.org/vorbis/doc/libvorbis/reference.html
Package camera contains virtual cameras and associated controls.
Package camera contains virtual cameras and associated controls.
Package core implements some basic types used by other packages.
Package core implements some basic types used by other packages.
gls
Package gls implements a loader of OpenGL functions for the platform and a Go binding for selected OpenGL functions.
Package gls implements a loader of OpenGL functions for the platform and a Go binding for selected OpenGL functions.
Package graphic implements scene objects which have a graphic representation.
Package graphic implements scene objects which have a graphic representation.
gui
Package gui implements the GUI infrastructure and several widgets.
Package gui implements the GUI infrastructure and several widgets.
Package light contains common light types which can be add to a 3D scene to illuminate it.
Package light contains common light types which can be add to a 3D scene to illuminate it.
loader
collada
Package collada
Package collada
gltf
Package gltf
Package gltf
obj
Package obj is used to parse the Wavefront OBJ file format (*.obj), including associated materials (*.mtl).
Package obj is used to parse the Wavefront OBJ file format (*.obj), including associated materials (*.mtl).
Package material contains virtual materials which specify the appearance of graphic objects.
Package material contains virtual materials which specify the appearance of graphic objects.
Package math32 implements basic math functions which operate directly on float32 numbers without casting and contains types of common entities used in 3D Graphics such as vectors, matrices, quaternions and others.
Package math32 implements basic math functions which operate directly on float32 numbers without casting and contains types of common entities used in 3D Graphics such as vectors, matrices, quaternions and others.
Package renderer implements the scene renderer.
Package renderer implements the scene renderer.
shaders
Package shaders contains the several shaders used by the engine
Package shaders contains the several shaders used by the engine
Package text implements text font support.
Package text implements text font support.
Package texture contains several types of textures which can be added to materials.
Package texture contains several types of textures which can be added to materials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL