• Stars
    star
    196
  • Rank 197,419 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

bigg (bgfx + imgui + glfw + glm) + utils

bigger

macOS Ubuntu GitHub license

bigg (bgfx + imgui + glfw + glm) + utils

This library, named bigger, is a prototype-oriented middleware library for 3D interactive applications. Based on a library named bigg, which stands for bgfx + imgui + glfw + glm, this library adds some higher-level utilities (such as renderable primitive classes) to make the prototyping of lightweight and cross-platform apps even easier.

Languages

  • C++17
  • GLSL 1.30

Dependencies

Main Classes

  • App (needs to be overridden)
  • Camera
  • Primitives
    • Cube primitive
    • Dynamic mesh primitive
    • Mesh primitive
    • Plane primitive
    • Sphere primitive
  • Materials
    • Blinn-Phong material
    • MatCap material

App Event Cycle

  • bigger::App::runApp()
    • bigg::Application::run()
      • glfw initialization
      • bgfx initialization
      • imgui initialization
      • Reset
      • bigger::App::initialize() (needs to be overridden)
      • Main loop
        • glfw event polling
        • imgui event polling
        • bigger::App::update()
          • bigger::App::updateApp() (needs to be overridden)
          • Update scene objects (bigger::SceneObject::update())
          • Render scene objects (bigger::SceneObject::draw())
        • imgui render
        • bgfx submit
      • bigger::App::shutdown()
        • Release scene objects
        • bigger::App::releaseSharedResources() (needs to be overridden)
      • imgui shutdown
      • bgfx shutdown
      • glfw shutdown

App Design

  • Always two directional lights
    • Other types of lights or more than two directional lights are not supported
  • Intensive use of smart pointers
    • Primitives and materials need to be dynamically instantiated and managed by smart pointers (i.e., either std::shared_ptr<T> or std::unique_ptr<T>)

Usage

Minimal Example

This is a minimal example of using bigger::App. This app just shows a blank window and do nothing.

#include <bigger/app.hpp>

class MinimalApp final : public bigger::App
{
public:

    MinimalApp() {}

    void initialize(int argc, char** argv) override {}
    void updateApp() override {}
    void releaseSharedResources() override {}
};

int main(int argc, char** argv)
{
    MinimalApp app;
    return app.runApp(argc, argv);
}

Override App Class

The following three methods need to be overridden by the new app class:

  • bigger::App::initialize(): Initializing the app and instantiating necessary objects living through the app life.
  • bigger::App::updateApp(): Writing frame-wise update rules and calling imgui draw calls.
  • bigger::App::releaseSharedResources(): Releasing shared resources maintained by the app class (such as vertex buffers).

(TODO)

Additional Notes: Screen Capture

bgfx provides screen capture functionalities, which of course can be directly called (see the official documentation and examples). For easier use, in bigger by default, just inserting the following one-line code into update() can capture the screen:

bgfx::requestScreenShot(BGFX_INVALID_HANDLE, "/path/to/output");

Note: On macOS, using the Metal backend somehow fails to capture the screen (not sure why; probably related to this issue). A possible quick fix is to use OpenGL.

License

MIT License

Contribution

Issue reports & pull requests are highly welcomed.

More Repositories

1

blender-cli-rendering

Blender Python scripts for rendering images directly from command-line interface
Python
692
star
2

elasty

A research-oriented elastic body simulator
C++
323
star
3

tinycolormap

A header-only, single-file library for colormaps written in C++11
C++
285
star
4

mathtoolbox

Mathematical tools (interpolation, dimensionality reduction, optimization, etc.) written in C++11 with Eigen
C++
245
star
5

unblending

Decomposing an input image into layers via "color unblending"
C++
162
star
6

position-based-fluids

Position Based Fluids [SIGGRAPH 2013] in C++
C++
125
star
7

color-util

A header-only C++11 library for colors; color space converters for RGB, HSL, XYZ, Lab, etc. and perceptual color difference calculators such as CIEDE2000
C++
89
star
8

