demotool/demo.hh

58 lines
1,013 B
C++
Raw Normal View History

2017-10-02 13:51:08 +02:00
#pragma once
#if 0
2017-10-02 13:51:08 +02:00
#include "raymarcher.hh"
#include "dof.hh"
#include "bloom.hh"
#include "combine.hh"
2017-10-05 18:35:35 +02:00
#include "fxaa.hh"
2017-10-02 13:51:08 +02:00
#include "profiling.hh"
2017-10-07 17:39:38 +02:00
#include "sync.hh"
#endif
#include "control.hh"
2017-10-02 13:51:08 +02:00
struct T_Demo
{
T_Demo( ) = delete;
NO_COPY( T_Demo );
NO_MOVE( T_Demo );
// ---------------------------------------------------------------------
T_Demo( const uint32_t width ,
const uint32_t height );
2017-10-02 13:51:08 +02:00
bool initialise( );
void render( );
bool loadProgram( );
void runInit( );
2017-10-02 13:51:08 +02:00
void handleDND(
ImVec2 const& move ,
const bool hasCtrl ,
const bool hasShift ,
const bool lmb // Left mouse button
2017-10-02 13:51:08 +02:00
);
void handleWheel(
const float wheel ,
const bool hasCtrl ,
const bool hasShift
2017-10-02 13:51:08 +02:00
);
// ---------------------------------------------------------------------
const uint32_t width;
const uint32_t height;
2017-10-07 17:39:38 +02:00
bool playing = false;
T_OwnPtr< ops::T_OpProgram > program;
T_OwnPtr< ops::T_OpContext > context;
2017-10-07 17:39:38 +02:00
private:
bool playingPrevious = false;
float lastFrame;
2017-10-02 13:51:08 +02:00
};