HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_Utils Namespace Reference

Utility GR methods common to all renderers. More...

Classes

class  gr_MatBucket
 

Functions

GR_API GR_AttribMask hasSelection (const GR_UpdateParms &p)
 Returns the selection type in p.geometry. More...
 
GR_API bool inPrimitiveSelection (const GR_UpdateParms &p, GA_Offset prim_id, const GU_Detail *geo=nullptr)
 
GR_API bool inPointSelection (const GR_UpdateParms &p, GA_Offset point_id, const GU_Detail *geo=nullptr)
 Returns true if point_id is in the selection list for p.geometry. More...
 
GR_API bool inVertexSelection (const GR_UpdateParms &p, GA_Offset vert_id, const GU_Detail *geo=nullptr)
 Returns true if vert_id is in the selection list for p.geometry. More...
 
GR_API GR_SelectMode inPrimitiveSelection (const GR_UpdateParms &p, const UT_Array< GA_Offset > &pids, UT_BitArray &selected)
 Checks if passed prim offsets are in p.geometry's selection. Returns GR_SELECT_PRIM_PARTIAL/FULL if some or all of the prim offsets are in the cook or temp selections, as indicated by the parms in p, otherwise GR_SELECT_NONE is returned. The individual selection results are returned in 'selected'. More...
 
GR_API GR_SelectMode inPointSelection (const GR_UpdateParms &p, const UT_Array< GA_Offset > &pids, UT_BitArray &selected)
 Checks if passed point offsets are in p.geometry's selection. Returns GR_SELECT_POINT_PARTIAL/FULL if some or all of the point offsets are in the cook or temp selections, as indicated by the parms in p, otherwise GR_SELECT_NONE is returned. The individual selection results are returned in 'selected'. More...
 
GR_API GR_SelectMode inVertexSelection (const GR_UpdateParms &p, const UT_Array< GA_Offset > &vids, UT_BitArray &selected)
 Checks if passed vertex offsets are in p.geometry's selection. More...
 
GR_API RE_CacheVersion getAttribVersion (const GT_DataArrayHandle &ph, RE_CacheVersion geo_version)
 Return the cache version for attribute 'ph'. More...
 
GR_API RE_CacheVersion getTopologyVersion (const GT_Primitive *prim, RE_CacheVersion geo_version)
 Return the cache version for the topology of primitive 'prim'. More...
 
GR_API bool hasPrimTransform (const RE_Geometry *geo)
 Return true if the geometry has a per-prim transform or per-prim visibility. More...
 
GR_API void setupGhosting (RE_RenderContext r, int opaque_data[3], fpreal transparency=0.25f)
 
GR_API void cleanupGhosting (RE_RenderContext r, int opaque_data[3])
 
RE_GPUType getREType (GT_Storage s)
 Convenience method to return an RE type from a GT storage type. More...
 
GR_API void assignInstanceGroupArray (RE_Geometry *to_geo, const RE_VertexArray *array, int instance_group=-1)
 
GR_API bool removeInstanceGroupArray (RE_Geometry *from_geo, int instance_group, const char *attrib_name, RE_GenericAttribID id=RE_GENATTRIB_NONE)
 
GR_API RE_GPUType getAttributeType (RE_Render *r, const char *attrib_name, int &vsize, const GT_DataArrayHandle &pa, const GR_DisplayOption &opts, RE_ArrayType array_type)
 
GR_API bool buildInstanceObjectMatrix (RE_Render *r, const GT_PrimitiveHandle &h, const GR_UpdateParms &p, RE_Geometry *geo, RE_CacheVersion version, int instance_group=0, UT_Matrix4D *transform=NULL)
 
GR_API void buildInstanceIndex (RE_Render *r, RE_Geometry *geo, bool has_partial_visibility, const UT_IntArray &inst_indices, int instance_group, int max_capacity)
 
GR_API void buildBoneRegionsAndWeights (RE_Render *r, RE_VertexArray **bone_idx, RE_VertexArray **bone_weight, const GT_DataArrayHandle &dh, RE_CacheVersion version, int bone_limit, int &ret_bone_limit)
 contributors are taken (to fit in a up to 3 vec4/ivec4 attribute pairs). More...
 
