2017-10-06 14:29:01 +02:00
|
|
|
#pragma once
|
2017-11-23 23:31:24 +01:00
|
|
|
#include "ui-texture.hh"
|
|
|
|
#include "ui-shaders.hh"
|
2017-10-06 14:29:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
struct T_OutputDebugger
|
|
|
|
{
|
|
|
|
friend struct T_Texture;
|
|
|
|
|
|
|
|
T_OutputDebugger( );
|
|
|
|
NO_COPY( T_OutputDebugger );
|
|
|
|
NO_MOVE( T_OutputDebugger );
|
|
|
|
~T_OutputDebugger( );
|
|
|
|
|
|
|
|
void registerTexture(
|
2017-11-04 09:29:06 +01:00
|
|
|
T_Texture& texture ,
|
|
|
|
const E_ODbgMode mode ,
|
|
|
|
T_String const& name );
|
2017-10-06 14:29:01 +02:00
|
|
|
|
|
|
|
bool& uiEnabled( )
|
|
|
|
{ return enabled_; }
|
|
|
|
void makeUI( );
|
|
|
|
|
|
|
|
bool isActive( ) const
|
|
|
|
{ return selected_ != -1; }
|
|
|
|
void debugOutput( );
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct T_Texture_
|
|
|
|
{
|
|
|
|
GLuint id;
|
|
|
|
uint32_t levels;
|
|
|
|
E_ODbgMode mode;
|
2017-11-04 09:29:06 +01:00
|
|
|
T_String name;
|
2017-10-06 14:29:01 +02:00
|
|
|
//
|
|
|
|
int submode;
|
|
|
|
int lod;
|
|
|
|
};
|
|
|
|
|
|
|
|
using F_SubmodeSetup = std::function< void( GLuint ) >;
|
|
|
|
struct T_Submode_
|
|
|
|
{
|
2017-11-04 09:29:06 +01:00
|
|
|
T_String name;
|
2017-10-06 14:29:01 +02:00
|
|
|
T_ShaderPipeline pipeline;
|
|
|
|
F_SubmodeSetup setup;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool enabled_ = false;
|
|
|
|
uint32_t nRegistered_ = 0;
|
2017-11-03 09:08:19 +01:00
|
|
|
T_Array< T_Texture_ > outputs_;
|
|
|
|
T_Array< T_Submode_ > submodes_[ int( E_ODbgMode::__COUNT__ ) ];
|
2017-10-06 14:29:01 +02:00
|
|
|
char* smCombo_[ int( E_ODbgMode::__COUNT__ ) ];
|
2017-11-04 09:29:06 +01:00
|
|
|
ebcl::T_StringBuilder imguiStrings;
|
2017-10-06 14:29:01 +02:00
|
|
|
|
|
|
|
int32_t selected_ = -1;
|
|
|
|
char* selectorItems_;
|
2017-11-03 09:08:19 +01:00
|
|
|
T_Array< int32_t > selectorMapping_;
|
2017-10-06 14:29:01 +02:00
|
|
|
|
|
|
|
void registerSubmode(
|
2017-11-04 09:29:06 +01:00
|
|
|
const E_ODbgMode mode ,
|
|
|
|
T_String const& name ,
|
2017-11-24 13:46:43 +01:00
|
|
|
char const* shader ,
|
2017-11-04 09:29:06 +01:00
|
|
|
F_SubmodeSetup setup = F_SubmodeSetup( ) );
|
2017-10-06 14:29:01 +02:00
|
|
|
void initSubmodeCombo( );
|
|
|
|
|
|
|
|
int32_t registerTexture(
|
2017-11-04 09:29:06 +01:00
|
|
|
const GLuint id ,
|
|
|
|
const uint32_t levels ,
|
|
|
|
const E_ODbgMode mode ,
|
|
|
|
T_String const& name );
|
2017-10-06 14:29:01 +02:00
|
|
|
void unregisterTexture(
|
2017-11-04 09:29:06 +01:00
|
|
|
const uint32_t index );
|
2017-10-06 14:29:01 +02:00
|
|
|
|
|
|
|
void makeSelectorItems( );
|
|
|
|
void clearSelectorItems( );
|
|
|
|
};
|
|
|
|
|