Skip to content

A lightweight 3D rendering engine built with OpenGL, featuring a collection of convenient wrapper classes to simplify development.

License

Notifications You must be signed in to change notification settings

hilbertcube/3DGL-Render-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Render Engine

C C++ OpenGL CMake Windows Linux GitHub

Overview

3D Object Renderer for common geometric shapes, including triangles, cubes, spheres, and torus (donut) with texture support. Built with OpenGL, a cross-platform, low-level API for rendering 2D and 3D vector graphics alongside CMake, GLFW, GLAD, glm, and fmt.

Minimum Requirements:

  1. C++17
  2. C17
  3. CMake 3.10

Preview:

Earth and Moon Cube

Installations

  • GLFW. There are two options: build from source using CMake or use prebuilt binaries.
  • GLAD. Select API > gl > Latest Version. The API version doesn't matter, as long as it is greater than the GLFW version you're using. After that, go to Profile > Core, then press "Generate" and download the zip folder.
  • GLM. This is a header-only library, so linking is very straightforward.
  • FMT. The easiest, and best way is to install with vcpkg and then link it with CMake.

Build

Create a build directory

mkdir build
cd build

Windows (MSVC)

Configure, build, and run the project with release (recommended)

cmake --build .\build\ --config Release
.\build\Release\{file-name}

or with debug:

cmake --build .\build\ --config Debug
.\build\Debug\{file-name}

Linux / macOS

On Linux and macOS, CMake does not use the --config flag in the same way. Instead, you specify the build type when configuring:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/{file-name}

Or for Debug mode:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
./build/{file-name}

Usage

Controls

Key / Input Action
W Move forward
A Move left
S Move backward
D Move right
Mouse Look around
Esc Close the window

Read more: some libraries for OpenGL applications

Reference: https://github.com/eug/awesome-opengl

  • assimp - Portable library to import 3D models in a uniform manner.
  • Bullet - It provides state of the art collision detection, soft body and rigid body dynamics.
  • fltk - C++ Toolkit to generate UI widgets portably. LGPLv2
  • freeGLUT - Mature library that allows to create/manage windows containing OpenGL contexts.
  • GLFW - Modern library for creating/interact windows with OpenGL contexts.
  • GLFM - Supplies an OpenGL ES context and input events for mobile devices and the web.
  • glm - Mathematics library for graphics software based on the GLSL specifications.
  • Magnum - It is a 2D/3D graphics engine for modern OpenGL.
  • MathFu - C++ math library developed primarily for games focused on simplicity and efficiency.
  • Newton - It is a cross-platform life-like physics.
  • OGLplus - Collection of libraries which implement an object-oriented facade over OpenGL.
  • SDL - Designed to provide low level access to multimedia and graphics hardware.
  • SFML - Simple interface to ease the development of games and multimedia applications.
  • SOIL - Tiny C library used primarily for uploading textures into OpenGL. (see SOIL2)
  • Pangolin - Lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
  • morphologica - OpenGL graphics engine for data visualization, especially of numerical simulations.
  • raylib - A simple and easy-to-use library to enjoy videogames programming.

About

A lightweight 3D rendering engine built with OpenGL, featuring a collection of convenient wrapper classes to simplify development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published