GR_API RE_VertexArrayfillAttribArray (RE_Render *r, RE_Geometry *geo, const char *attrib_name, const GT_DataArrayHandle &h, const GR_DisplayOption &opts, RE_ArrayType atype, RE_CacheVersion geo_version)
 
GR_API voidfillAttribData (RE_Render *r, const char *attrib_name, const GT_DataArrayHandle &pa, const GR_DisplayOption &opts, RE_ArrayType array, bool build_string_tables=true)
 
GR_API void fillStringAttrib (RE_Render *r, const GT_DataArrayHandle &dh, RE_Geometry *geo, RE_VertexArray *array, const RE_CacheVersion &version)
 
GR_API RE_ShadergetWireShader (RE_Render *r)
 
GR_API RE_ShadergetRibbonShader (RE_Render *r)
 
GR_API RE_ShadergetRibbonUVShader (RE_Render *r)
 
GR_API RE_ShadergetConstPointShader (RE_Render *r)
 
GR_API RE_ShadergetColorShader (RE_Render *r)
 
GR_API RE_ShadergetMatteShader (RE_Render *r)
 
GR_API RE_ShadergetMatteDisplaceShader (RE_Render *r)
 
GR_API RE_ShadergetDepthShader (RE_Render *r)
 
GR_API RE_ShadergetDepthPrimTransformShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCubeShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCubeLineShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCubePointShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCubeDisplaceShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCubePrimTransformShader (RE_Render *r)
 
GR_API RE_ShadergetDepthLinearShader (RE_Render *r)
 
GR_API RE_ShadergetDepthLinearDisplaceShader (RE_Render *r)
 
GR_API RE_ShadergetDepthLinearPrimTransformShader (RE_Render *r)
 
GR_API RE_ShadergetDepthWireShader (RE_Render *r)
 
GR_API RE_ShadergetDepthWirePrimTransformShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCascadeShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCascadeLineShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCascadePointShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCascadeDisplaceShader (RE_Render *r)
 
GR_API RE_ShadergetDepthCascadePrimTransformShader (RE_Render *r)
 
GR_API void buildInstancedCenterPoints (RE_RenderContext r, const GT_PrimitiveHandle &handle, const GR_UpdateParms &p, const UT_Matrix4DArray &primxforms, const GT_DataArrayHandle &prim_ids, const GT_DataArrayHandle &pnt_ids, const GT_DataArrayHandle &vtx_ids, const UT_Vector3F &point, RE_CacheVersion point_version, GR_GeoRender *gr, const char *cache_name, GT_PrimitiveHandle *pt_handle=nullptr, GR_SelectMode *pnt_sel_mode=NULL, bool is_offsets=true)
 
GR_API void buildCenterPoint (RE_Render *r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const UT_Matrix4DArray &prim_xforms, const GT_DataArrayHandle &prim_ids, const GT_DataArrayHandle &point_ids, const GT_DataArrayHandle &vert_ids, const UT_Vector3F &point, RE_CacheVersion point_version, RE_Geometry *geo, RE_VertexArrayRef *p_ref, RE_VertexArrayRef *inst_mat_ref, GR_SelectMode *point_select_mode, bool is_offsets)
 
GR_API void buildCenterPoints (RE_RenderContext r, const GT_PrimitiveHandle &handle, const GR_UpdateParms &p, const UT_Matrix4DArray &primxforms, const GT_DataArrayHandle &prim_ids, const GT_DataArrayHandle &pnt_ids, const GT_DataArrayHandle &vtx_ids, GR_GeoRender *gr, const char *cache_name, GT_PrimitiveHandle *pt_handle=nullptr, GR_SelectMode *pnt_sel_mode=NULL, bool is_offsets=true, bool build_selection=true)
 
GR_API void buildCenterPoints (RE_Render *r, const GT_PrimitiveHandle &handle, const GR_UpdateParms &p, const UT_Matrix4DArray &primxforms, const GT_DataArrayHandle &prim_ids, const GT_DataArrayHandle &pnt_ids, const GT_DataArrayHandle &vtx_ids, RE_Geometry *geo, GR_SelectMode *pnt_sel_mode=NULL, bool is_offsets=true, bool build_selection=true)
 
