12 #ifndef GR_GeoRender_H
13 #define GR_GeoRender_H
50 virtual const char *className()
const = 0;
52 bool isGL()
const {
return myRenderer == OPENGL; }
53 bool isVulkan()
const {
return myRenderer == VULKAN; }
94 virtual exint getNumGLPrimitives()
const = 0;
102 int &out_connect_start,
103 int &out_connect_num) {}
109 int &out_connect_start,
110 int &out_connect_num,
111 int &out_connect_end)
113 getPickConnectGroup(pick_mode, pick_geo,
116 if (out_connect_num > 0 &&
117 out_connect_num < 0x40000000)
119 out_connect_end = out_connect_start
120 + out_connect_num - 1;
123 out_connect_end = -1;
130 return getVkGeometry();
134 bool showSelections()
const;
137 void allowGeoOverride(
bool allow_overrides);
142 bool isRasterizedInView(
154 myBuildPrimInfo = prim_id;
158 {
return myBuildPrimInfo; }
160 {
return myBuildPointInfo; }
163 { mySelectionMask = selection_mask; }
165 {
return mySelectionMask; }
168 { myCurrentSelection = m; }
170 {
return myCurrentSelection; }
173 { myCurrentPointSelectInstance = i; }
175 {
return myCurrentPointSelectInstance; }
178 { myMaterialOverride = mat_index; }
180 { myMaterialOverride = -1; }
184 if(myHasDetailPrimID)
237 {
return myCurrentLayer; }
242 #ifdef USE_MATERIAL_MAP
252 template <
typename T>
258 bool use_vertex_for_point_select,
268 template <
typename T>
303 unsigned myBuildPointInfo : 1,
305 myHasDetailPrimID : 1,
306 myHasInstancedTransform : 1,
307 myHasIdentityTransform : 1,
310 myAllowGeoOverride : 1;
GR_AttribMask mySelectionMask
int getCurrentLayer() const
bool shouldBuildPrimID() const
void setSelectionInstance(int i)
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
int getSelectionInstance() const
GT_API const UT_StringHolder cache_name
GR_AttribMask getSelectionMask() const
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
A class that manages material assignments to different groups of primitives.
Temporary container for either a RV_Render and an RE_Render.
virtual RV_Geometry * getVkPickGeometry(unsigned int pick_mode)
virtual bool canFrustumCull()
set of parameters sent to GR_Primitive::update()
GT_API const UT_StringHolder point_id
const GR_RenderInfo * myInfo
Abstract data class for an array of float, int or string data.
GR_Primitive * myParentPrim
virtual bool isConvexed() const
virtual RV_Geometry * getVkGeometry()
virtual bool hasTransparency() const
returns true if this drawable renders some transparent elements
GR_API bool inViewFrustum(const UT_BoundingBoxD &bbox, const UT_Matrix4D &objviewproj, const UT_Vector4D *frustum_area=NULL)
void buildInformation(bool prim_id, bool point_id)
int myCurrentPointSelectInstance
bool getDetailPrimID(int &id) const
GLuint const GLchar * name
void setSelectionDisplayMode(GR_SelectMode m)
GLboolean GLboolean GLboolean b
The base class for all GT primitive types.
virtual void geometryUpdated(RE_RenderContext)
virtual void retireGeometry()
virtual void getPickConnectGroup(unsigned int pick_mode, GR_PickGeometry pick_geo, int &out_connect_start, int &out_connect_num)
GLfloat GLfloat GLfloat GLfloat h
GR_SelectMode getSelectionDisplayMode() const
virtual RE_Geometry * getGeometry()
void clearMaterialOverride()
UT_Matrix4D myPrimitiveTransform
bool shouldBuildPointID() const
Simple class for a mutli-integer cache tag.
virtual bool supportsInstances() const
By default, no instanced drawing support.
GR_MaterialGroups myMatGroups
void setGeoBounds(const UT_BoundingBox &b)
void setMaterialOverride(int mat_index)
RenderType getRenderType() const
GR_SelectMode myCurrentSelection
virtual void viewUpdate(RE_RenderContext r, const GR_DisplayOption &opts, const char *cache_name, RE_CacheVersion geo_version, RE_CacheVersion select_version)
void setSelectionMask(GR_AttribMask selection_mask)
const UT_BoundingBoxD & getGeoBounds() const
void getPickConnectGroup(unsigned int pick_mode, GR_PickGeometry pick_geo, int &out_connect_start, int &out_connect_num, int &out_connect_end)