Skip to content

Siriuscoder/3dlite

Repository files navigation

Lite 3d rendering engine

Build status Release

About

Light weight 3d/2d graphics rendering helper. "Engine" is not correct word for this library. It is designed as adapter from low level OpenGL API to more simple high level API. This API contains some high level concepts like scene, material, mesh, shader.. etc. whereas OpenGL API provides low level concepts like Framebuffer, vertex buffer, texture buffer and others.

Lite3d library support only OpenGL graphics API as back end for GPU operations. No sound, no physics, graphics only! One of the reason of using OpenGL API was a potential support of many OS. Windows/Linux supports now, but library may be simply ported on others platforms.

API

Library provides two API levels:

  1. Low level C API (3dlite), common graphic operations.
  2. High level C++ API (3dlitepp), user friendly C++ components and scripting API. (See samples for more details)

Dependencies

Building project

Use cmake 3.21.0 or higher. Base dependencies already provided in deps directory (except Bullet). Hovewer on windows recomended to use vcpkg build.

All intructions assume that /path/to/3dlite/ is root of the project.

Build with existing dependencies (Linux)

$ cd /path/to/3dlite
$ mkdir build/
$ cmake --preset=Linux64_ci_gcc_release
$ cmake --build build/ --config Release

Build with existing dependencies (Windows)

Recommended to use cmake GUI to generate Visual Studio projects on windows OR

$ cd /path/to/3dlite
$ mkdir build/
$ cmake --preset=Windows64_ci_release
$ cmake --build build/ --config Release

Build using vcpkg (Linux)

$ cd /path/to/3dlite
$ mkdir build/
$ cmake --preset=Linux64_vcpkg
$ cmake --build build/ --config Release

Build using vcpkg (Windows, Visual Studio 2022)

$ cd /path/to/3dlite
$ mkdir build/
$ cmake --preset=Windows64_vcpkg
$ cmake --build build/ --config Release

Or just call build_win_2022.bat

All presets

  • Linux64_vcpkg_debug
  • Linux64_vcpkg
  • Linux64_ci_gcc_debug
  • Linux64_ci_gcc_release
  • Linux64_ci_clang_debug (with -fsanitize)
  • Linux64_ci_clang_release
  • Windows64_vcpkg_debug
  • Windows64_vcpkg
  • Windows64_ci_debug
  • Windows64_ci_release

Samples

After successfully compiling you can find some samples in bin directory. To provide samples work correctly you must download resources packs vault.pkg and sponza.pkg and put its to media/packs/

You can download resources for Vault_111 and Vault room sample from here, this 7z archive contains textures and models folders, you must copy this folders to media/vault_111 and anjoy this awesome samples!

Screenshots

Robots instancing sample Reflection via cubemap sample Sponza sample with MSAA render target and PCF shadows Vault scene (Fallout3 models) with dynamic lighting with multiple lights and big range of materials. Supports two render modes: Deffered shading and Direct shading, also supports several light buffer techniques such as UBO, TBO, SSBO. Vault 111 scene (Fallout4 models) with complete PBR lighting and HDR rendering, Deffered shading pipeline, dynamic PCF shadows from multiple light sources, Physical Bloom effect and huge range of materials and models. Vault 111 room scene (Fallout4 models) with complete PBR lighting and HDR rendering + Bullet Physics support.


Check branch master to fetch stable changes, and follow new releases =)

Copyright © 2014-2024 Nikita Korolev (Sirius)