coastline 0.0.4
Loading...
Searching...
No Matches
coastline::RenderDocument Class Reference

A glTF document of the import on the GPU, read and decoded once for every RenderModel of its parts: its vertices, its animations, and the images no paint colours. More...

#include <scenerenderer.h>

Public Member Functions

 ~RenderDocument ()
 Release shared document storage and GPU resources before the GPU device is destroyed.
 RenderDocument (const RenderDocument &)=delete
 Prevent copying uploaded document resources.
RenderDocument & operator= (const RenderDocument &)=delete
 Prevent assignment of uploaded document resources.
std::size_t PaintCount () const

Static Public Member Functions

static std::shared_ptr< RenderDocument > Load (SceneRenderer &renderer, const std::filesystem::path &path, const ModelOptions &options={})
 Read a glTF document of the import, upload its vertices and the images no paint colours, and decode the images of its materials.

Friends

class RenderModel

Detailed Description

A glTF document of the import on the GPU, read and decoded once for every RenderModel of its parts: its vertices, its animations, and the images no paint colours.

The images of materials are painted and uploaded for a colour the first time a model of the document takes it, and each later model in that colour shares them.

Constructor & Destructor Documentation

◆ ~RenderDocument()

coastline::RenderDocument::~RenderDocument ( )

Release shared document storage and GPU resources before the GPU device is destroyed.

◆ RenderDocument()

coastline::RenderDocument::RenderDocument ( const RenderDocument & )
delete

Prevent copying uploaded document resources.

Member Function Documentation

◆ Load()

std::shared_ptr< RenderDocument > coastline::RenderDocument::Load ( SceneRenderer & renderer,
const std::filesystem::path & path,
const ModelOptions & options = {} )
static

Read a glTF document of the import, upload its vertices and the images no paint colours, and decode the images of its materials.

Parameters
rendererThe renderer that draws the models of the document.
pathThe glTF document.
optionsThe images, the palette variants, and the damage of the document.
Returns
The document, or nothing with the reason logged.

◆ operator=()

RenderDocument & coastline::RenderDocument::operator= ( const RenderDocument & )
delete

Prevent assignment of uploaded document resources.

◆ PaintCount()

std::size_t coastline::RenderDocument::PaintCount ( ) const
Returns
The number of paints whose images the document has uploaded.

◆ RenderModel

friend class RenderModel
friend

The documentation for this class was generated from the following file: