HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_VolumeVK Class Reference

#include <GR_VolumeVK.h>

+ Inheritance diagram for GR_VolumeVK:

Public Member Functions

 GR_VolumeVK (GR_Primitive *prim, GR_VolumeBase *base)
 
 ~GR_VolumeVK () override
 
const char * className () const override
 
void update (RE_RenderContext rc, const GT_PrimitiveHandle &primh, const GR_UpdateParms &parms, const char *cache_name) override
 
void viewUpdate (RE_RenderContext r, const GR_DisplayOption &opts, const char *cache_name, RE_CacheVersion geo_version, RE_CacheVersion select_version) override
 
void draw (RE_RenderContext rc, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms dp) override
 Normal drawing method. Only issue rendering commands. More...
 
exint getNumGLPrimitives () const override
 
- Public Member Functions inherited from GR_GeoRenderVK
 GR_GeoRenderVK (GR_Primitive *parent_prim)
 
 ~GR_GeoRenderVK () override
 
RV_GeometrycreateGeometryVK (exint num_points)
 
RE_GeometrygetGeometry () override
 
RV_GeometrygetVkGeometry () override
 
virtual void getVkDecorGeometry (GR_DecorationRender::PrimitiveType prim_type, RV_PrimType render_prim, RV_Geometry &geo, int &out_connect_start, int &out_connect_num)
 
void fillAttributesVK (RV_Render *r, const GT_Primitive *prim, const GR_UpdateParms &p, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, bool needs_nml, bool needs_uv, bool needs_tangent, bool need_prim_vert_info, const GT_DataArrayHandle &point_norm)
 
void buildPointID (RV_Render *r, RV_Geometry *rv_geo, GR_FillAttributesVK *attrib_fill, const GT_Primitive &prim, const GU_ConstDetailHandle &geo, const RE_CacheVersion &ver)
 
bool buildInstanceObjectAttrib (RV_Render *r, const GT_PrimitiveHandle &h, const GR_UpdateParms &p, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, const UT_Matrix4DArray *instance_trans, const RE_CacheVersion &instance_version, int instance_group, UT_Matrix4D *out_transform)
 
void addExternalAttribArray (RV_Render *r, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, const char *attrib_name, RV_AttributeType array_type, const GT_DataArrayHandle &dh, const GR_DisplayOption &opts, bool fill_immediately)
 
void addInstAttribArray (RV_Render *r, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, const char *attrib_name, int inst_group, RV_AttributeType array_type, const GT_DataArrayHandle &dh, const GR_DisplayOption &opts, const RE_CacheVersion &geo_ver, const gr_FillType &fill_type)
 
void cleanupGeoOverride (RV_Render *r, const GR_DisplayOption *opt, RV_Geometry *geo)
 
void setupGeoOverride (RV_Render *r, const GR_DisplayOption *opt, RV_Geometry *geo, UT_UniquePtr< RV_OverrideList > &override_list)
 
void updateWireColor (RV_Render *r, GR_Uniforms *u, RV_Geometry *geo, const GR_DisplayOption *opt, RV_OverrideList &overrides) const
 
GR_FillAttributesVKPtr createFillTask (RV_Render *r, GR_GeoRenderVK *gr, const GT_Primitive *prim, const GU_Detail *geo, const GR_DisplayOption *opts, int num_points)
 
void runFillTask (RV_Render *r, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill)
 
void updateInstanceGroupBuffer (const GR_InstanceBuffer *buffer, int instance_group)
 
- Public Member Functions inherited from GR_GeoRender
 GR_GeoRender (GR_Primitive *parent_prim, RenderType type)
 
virtual ~GR_GeoRender ()
 
bool isGL () const
 
bool isVulkan () const
 
virtual bool supportsInstances () const
 By default, no instanced drawing support. More...
 
virtual bool isConvexed () const
 
virtual void geometryUpdated (RE_RenderContext)
 
virtual void retireGeometry ()
 
virtual bool hasTransparency () const
 returns true if this drawable renders some transparent elements More...
 
virtual void getPickConnectGroup (unsigned int pick_mode, GR_PickGeometry pick_geo, int &out_connect_start, int &out_connect_num)
 
void getPickConnectGroup (unsigned int pick_mode, GR_PickGeometry pick_geo, int &out_connect_start, int &out_connect_num, int &out_connect_end)
 
virtual RV_GeometrygetVkPickGeometry (unsigned int pick_mode)
 
bool showSelections () const
 
GR_RenderVersion getRenderVersion () const
 
void allowGeoOverride (bool allow_overrides)
 
virtual bool canFrustumCull ()
 
bool inViewFrustum (const UT_Matrix4D &objviewproj, const UT_BoundingBoxD *bbox)
 
bool isRasterizedInView (const UT_Matrix4F &objviewproj, const UT_Vector2F &min_proj_size, const UT_BoundingBoxF *bbox=nullptr)
 
