demotool/demo.hh
Emmanuel BENOîT 3de255aad0 Started using new control code + bugfixes
The program is loaded and its init part is run. Many bugs were fixed in
the process, including various new bugs in the shaders manager.
2017-11-14 22:04:00 +01:00

65 lines
1.2 KiB
C++

#pragma once
#if 0
#include "raymarcher.hh"
#include "dof.hh"
#include "bloom.hh"
#include "combine.hh"
#include "fxaa.hh"
#include "profiling.hh"
#include "sync.hh"
#endif
#include "control.hh"
struct T_Demo
{
T_Demo( ) = delete;
NO_COPY( T_Demo );
NO_MOVE( T_Demo );
// ---------------------------------------------------------------------
T_Demo( const uint32_t width ,
const uint32_t height );
bool initialise( );
void makeUI( );
void render( );
bool loadProgram( );
void runInit( );
void handleDND(
ImVec2 const& move ,
const bool hasCtrl ,
const bool hasShift ,
const bool lmb // Left mouse button
);
void handleWheel(
const float wheel ,
const bool hasCtrl ,
const bool hasShift
);
// ---------------------------------------------------------------------
const uint32_t width;
const uint32_t height;
bool playing = false;
#if 0
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;
#endif
T_OwnPtr< ops::T_OpProgram > program;
T_OwnPtr< ops::T_OpContext > context;
private:
bool playingPrevious = false;
float lastFrame;
};