GR_API void buildCenterPointSelection (RE_Render *r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const GT_DataArrayHandle &prim_ids, const GT_DataArrayHandle &pnt_ids, const GT_DataArrayHandle &vert_ids, RE_Geometry *geo, GR_SelectMode *point_select_mode, bool is_offsets)
 
GR_API void createCenterPointAttribs (RE_Render *r, const GT_PrimitiveHandle &ph, const GR_UpdateParms &p, RE_Geometry *geo)
 
GR_API void buildCenterPointIDs (RE_Render *r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const GT_DataArrayHandle &prm_id, const GT_DataArrayHandle &pnt_id, const GT_DataArrayHandle &vtx_id, RE_Geometry *geo, bool is_offsets)
 
GR_API GR_SelectMode buildSelection (UT_Array< uint8 > &selected, const GR_UpdateParms &p, GT_DataArrayHandle prim_id, GT_DataArrayHandle pnt_id, GT_DataArrayHandle vert_id, bool is_offset, int repeat_count)
 
GR_API GR_SelectMode buildInstSelectInfo (RE_Render *r, RE_Geometry *geo, const GR_UpdateParms &p, RE_CacheVersion top_ver, GT_DataArrayHandle primid, GT_DataArrayHandle vtxid, GT_DataArrayHandle vertid, bool is_offsets=true, int instances_per_prim=1, UT_Array< uint8 > *result=NULL)
 
GR_API int getMaxTextureSize (RE_RenderContext rc)
 
GR_API int getMaxTexture3DSize (RE_RenderContext rc)
 
GR_API bool inViewFrustum (const UT_BoundingBoxD &bbox, const UT_Matrix4D &objviewproj, const UT_Vector4D *frustum_area=NULL)
 
GR_API bool inViewFrustum (const UT_BoundingBoxF &bbox, const UT_Matrix4F &objviewproj)
 
GR_API bool inViewFrustumWithLOD (const UT_BoundingBoxF &bbox, const UT_Matrix4F &objviewproj, bool &has_bounds, UT_Vector2F &bounds_2d)
 
GR_API bool isRasterized (const UT_Matrix4F &objviewproj, const UT_Vector2F &min_proj_size, const UT_BoundingBoxF &bbox)
 
GR_API GU_Connectivity getConnectivityFromString (const char *str)
 
GR_API UT_Array< std::pair
< gr_MatBucket *, int > > * 
bucketMaterials (const GT_DataArrayHandle &mat_id)
 
GR_API void cleanupBuckets (UT_Array< std::pair< gr_MatBucket *, int >> *&buckets)
 
GR_API void printUpdateReason (GR_UpdateReason r, std::ostream *os=NULL)
 
GR_API void updateReasonString (GR_UpdateReason r, UT_WorkBuffer &buf)
 
GR_API void printDrawMode (GR_RenderMode mode, std::ostream *os=NULL)
 
GR_API void printDrawFlags (GR_RenderFlags flags, std::ostream *os=NULL)
 
GR_API void drawFlagsString (GR_RenderFlags flags, UT_WorkBuffer &buf)
 
GR_API void drawModeString (GR_RenderMode mode, UT_WorkBuffer &buf)
 
RV_GPUType getRVType (GT_Storage s)
 
GR_API RV_GPUType getAttributeType (RV_Render *r, const char *attrib_name, const GT_DataArrayHandle &pa, const GR_DisplayOption &opts, RV_AttributeType array_type, int &out_vsize, bool &out_isnormalized)
 
GR_API voidfillAttribData (RV_Render *r, const char *attrib_name, const GT_DataArrayHandle &pa, const GR_DisplayOption &opts, RV_AttributeType array, bool build_string_tables=true)
 
GR_API GR_SelectMode buildInstSelectInfo (RV_Render *r, RV_Geometry *geo, const GR_UpdateParms &p, RE_CacheVersion top_ver, GT_DataArrayHandle prim_id, GT_DataArrayHandle pnt_id, GT_DataArrayHandle vert_id, bool is_offset=true, int inst_per_prim=1, UT_Array< uint8 > *selected=nullptr)
 
