14 #ifndef hifi_render_DrawStatus_h
15 #define hifi_render_DrawStatus_h
18 #include "gpu/Batch.h"
21 class DrawStatusConfig :
public Job::Config {
23 Q_PROPERTY(
bool showDisplay MEMBER showDisplay WRITE setShowDisplay)
24 Q_PROPERTY(
bool showNetwork MEMBER showNetwork WRITE setShowNetwork)
26 DrawStatusConfig() : Job::Config(false) {}
30 bool showDisplay{
false };
31 bool showNetwork{
false };
32 bool showFade{
false };
35 void setShowDisplay(
bool enabled) { showDisplay = enabled; dirtyHelper(); }
36 void setShowNetwork(
bool enabled) { showNetwork = enabled; dirtyHelper(); }
37 void setShowFade(
bool enabled) { showFade = enabled; dirtyHelper(); }
45 using Config = DrawStatusConfig;
46 using Input = VaryingSet2<ItemBounds, glm::vec2>;
47 using JobModel = Job::ModelI<DrawStatus, Input, Config>;
50 DrawStatus(
const gpu::TexturePointer statusIconMap) { setStatusIconMap(statusIconMap); }
52 void configure(
const Config& config);
53 void run(
const RenderContextPointer& renderContext,
const Input& input);
55 const gpu::PipelinePointer getDrawItemBoundsPipeline();
56 const gpu::PipelinePointer getDrawItemStatusPipeline();
58 void setStatusIconMap(
const gpu::TexturePointer& map);
59 const gpu::TexturePointer getStatusIconMap()
const;
62 bool _showDisplay {
false };
63 bool _showNetwork {
false };
64 bool _showFade {
false };
66 gpu::Stream::FormatPointer _drawItemFormat;
67 gpu::PipelinePointer _drawItemBoundsPipeline;
68 gpu::PipelinePointer _drawItemStatusPipeline;
70 gpu::BufferPointer _boundsBuffer;
71 gpu::BufferPointer _instanceBuffer;
72 gpu::Stream::FormatPointer _vertexFormat;
73 gpu::TexturePointer _statusIconMap;