GR_BasePrimType getParentType () const
 
RenderType getRenderType () const
 
void buildInformation (bool prim_id, bool point_id)
 
bool shouldBuildPrimID () const
 
bool shouldBuildPointID () const
 
void setSelectionMask (GR_AttribMask selection_mask)
 
GR_AttribMask getSelectionMask () const
 
void setSelectionDisplayMode (GR_SelectMode m)
 
GR_SelectMode getSelectionDisplayMode () const
 
void setSelectionInstance (int i)
 
int getSelectionInstance () const
 
void setMaterialOverride (int mat_index)
 
void clearMaterialOverride ()
 
bool getDetailPrimID (int &id) const
 
void addUpdateMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
GT_DataArrayHandle buildPointIDData (const GT_Primitive &prim, const GU_ConstDetailHandle &geo, int npoints)
 
GT_DataArrayHandle buildPrimitiveIDData (const GT_Primitive &prim, const GU_ConstDetailHandle &geo)
 
void setGeoBounds (const UT_BoundingBox &b)
 
const UT_BoundingBoxDgetGeoBounds () const
 

Static Public Member Functions

static bool initShaders (RV_Instance *inst)
 
static void initResources (RV_Render *r)
 
static void cleanupShaders ()
 
static void cleanupResources ()
 
static RV_ShaderProgramgetVolumeSliceShader (RV_Render *r, bool bspline)
 
static RV_ShaderProgramgetVolumeSliceShaderHQ (RV_Render *r, bool bspline)
 
static RV_ShaderProgramgetVolumeMaterialShader (RV_Render *r, bool bspline)
 
static RV_ShaderProgramgetVolumeNormalShader (RV_Render *r, bool bspline)
 
static RV_ShaderProgramgetVolumeMotionShader (RV_Render *r, bool bspline)
 
static RV_VKImageget3DNoise (RV_Render *r)
 
static RV_VKImageget2DNoise (RV_Render *r)
 
static RV_VKImagegetBSplineWeights (RV_Render *r)
 
- Static Public Member Functions inherited from GR_GeoRenderVK
static void fillGeoAttribs (RV_Render *r, const GT_Primitive *prim, const GR_UpdateParms &p, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, bool needs_normal, bool needs_uv, bool needs_tangent, bool need_prim_vert_info, const GT_DataArrayHandle &point_normals, GR_BasePrimType packed_type, bool build_point_id, bool build_prim_id, GR_GeoRenderVK *geo_ren, bool *has_detail_prim_id, int *detail_prim_id, int *num_bone_deform)
 
static void addAttribArray (RV_Render *r, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, const char *attrib_name, RV_AttributeType array_type, const GT_DataArrayHandle &dh, const GR_DisplayOption &opts, const RE_CacheVersion &geo_ver, const gr_FillType &fill_type, const GT_Owner original_type=GT_OWNER_INVALID)
 
- Static Public Member Functions inherited from GR_GeoRender
static bool createTanAttrib (UT_Vector4F *tan_data, const GT_DataArray *nml, const GT_DataArray *tanu, const GT_DataArray *tanv, const GT_DataArray *vlist)
 

Friends

struct gr_SliceDrawTask
 
class GR_VolumeRender
 

Additional Inherited Members

- Public Types inherited from GR_GeoRender
enum  RenderType { OPENGL, VULKAN }
 
- Protected Member Functions inherited from GR_GeoRenderVK
bool initTransformAndPassInfo (RV_Render *r, GR_Uniforms *u, const RV_ShaderProgram *shader)
 
GR_SelectMode buildSelection (RV_Render *r, const GR_UpdateParms &p, RV_Geometry *geo, GR_FillAttributesVK *attrib_fill, const GT_PrimitiveHandle &primh, const GT_DataArrayHandle &vertex_list)
 
- Protected Member Functions inherited from GR_GeoRender
GR_AttribMask hasAttribute (const GT_Primitive *prim, const char *name, GT_DataArrayHandle &h) const
 
GT_PrimitiveHandle getCachedGTPrimitive ()
 
void cacheGTPrimitive (GT_PrimitiveHandle &primh)
 
int getCurrentLayer () const
 
template<typename T >
GR_SelectMode addToPointSelection (const UT_Span< T > &out_select, const GU_Detail &geo, const GT_DataArrayHandle &vh, const GT_DataArrayHandle &vl, const GA_PointGroup *pntsel, bool use_vertex_for_point_select, bool &init)
 
GR_SelectMode addToVertexSelection (const UT_Span< uint8 > &out_select, const GU_Detail &geo, const GT_DataArrayHandle &vh, const GA_VertexGroup *vertsel, bool &init)
 
