Skip to content
Rendering engine written in C++ & OpenGL.
C C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
include
libs
resources
shaders
src
.gitignore
CMakeLists.txt
README.md
main.cpp

README.md

MeineKraft

MIT license

MeineKraft is a physically based rendering engine written in C++14 & OpenGL 4.6. My intent is to follow up the implementation of the most interesting parts with some articles relating to my learning experience, these articles can be found on my personal site with the tag MeineKraft.

Various GIFs
Perlin noise Perlin Noise generated terrain Linear fogLinear fog
Dynamic shader reloadingDynamic shader editing, with reloading! Phong reflection model Basic lighting

It does include some game engine related tech as well such as a Entity-Component-System architecture. The main game object in the engine is a object-oriented layer on top of the ECS architecture in order to make it slightly easier to write gameplay code while keeping the performance and data-oriented architecture intact.

Dependencies

  • dear imgui - editor GUI
  • assimp - model/scene importing
  • SDL2 - window creation, input handling
  • SDL-image - image loading and conversion
  • GLEW - OpenGL function loader
  • GLM - various mathmatical utilities

Platforms supported: Windows and Linux, macOS (barely)

Build

NOTE: Before continueing go to the file filesystem.h and adjust the filepaths so that they match your system.

Linux (Ubuntu 18.10)

sudo apt install libsdl2-dev libsdl2-image-dev libassimp-dev libglew-dev
cmake --build .
cmake .
./MeineKraft

Windows

Install Vcpkg

Clone Vcpkg, build it, then run.

./vcpkg install sdl2:x64-windows sdl2-image:x64-windows glew:x64-windows assimp:x64-windows

Launch CMake-GUI and select MeineKraft repository and then create a build directory and select it. Generate the Visual Studio 2017/2019 solution and simply build and run it via Visual Studio.

macOS

Install Homebrew

Since OpenGL is deprecated on macOS this will probably not work in the future.

sudo brew install glew sdl2 assimp
cmake --build .
cmake . 
./MeineKraft

License

The MIT License (MIT) Copyright (c) 2017 Alexander Lingtorp

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.