demotool/demo.hh

55 lines
1.1 KiB
C++

#pragma once
#include "raymarcher.hh"
#include "dof.hh"
#include "bloom.hh"
#include "combine.hh"
#include "fxaa.hh"
#include "profiling.hh"
#include "sync.hh"
struct T_Demo
{
T_Demo( ) = delete;
NO_COPY( T_Demo );
NO_MOVE( T_Demo );
// ---------------------------------------------------------------------
T_Demo( __rd__ const uint32_t width ,
__rd__ const uint32_t height );
bool initialise( );
void makeUI( );
void render( );
void handleDND(
__rd__ ImVec2 const& move ,
__rd__ const bool hasCtrl ,
__rd__ const bool hasShift ,
__rd__ const bool lmb // Left mouse button
);
void handleWheel(
__rd__ const float wheel ,
__rd__ const bool hasCtrl ,
__rd__ const bool hasShift
);
// ---------------------------------------------------------------------
const uint32_t width;
const uint32_t height;
bool playing = false;
std::unique_ptr< T_Raymarcher > raymarcher;
std::unique_ptr< T_DoFPass > dof;
std::unique_ptr< T_BloomPass > bloom;
std::unique_ptr< T_CombinePass > combine;
std::unique_ptr< T_FXAAPass > fxaa;
private:
bool playingPrevious = false;
float lastFrame;
};