11 #ifndef GR_DecorationRender_h
12 #define GR_DecorationRender_h
42 #define GR_DECOR_OPT_VECTOR_SCALE "vector_scale"
43 #define GR_DECOR_OPT_VECTOR_ARROW_TIP "vector_arrow_tip"
44 #define GR_DECOR_OPT_POINT_SCALE "point_scale"
45 #define GR_DECOR_OPT_COLOR "color"
46 #define GR_DECOR_OPT_SELECT_COLOR "select_color"
47 #define GR_DECOR_OPT_FONT_SIZE "font_size"
48 #define GR_DECOR_OPT_COLOR_ATTRIB "color_attrib"
49 #define GR_DECOR_OPT_NORMALIZE "normalize"
50 #define GR_DECOR_OPT_COLOR_XFORM "color_xform"
51 #define GR_DECOR_OPT_COLOR_XFORM_REF_VEC "color_xform_ref_vec"
66 override_vis(over_vis),
67 instance_group(inst_grp),
104 {
return myHasOverlayDecorations; }
149 RenderTarget render_mode,
151 PrimitiveType glprim_type,
165 RenderTarget render_mode,
167 PrimitiveType glprim_type,
178 PrimitiveType prim_type);
186 PrimitiveType prim_type);
214 static void bindViewportVertexTexture(
219 static void cleanupShaders();
223 class GR_UserDecorInfo
227 : myCustomShaderRegistry(NULL),
238 : myCustomShaderRegistry(shader_registry),
239 myUserOption(user_option),
240 myAttribSize(attrib_size),
242 myIsString(is_string)
262 bool showSelections()
const
263 {
return myRenderInfo->showSelections(); }
265 {
return myDecorEnabled[dec]; }
269 int getUserDecorAttribSize(
int decor)
const;
270 bool isFPUserDecor(
int decor)
const;
271 bool isStringUserDecor(
int decor)
const;
292 PrimitiveType prim_type,
309 PrimitiveType prim_type);
331 PrimitiveType prim_type);
338 PrimitiveType prim_type,
363 PrimitiveType prim_type,
380 PrimitiveType prim_type);
388 PrimitiveType prim_type);
397 PrimitiveType prim_type,
419 int myUserStringCount[3];
420 int myUserStringIndex[3];
423 bool myHasDecorations;
424 bool myHasOverlayDecorations;
449 myDecorAttribSize(1),
460 const char *dec_attrib,
462 bool overlay =
false,
467 myDecorAttribOwner(dec_attrib_owner),
468 myDecorAttribSize(dec_attrib_size),
469 myDecorAttribStorage( dec_attrib_store),
471 mySelectMode(select_mode),
472 myVisibility(visibility),
477 myDecorAttrib.harden(dec_attrib);
483 myDecorAttribOwner = src.myDecorAttribOwner;
484 myDecorAttribSize = src.myDecorAttribSize;
486 myDecorAttrib.harden(src.myDecorAttrib);
487 myMaskAttrib.harden(src.myMaskAttrib);
489 myStyle = src.myStyle;
490 mySelectMode = src.mySelectMode;
491 myVisibility = src.myVisibility;
492 myDecorAttribStorage = src.myDecorAttribStorage;
494 myOptions = src.myOptions;
499 {
return myDecorAttribOwner; }
501 { myDecorAttribOwner = owner; }
503 {
return myDecorAttrib.length()
504 ? (
const char *)myDecorAttrib :
nullptr; }
506 { myDecorAttrib.harden(attrib); }
508 {
return myDecorAttribSize; }
510 { myDecorAttribSize =
size; }
512 {
return myDecorAttribStorage; }
514 { myDecorAttribStorage = store; }
516 {
return myMaskAttrib.length()
517 ? (
const char*) myMaskAttrib : 0; }
519 { myMaskAttrib.harden(attrib); }
525 {
return mySelectMode; }
527 {
return myVisibility; }
529 { myVisibility = vis; }
534 const {
return myOptions; }
548 int myDecorAttribSize;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
GR_VisualizerInfo(GA_AttributeOwner dec_attrib_owner, int dec_attrib_size, const char *dec_attrib, GT_Storage dec_attrib_store, bool overlay=false, GR_VisualizerDecorStyle style=GR_VISUALIZER_DECOR_TEXT, GR_SelectMode select_mode=GR_SELECT_NONE, GR_DecorVisibility visibility=GR_DECOR_ALWAYS_VISIBLE, int owner_id=-1)
GR_DecorVisibility getVisibility() const
const GR_DisplayOption * opts
const char * getMaskAttrib() const
void setMaskAttrib(const char *attrib)
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
GR_VisualizerDecorStyle getStyle() const
int getDecorAttribSize() const
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
const char * getDecorAttrib() const
Temporary container for either a RV_Render and an RE_Render.
void setDecorAttribOwner(GA_AttributeOwner owner)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
set of parameters sent to GR_Primitive::update()
void setStyle(GR_VisualizerDecorStyle style)
GA_API const UT_StringHolder scale
GR_DecorationParms(const GR_DisplayOption *opt, bool over, bool over_vis, int inst_grp, GR_DecorRenderFlags flags)
GR_DecorRenderFlags render_flags
void setOwnerId(int owner_id)
vint4 select(const vbool4 &mask, const vint4 &a, const vint4 &b)
void setDecorAttrib(const char *attrib)
void setDecorAttribStorage(GT_Storage store)
GT_Storage getDecorAttribStorage() const
GR_VisualizerInfo & operator=(const GR_VisualizerInfo &src)
ImageBuf OIIO_API over(const ImageBuf &A, const ImageBuf &B, ROI roi={}, int nthreads=0)
GA_AttributeOwner getDecorAttribOwner() const
UT_StringArray RV_OverrideList
The base class for all GT primitive types.
Handle to the main interface of Vulkan.
const UT_Options * getOptions() const
GR_SelectMode getSelectMode() const
A map of string to various well defined value types.
void attachOptions(UT_Options *opts)
void setVisibility(GR_DecorVisibility vis)
bool hasOverlayDecorations() const
void setDecorAttribSize(int size)
const GR_VisualizerInfo * visualizer