GR_API bool createOrReuseSet (RV_Render *r, UT_UniquePtr< RV_ShaderVariableSet > &set, int set_num, const RV_ShaderProgramBase *shader, bool *created=nullptr, const char *name=nullptr)
 
GR_API bool initBuiltinBlock (RV_Render *r, UT_UniquePtr< RV_ShaderBlock > &block, const char *name, RV_ShaderVariableSet *set, const RV_ShaderProgramBase *shader)
 
GR_API void loadAtlas (RV_Instance *inst, RV_ShaderAtlas &atlas, UT_Map< exint, RV_ShaderProgram * > &programmap)
 
GR_API void buildCurvePrimInfo (const GT_PrimCurveMesh *cmesh, const GR_UpdateParms &p, RV_Geometry *geo, GR_GeoRender *gr, RE_CacheVersion geo_version, UT_Vector4iArray &data, UT_Int32Array *opt_curve_oder=nullptr)
 

Detailed Description

Utility GR methods common to all renderers.

Function Documentation

GR_API void GR_Utils::assignInstanceGroupArray ( RE_Geometry to_geo,
const RE_VertexArray array,
int  instance_group = -1 
)
GR_API UT_Array<std::pair<gr_MatBucket*,int> >* GR_Utils::bucketMaterials ( const GT_DataArrayHandle mat_id)
GR_API void GR_Utils::buildBoneRegionsAndWeights ( RE_Render r,
RE_VertexArray **  bone_idx,
RE_VertexArray **  bone_weight,
const GT_DataArrayHandle dh,
RE_CacheVersion  version,
int  bone_limit,
int ret_bone_limit 
)

contributors are taken (to fit in a up to 3 vec4/ivec4 attribute pairs).

Builds weight and index arrays for bone transforms. 'bone_limit' specifies the maximal number of bone allowed 'ret_bone_limit' returns the current number of bones being used by the current data set.

GR_API void GR_Utils::buildCenterPoint ( RE_Render r,
const GT_PrimitiveHandle primh,
const GR_UpdateParms p,
const UT_Matrix4DArray prim_xforms,
const GT_DataArrayHandle prim_ids,
const GT_DataArrayHandle point_ids,
const GT_DataArrayHandle vert_ids,
const UT_Vector3F point,
RE_CacheVersion  point_version,
RE_Geometry geo,
RE_VertexArrayRef p_ref,
RE_VertexArrayRef inst_mat_ref,
GR_SelectMode point_select_mode,
bool  is_offsets 
)
GR_API void GR_Utils::buildCenterPointIDs ( RE_Render r,
const GT_PrimitiveHandle primh,
const GR_UpdateParms p,
const GT_DataArrayHandle prm_id,
const GT_DataArrayHandle pnt_id,
const GT_DataArrayHandle vtx_id,
RE_Geometry geo,
bool  is_offsets 
)
GR_API void GR_Utils::buildCenterPoints ( RE_RenderContext  r,
const GT_PrimitiveHandle handle,
const GR_UpdateParms p,
const UT_Matrix4DArray primxforms,
const GT_DataArrayHandle prim_ids,
const GT_DataArrayHandle pnt_ids,
const GT_DataArrayHandle vtx_ids,
GR_GeoRender gr,
const char *  cache_name,
GT_PrimitiveHandle pt_handle = nullptr,
GR_SelectMode pnt_sel_mode = NULL,
bool  is_offsets = true,
bool  build_selection = true 
)
GR_API void GR_Utils::buildCenterPoints ( RE_Render r,
const GT_PrimitiveHandle handle,
const GR_UpdateParms p,
const UT_Matrix4DArray primxforms,
const GT_DataArrayHandle prim_ids,
const GT_DataArrayHandle pnt_ids,
const GT_DataArrayHandle vtx_ids,
RE_Geometry geo,
GR_SelectMode pnt_sel_mode = NULL,
bool  is_offsets = true,
bool  build_selection = true 
)
GR_API void GR_Utils::buildCenterPointSelection ( RE_Render r,
const GT_PrimitiveHandle primh,
const GR_UpdateParms p,
const GT_DataArrayHandle prim_ids,
const GT_DataArrayHandle pnt_ids,
const GT_DataArrayHandle vert_ids,
RE_Geometry geo,
GR_SelectMode point_select_mode,
bool  is_offsets 
)
GR_API void GR_Utils::buildCurvePrimInfo ( const GT_PrimCurveMesh cmesh,
const GR_UpdateParms p,
RV_Geometry geo,
GR_GeoRender gr,
RE_CacheVersion  geo_version,
UT_Vector4iArray data,
UT_Int32Array opt_curve_oder = nullptr 
)
GR_API void GR_Utils::buildInstancedCenterPoints ( RE_RenderContext  r,
const GT_PrimitiveHandle handle,
const GR_UpdateParms p,
const UT_Matrix4DArray primxforms,
const GT_DataArrayHandle prim_ids,
const GT_DataArrayHandle pnt_ids,
const GT_DataArrayHandle vtx_ids,
const UT_Vector3F point,
RE_CacheVersion  point_version,
GR_GeoRender gr,
const char *  cache_name,
GT_PrimitiveHandle pt_handle = nullptr,
GR_SelectMode pnt_sel_mode = NULL,
bool  is_offsets = true 
)
GR_API void GR_Utils::buildInstanceIndex ( RE_Render r,
RE_Geometry geo,
bool  has_partial_visibility,
const UT_IntArray inst_indices,
int  instance_group,
int  max_capacity 
)