template<typename T >
GR_SelectMode addToEdgeSelection (const UT_Span< T > &out_select, const GU_Detail &geo, const GT_DataArrayHandle &vt, const GT_DataArrayHandle &vert_list, const GA_EdgeGroup *edgesel, bool &init)
 
GR_SelectMode addToPrimSelection (const UT_Span< uint8 > &out_select, const GT_DataArrayHandle &vh, const GA_PrimitiveGroup *primsel, bool &init)
 
- Protected Attributes inherited from GR_GeoRenderVK
gr_SetCache myObjectSet
 
gr_SetCache myShaderSet
 
UT_UniquePtr< RV_ShaderBlockmyTransformBlock
 
UT_UniquePtr< RV_ShaderBlockmyColorOverrideBlock
 
UT_UniquePtr< RV_VKImagemyColorOverrideRampBuffer
 
UT_UniquePtr< RV_GeometrymyGeometryVk
 
- Protected Attributes inherited from GR_GeoRender
RenderType myRenderer
 
const GR_RenderInfomyInfo
 
GR_MaterialGroups myMatGroups
 
UT_BoundingBoxD myBounds
 
unsigned myBuildPointInfo: 1
 
unsigned myBuildPrimInfo: 1
 
unsigned myHasDetailPrimID: 1
 
unsigned myHasInstancedTransform: 1
 
unsigned myHasIdentityTransform: 1
 
unsigned myUseBoneDeform: 1
 
unsigned myNumBoneDeform: 2
 
unsigned myAllowGeoOverride: 1
 
UT_Matrix4D myPrimitiveTransform
 
GR_AttribMask mySelectionMask
 
GR_SelectMode myCurrentSelection
 
int myCurrentPointSelectInstance
 
int myMaterialOverride
 
int myConvexFlag
 
int myDetailPrimID
 
GR_PrimitivemyParentPrim
 
int myCurrentLayer
 

Detailed Description

Definition at line 42 of file GR_VolumeVK.h.

Constructor & Destructor Documentation

GR_VolumeVK::GR_VolumeVK ( GR_Primitive prim,
GR_VolumeBase base 
)
GR_VolumeVK::~GR_VolumeVK ( )
override

Member Function Documentation

const char* GR_VolumeVK::className ( ) const
inlineoverridevirtual

Implements GR_GeoRender.

Definition at line 48 of file GR_VolumeVK.h.

static void GR_VolumeVK::cleanupResources ( )
static
static void GR_VolumeVK::cleanupShaders ( )
static
void GR_VolumeVK::draw ( RE_RenderContext  r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
GR_DrawParms  draw_parms 
)
overridevirtual

Normal drawing method. Only issue rendering commands.

Implements GR_GeoRender.

static RV_VKImage* GR_VolumeVK::get2DNoise ( RV_Render r)
static
static RV_VKImage* GR_VolumeVK::get3DNoise ( RV_Render r)
static
static RV_VKImage* GR_VolumeVK::getBSplineWeights ( RV_Render r)
static
exint GR_VolumeVK::getNumGLPrimitives ( ) const
overridevirtual

return the number of GL primitives that this renderer produces. May be roughly estimated.

Implements GR_GeoRender.

static RV_ShaderProgram* GR_VolumeVK::getVolumeMaterialShader ( RV_Render r,
bool  bspline 
)
static
static RV_ShaderProgram* GR_VolumeVK::getVolumeMotionShader ( RV_Render r,
bool  bspline 
)
static
static RV_ShaderProgram* GR_VolumeVK::getVolumeNormalShader ( RV_Render r,
bool  bspline 
)
static
static RV_ShaderProgram* GR_VolumeVK::getVolumeSliceShader ( RV_Render r,
bool  bspline 
)
static
static RV_ShaderProgram* GR_VolumeVK::getVolumeSliceShaderHQ ( RV_Render r,
bool  bspline 
)
static
static void GR_VolumeVK::initResources ( RV_Render r)
static
static bool GR_VolumeVK::initShaders ( RV_Instance inst)
static
void GR_VolumeVK::update ( RE_RenderContext  r,
const GT_PrimitiveHandle primh,
const GR_UpdateParms p,
const char *  cache_name 
)
overridevirtual

Update the geometry of this render object using the GT primitive. No rendering commands should be issued.

Implements GR_GeoRender.

void GR_VolumeVK::viewUpdate ( RE_RenderContext  r,
const GR_DisplayOption opts,
const char *  cache_name,
RE_CacheVersion  geo_version,
RE_CacheVersion  select_version 
)
overridevirtual

Called when the view changes, if the parent primitive requested view changes

Reimplemented from GR_GeoRender.

Friends And Related Function Documentation

friend struct gr_SliceDrawTask
friend

Definition at line 116 of file GR_VolumeVK.h.

friend class GR_VolumeRender
friend

Definition at line 117 of file GR_VolumeVK.h.


The documentation for this class was generated from the following file: