Saga3D API Documentation  1.0-RC4
Saga3D 1.0-RC4 API documentation

Introduction

Welcome to the Saga3D API documentation.

From this page you can find all necessary information to develop with Saga3D including: Guide, Tutorial, Note, ... and of course the detailed API documentation.

Basic usage

#include <Saga.h>
using namespace saga;
int main() {
// initialize
auto device = createDevice(video::E_DRIVER_TYPE::VULKAN, {800, 600});
// grab important objects
const auto& driver = device->getVideoDriver();
const auto& smgr = device->getSceneManager();
// set window title
device->setWindowCaption("Saga3D Application");
// create and set up render passes, pipelines
// load meshes and textures
// create scene nodes from loaded data
// set pipeline for scene nodes
// register scene nodes to render passes
// add a static camera
smgr->addCameraSceneNode();
// render the scene
while(device->run())
{
smgr->animate(); // animate cameras and scene nodes
driver->begin(); // begin command buffer recording
driver->beginPass(...); // start the first render pass
driver->endPass(); // end render pass
driver->beginPass(...); // start the second render pass, if there is
driver->endPass(); // end render pass
driver->end(); // end command buffer recording
driver->submit(); // submit and wait for GPU execution
driver->present(); // show rendered results on screen
}
return 0;
}
saga::createDevice
std::unique_ptr< SagaDevice > createDevice(video::E_DRIVER_TYPE driverType=video::E_DRIVER_TYPE::VULKAN, const glm::uvec2 &windowSize={800, 600}, std::uint32_t bits=32, bool fullscreen=false, bool stencilbuffer=true, bool vsync=false)
Creates an Saga device. The Saga device is the root object for using the engine.
Saga.h
Main header file of Saga3D, the only file needed to include.
saga::video::E_DRIVER_TYPE::VULKAN
@ VULKAN
Vulkan driver, available on most desktop platforms.
saga
Definition: aabbox3d.h:11