Builds an instance index mapping from GL instance to Houdini instance to allow a subset of instances to be drawn.

Examples:
tetprim/GR_PrimTetra.C.
GR_API bool GR_Utils::buildInstanceObjectMatrix ( RE_Render r,
const GT_PrimitiveHandle h,
const GR_UpdateParms p,
RE_Geometry geo,
RE_CacheVersion  version,
int  instance_group = 0,
UT_Matrix4D transform = NULL 
)

Builds an instance transform array for p.instances on 'geo'. The optional transform parameter will be set to the primitive transform Returns 'true' if the primitive is instanced.

Examples:
GUI/GUI_PolySoupBox.C, and tetprim/GR_PrimTetra.C.
GR_API GR_SelectMode GR_Utils::buildInstSelectInfo ( RV_Render r,
RV_Geometry geo,
const GR_UpdateParms p,
RE_CacheVersion  top_ver,
GT_DataArrayHandle  prim_id,
GT_DataArrayHandle  pnt_id,
GT_DataArrayHandle  vert_id,
bool  is_offset = true,
int  inst_per_prim = 1,
UT_Array< uint8 > *  selected = nullptr 
)
GR_API GR_SelectMode GR_Utils::buildInstSelectInfo ( RE_Render r,
RE_Geometry geo,
const GR_UpdateParms p,
RE_CacheVersion  top_ver,
GT_DataArrayHandle  primid,
GT_DataArrayHandle  vtxid,
GT_DataArrayHandle  vertid,
bool  is_offsets = true,
int  instances_per_prim = 1,
UT_Array< uint8 > *  result = NULL 
)
GR_API GR_SelectMode GR_Utils::buildSelection ( UT_Array< uint8 > &  selected,
const GR_UpdateParms p,
GT_DataArrayHandle  prim_id,
GT_DataArrayHandle  pnt_id,
GT_DataArrayHandle  vert_id,
bool  is_offset,
int  repeat_count 
)
GR_API void GR_Utils::cleanupBuckets ( UT_Array< std::pair< gr_MatBucket *, int >> *&  buckets)
GR_API void GR_Utils::cleanupGhosting ( RE_RenderContext  r,
int  opaque_data[3] 
)
GR_API void GR_Utils::createCenterPointAttribs ( RE_Render r,
const GT_PrimitiveHandle ph,
const GR_UpdateParms p,
RE_Geometry geo 
)
GR_API bool GR_Utils::createOrReuseSet ( RV_Render r,
UT_UniquePtr< RV_ShaderVariableSet > &  set,
int  set_num,
const RV_ShaderProgramBase shader,
bool *  created = nullptr,
const char *  name = nullptr 
)
GR_API void GR_Utils::drawFlagsString ( GR_RenderFlags  flags,
UT_WorkBuffer buf 
)
GR_API void GR_Utils::drawModeString ( GR_RenderMode  mode,
UT_WorkBuffer buf 
)
GR_API RE_VertexArray* GR_Utils::fillAttribArray ( RE_Render r,
RE_Geometry geo,
const char *  attrib_name,
const GT_DataArrayHandle h,
const GR_DisplayOption opts,
RE_ArrayType  atype,
RE_CacheVersion  geo_version 
)

