11 #ifndef GR_DecorationRender_h
12 #define GR_DecorationRender_h
43 #define GR_DECOR_OPT_VECTOR_SCALE "vector_scale"
44 #define GR_DECOR_OPT_VECTOR_ARROW_TIP "vector_arrow_tip"
45 #define GR_DECOR_OPT_POINT_SCALE "point_scale"
46 #define GR_DECOR_OPT_COLOR "color"
47 #define GR_DECOR_OPT_SELECT_COLOR "select_color"
48 #define GR_DECOR_OPT_FONT_SIZE "font_size"
49 #define GR_DECOR_OPT_COLOR_ATTRIB "color_attrib"
50 #define GR_DECOR_OPT_NORMALIZE "normalize"
51 #define GR_DECOR_OPT_COLOR_XFORM "color_xform"
52 #define GR_DECOR_OPT_COLOR_XFORM_REF_VEC "color_xform_ref_vec"
67 override_vis(over_vis),
68 instance_group(inst_grp),
105 {
return myHasOverlayDecorations; }
150 RenderTarget render_mode,
152 PrimitiveType glprim_type,
170 RenderTarget render_mode,
172 PrimitiveType glprim_type,
184 RenderTarget render_mode,
186 PrimitiveType glprim_type,
197 PrimitiveType prim_type);
209 PrimitiveType prim_type);
217 PrimitiveType prim_type);
245 static void bindViewportVertexTexture(
254 class GR_UserDecorInfo
258 : myCustomShaderRegistry(NULL),
269 : myCustomShaderRegistry(shader_registry),
270 myUserOption(user_option),
271 myAttribSize(attrib_size),
273 myIsString(is_string)
293 bool showSelections()
const
294 {
return myRenderInfo->showSelections(); }
296 {
return myDecorEnabled[
dec]; }
300 int getUserDecorAttribSize(
int decor)
const;
301 bool isFPUserDecor(
int decor)
const;
302 bool isStringUserDecor(
int decor)
const;
323 PrimitiveType prim_type,
340 PrimitiveType prim_type);
362 PrimitiveType prim_type);
369 PrimitiveType prim_type,
388 int geo_connect_group,
395 PrimitiveType prim_type,
412 PrimitiveType prim_type);
416 int geo_connect_group,
421 PrimitiveType prim_type);
430 PrimitiveType prim_type,
452 int myUserStringCount[3];
453 int myUserStringIndex[3];
456 bool myHasDecorations;
457 bool myHasOverlayDecorations;
482 myDecorAttribSize(1),
493 const char *dec_attrib,
495 bool overlay =
false,
500 myDecorAttribOwner(dec_attrib_owner),
501 myDecorAttribSize(dec_attrib_size),
502 myDecorAttribStorage( dec_attrib_store),
504 mySelectMode(select_mode),
505 myVisibility(visibility),
510 myDecorAttrib.harden(dec_attrib);
516 myDecorAttribOwner = src.myDecorAttribOwner;
517 myDecorAttribSize = src.myDecorAttribSize;
519 myDecorAttrib.harden(src.myDecorAttrib);
520 myMaskAttrib.harden(src.myMaskAttrib);
522 myStyle = src.myStyle;
523 mySelectMode = src.mySelectMode;
524 myVisibility = src.myVisibility;
525 myDecorAttribStorage = src.myDecorAttribStorage;
527 myOptions = src.myOptions;
532 {
return myDecorAttribOwner; }
534 { myDecorAttribOwner = owner; }
536 {
return myDecorAttrib.length()
537 ? (
const char *)myDecorAttrib :
nullptr; }
539 { myDecorAttrib.harden(attrib); }
541 {
return myDecorAttribSize; }
543 { myDecorAttribSize =
size; }
545 {
return myDecorAttribStorage; }
547 { myDecorAttribStorage = store; }
549 {
return myMaskAttrib.length()
550 ? (
const char*) myMaskAttrib : 0; }
552 { myMaskAttrib.harden(attrib); }
558 {
return mySelectMode; }
560 {
return myVisibility; }
562 { myVisibility = vis; }
567 const {
return myOptions; }
581 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)
GLint GLint GLsizei GLint GLenum GLenum type
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)
constexpr auto set(type rhs) -> int
RV_API void cleanupShaders()
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
RV_API bool initShaders(RV_Instance *inst)
GR_SelectMode getSelectMode() const
A map of string to various well defined value types.
GA_API const UT_StringHolder parms
void attachOptions(UT_Options *opts)
void setVisibility(GR_DecorVisibility vis)
bool hasOverlayDecorations() const
void setDecorAttribSize(int size)
const GR_VisualizerInfo * visualizer