This engine is written for playing around with the opengle v4.x features. It contains basic primitives, supports camera, light sources, materials, textures, (wavefront) model import / export solutions.
This package provides a cli tool for downloading the necessary assets or shaders for an application.
First of all, You have to install the cli-application.
go get github.com/akosgarai/playground_engine
cd $GOPATH/src/github.com/akosgarai/playground_engine
go install
After this step, You should be able to use the cli-tool. It's easy to use, it gets a command and a parameter as arguments. Without arguments it prints out the help menu. The most important command is the install, that You can use for downloading model textures or shaders.
The following command creates a shaders
directory (if not exists) and downloads the shader apps into the shaders
dir.
playground_engine install shaders
This command creates an assets
directory (if not exists) and downloads the assest files into this directory.
playground_engine install models
The following tutorials / documentations / explanations were the basics of the engine.
- Godoc glfw
- Godoc mgl32
- Godoc gl
- Learnopengl - good explanations and cpp examples.
- About glsl
- A tutorial first part and second part
- Other tutorial
- About transformations
- Opengl version mismatch.
The applications are using the opengl 4.1 package. If your version is same or higher, the appliactions should run without issues. To check your opengl version just run the following command in terminal (based on this):
glxinfo | grep "OpenGL version"
The output is something like: OpenGL version string: 4.6.0 NVIDIA 440.82
.
In this case, you have to modify the wrapper package. The gl lib is included there. If you updated it (eg to v3.3-core
), you have to update the GL_MAJOR_VERSION
, GL_MINOR_VERSION
version constants also. Unfortunately updating the shaders is a manual step. The versions are hardcoded to the shader applications.