creates (or finds in the cache) attribute 'attrib_name' on RE_Geometry, filling it with the data from the data array 'h'.

GR_API void* GR_Utils::fillAttribData ( RV_Render r,
const char *  attrib_name,
const GT_DataArrayHandle pa,
const GR_DisplayOption opts,
RV_AttributeType  array,
bool  build_string_tables = true 
)
GR_API void* GR_Utils::fillAttribData ( RE_Render r,
const char *  attrib_name,
const GT_DataArrayHandle pa,
const GR_DisplayOption opts,
RE_ArrayType  array,
bool  build_string_tables = true 
)
GR_API void GR_Utils::fillStringAttrib ( RE_Render r,
const GT_DataArrayHandle dh,
RE_Geometry geo,
RE_VertexArray array,
const RE_CacheVersion version 
)
GR_API RV_GPUType GR_Utils::getAttributeType ( RV_Render r,
const char *  attrib_name,
const GT_DataArrayHandle pa,
const GR_DisplayOption opts,
RV_AttributeType  array_type,
int out_vsize,
bool &  out_isnormalized 
)

Returns the GPU type and vector size of the attribute based on the data array, display option settings and supported Vulkan capabilities.

GR_API RE_GPUType GR_Utils::getAttributeType ( RE_Render r,
const char *  attrib_name,
int vsize,
const GT_DataArrayHandle pa,
const GR_DisplayOption opts,
RE_ArrayType  array_type 
)

Returns the GPU type and vector size of the attribute based on the data array, display option settings and supported GL capabilities.

GR_API RE_CacheVersion GR_Utils::getAttribVersion ( const GT_DataArrayHandle ph,
RE_CacheVersion  geo_version 
)

Return the cache version for attribute 'ph'.

GR_API RE_Shader* GR_Utils::getColorShader ( RE_Render r)
GR_API GU_Connectivity GR_Utils::getConnectivityFromString ( const char *  str)
GR_API RE_Shader* GR_Utils::getConstPointShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCascadeDisplaceShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCascadeLineShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCascadePointShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCascadePrimTransformShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCascadeShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCubeDisplaceShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCubeLineShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCubePointShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCubePrimTransformShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthCubeShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthLinearDisplaceShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthLinearPrimTransformShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthLinearShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthPrimTransformShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthWirePrimTransformShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getDepthWireShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getMatteDisplaceShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getMatteShader ( RE_Render r)
GR_API int GR_Utils::getMaxTexture3DSize ( RE_RenderContext  rc)
GR_API int GR_Utils::getMaxTextureSize ( RE_RenderContext  rc)
RE_GPUType GR_Utils::getREType ( GT_Storage  s)
inline

Convenience method to return an RE type from a GT storage type.

Definition at line 103 of file GR_Utils.h.

GR_API RE_Shader* GR_Utils::getRibbonShader ( RE_Render r)
GR_API RE_Shader* GR_Utils::getRibbonUVShader ( RE_Render r)
RV_GPUType GR_Utils::getRVType ( GT_Storage  s)
inline

Definition at line 48 of file GR_UtilsVK.h.

GR_API RE_CacheVersion GR_Utils::getTopologyVersion ( const GT_Primitive prim,
RE_CacheVersion  geo_version 
)

Return the cache version for the topology of primitive 'prim'.

GR_API RE_Shader* GR_Utils::getWireShader ( RE_Render r)
GR_API bool GR_Utils::hasPrimTransform ( const RE_Geometry geo)

Return true if the geometry has a per-prim transform or per-prim visibility.