sequential-line-search

A Preferential Bayesian optimization library for C++/Python [SIGGRAPH 2017]
C++
43
star
9

bvh11

A tiny C++11 library for reading BVH motion capture data
C++
36
star
10

optimo

Keyframe-based motion editing system using numerical optimization [CHI 2018]
C++
30
star
11

parallel-util

Simple header-only implementation of "parallel_for" and "parallel_map" for C++11
C++
30
star
12

btoon

Blender Addon for Toon Rendering
Python
21
star
13

sequential-gallery

Sequential Gallery for Interactive Visual Design Optimization [SIGGRAPH 2020]
C++
20
star
14

hello-bgfx

Hello-world project for bgfx + GLFW managed by CMake
C++
15
star
15

split-toning

A Blender addon for simulating the Split Toning effect in Adobe Lightroom/Photoshop
Python
14
star
16

real-time-example-based-elastic-deformation

Real-Time Example-Based Elastic Deformation [SCA 2012]
C
14
star
17

nlopt-util

A header-only wrapper library for calling NLopt optimization in a single line using Eigen::VectorXd
C++
14
star
18

visoptslider

Qt-based implementation of VisOpt Slider widget [UIST 2014] for C++ & Python
C++
12
star
19

nodelayout

A Blender add-on for automatic layout of nodes
Python
9
star
20

cc0assetsloader

A Blender add-on for loading CC0 assets (PBR textures, HDR images, etc.)
Python
8
star
21

enhancer

A C++11 / GLSL library for enhancing photographs (adjusting brightness, contrast, etc.)
C++
8
star
22

latexie

Utilities for writing papers with LaTeX
TeX
6
star
23

constrained-optimization-tests

Simple implementation of constrained optimization methods, including the penalty method and the augmented Lagrangian method
C++
5
star
24

rbf-interpolator

[deprecated] Radial Basis Function (RBF) Interpolation written in C++11. This can be used for fitting a non-linear function from scattered data.
C++
5
star
25

siggraph-jp-papers

SIGGRAPH Papers by Japanese Researchers
HTML
4
star
26

selph

Machine learning-based photo color enhancement system [CHI 2016]
C++
4
star
27

three-dim-util

A utility library for prototyping 3D applications based on Qt, Eigen, and legacy OpenGL
C++
4
star
28

armature-proxy-mesh

A Blender add-on for easy creation of proxy meshes for a selected armature object
Python
4
star
29

imagedistance

Given two images, calculate their distance in several criteria
C++
3
star
30

pycolormap

A self-contained colormap library for Python
Python
3
star
31

hello-tbb-cmake

A hello-world project for testing "parallel_for" in Intel TBB. The whole project (including TBB) is built using CMake.
C++
3
star
32

multidimensional-scaling

[deprecated] A header-only C++ library of the multidimensional scaling (MDS)
C++
2
star
33

academic-illustration-assets

Assets for creating illustrative figures (and video figures) released under CC0 (public domain)
2
star
34

filesystem-util

C++11 utility functions for handling files (currently only for UNIX/Linux)
C++
2
star
35

timer

Execution timer for measuring elapsed times for code blocks written in C++11
C++
1
star
36

cgi-2019-program

List of the papers presented at CGI 2019
Python
1
star
37

hello-alembic

Just a hello-world project to start learning the Alembic library
C++
1
star
38

pyenhancer

A tiny NumPy-based library for image color enhancement
Python
1
star
39

hello-trello-api

Toy Python scripts using Trello's REST API
Python
1
star
40

rand-util

Utility functions for <random> in c++11
C++
1
star
41

optimization-test-functions

A set of test functions to evaluate optimization algorithms written in C++11
C++
1
star
42

string-util

Utility functions for <string> in C++11
C++
1
star
43

qt-animated-layout-example

A custom animated layout example in Qt5
C++
1
star
44

easy-qhull

A helper repository to use qhull in cmake-based c++ projects
CMake
1
star