bigg (bgfx + imgui + glfw + glm) + utils
MIT 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.
bigger::App::runApp()
bigg::Application::run()
glfw
initializationbgfx
initializationimgui
initializationbigger::App::initialize()
(needs to be overridden)
glfw
event pollingimgui
event pollingbigger::App::update()
bigger::App::updateApp()
(needs to be overridden)
bigger::SceneObject::update()
)bigger::SceneObject::draw()
)imgui
renderbgfx
submitbigger::App::shutdown()
bigger::App::releaseSharedResources()
(needs to be overridden)
imgui
shutdownbgfx
shutdownglfw
shutdownstd::shared_ptr<T>
or std::unique_ptr<T>
)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);
}
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).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.
MIT License
Issue reports & pull requests are highly welcomed.