GR_API GR_AttribMask GR_Utils::hasSelection ( const GR_UpdateParms p)

Returns the selection type in p.geometry.

GR_API bool GR_Utils::initBuiltinBlock ( RV_Render r,
UT_UniquePtr< RV_ShaderBlock > &  block,
const char *  name,
RV_ShaderVariableSet set,
const RV_ShaderProgramBase shader 
)
GR_API bool GR_Utils::inPointSelection ( const GR_UpdateParms p,
GA_Offset  point_id,
const GU_Detail geo = nullptr 
)

Returns true if point_id is in the selection list for p.geometry.

GR_API GR_SelectMode GR_Utils::inPointSelection ( const GR_UpdateParms p,
const UT_Array< GA_Offset > &  pids,
UT_BitArray selected 
)

Checks if passed point offsets are in p.geometry's selection. Returns GR_SELECT_POINT_PARTIAL/FULL if some or all of the point offsets are in the cook or temp selections, as indicated by the parms in p, otherwise GR_SELECT_NONE is returned. The individual selection results are returned in 'selected'.

GR_API bool GR_Utils::inPrimitiveSelection ( const GR_UpdateParms p,
GA_Offset  prim_id,
const GU_Detail geo = nullptr 
)

Returns true if prim_id is in the selection list for p.geometry If geo is given it must be the unlocked p.geometry from a ReadLock

GR_API GR_SelectMode GR_Utils::inPrimitiveSelection ( const GR_UpdateParms p,
const UT_Array< GA_Offset > &  pids,
UT_BitArray selected 
)

Checks if passed prim offsets are in p.geometry's selection. Returns GR_SELECT_PRIM_PARTIAL/FULL if some or all of the prim offsets are in the cook or temp selections, as indicated by the parms in p, otherwise GR_SELECT_NONE is returned. The individual selection results are returned in 'selected'.

GR_API bool GR_Utils::inVertexSelection ( const GR_UpdateParms p,
GA_Offset  vert_id,
const GU_Detail geo = nullptr 
)

Returns true if vert_id is in the selection list for p.geometry.

GR_API GR_SelectMode GR_Utils::inVertexSelection ( const GR_UpdateParms p,
const UT_Array< GA_Offset > &  vids,
UT_BitArray selected 
)

Checks if passed vertex offsets are in p.geometry's selection.

GR_API bool GR_Utils::inViewFrustum ( const UT_BoundingBoxD bbox,
const UT_Matrix4D objviewproj,
const UT_Vector4D frustum_area = NULL 
)
GR_API bool GR_Utils::inViewFrustum ( const UT_BoundingBoxF bbox,
const UT_Matrix4F objviewproj 
)
GR_API bool GR_Utils::inViewFrustumWithLOD ( const UT_BoundingBoxF bbox,
const UT_Matrix4F objviewproj,
bool &  has_bounds,
UT_Vector2F bounds_2d 
)
GR_API bool GR_Utils::isRasterized ( const UT_Matrix4F objviewproj,
const UT_Vector2F min_proj_size,
const UT_BoundingBoxF bbox 
)
GR_API void GR_Utils::loadAtlas ( RV_Instance inst,
RV_ShaderAtlas atlas,
UT_Map< exint, RV_ShaderProgram * > &  programmap 
)
GR_API void GR_Utils::printDrawFlags ( GR_RenderFlags  flags,
std::ostream *  os = NULL 
)
GR_API void GR_Utils::printDrawMode ( GR_RenderMode  mode,
std::ostream *  os = NULL 
)
GR_API void GR_Utils::printUpdateReason ( GR_UpdateReason  r,
std::ostream *  os = NULL 
)
GR_API bool GR_Utils::removeInstanceGroupArray ( RE_Geometry from_geo,
int  instance_group,
const char *  attrib_name,
RE_GenericAttribID  id = RE_GENATTRIB_NONE 
)
GR_API void GR_Utils::setupGhosting ( RE_RenderContext  r,
int  opaque_data[3],
fpreal  transparency = 0.25f 
)
GR_API void GR_Utils::updateReasonString ( GR_UpdateReason  r,
UT_WorkBuffer buf 
)