139 struct rv_DrawSetInfo;
140 struct rv_DrawInputInfo;
142 struct rv_Connectivity;
143 struct rv_InstanceGroup;
179 bool setNumPoints(
exint num_points);
181 exint getNumPoints()
const;
185 void setVertexBufferSize(
exint vert_buffer_elements);
187 exint getVertexBufferSize()
const;
191 void setPrimitiveBufferSize(
exint prim_buffer_elements);
193 exint getPrimitiveBufferSize()
const;
204 bool allow_gpu_write =
false);
215 bool allow_gpu_write =
false);
263 int& out_vec_size)
const;
268 exint& out_len)
const;
284 int instance_group = -1)
const;
291 bool createInstanceGroup(
int group_index);
293 void removeInstanceGroup(
int group_index);
295 bool hasInstanceGroup(
int group_index)
const;
297 int getMaxInstanceGroup()
const;
300 void setInstanceGroupCount(
int instance_group,
int count);
302 int getInstanceGroupCount(
int instance_group)
const;
304 int getInstanceGroupTransformCount(
int instance_group)
const;
307 void setInstanceGroupForceFullDraw(
int instance_group,
bool enable);
309 bool getInstanceGroupForceFullDraw(
int instance_group)
const;
312 void setInstanceGroupIndexList(
int group_index,
314 int max_capacity = -1);
316 void setInstanceGroupConstIndex(
int instance_group,
317 int instance_to_draw);
319 void setInstanceGroupDrawEverything(
int instance_group);
321 void setInstanceGroupDrawNothing(
int instance_group);
327 void setConstInstanceGroupTransform(
int instance_group,
329 bool remove_instanced_xform);
334 bool setInstanceGroupAttrib(
int instance_group,
344 bool createSharedInstanceGroupAttrib(
int instance_group,
354 bool assignSharedInstanceGroupAttrib(
int instance_group,
359 bool freeInstanceGroupAttrib(
int instance_group,
369 const char* name =
nullptr);
377 bool cpu_mapped =
true,
378 const char* name =
nullptr);
381 RV_Buffer * getInstanceGroupAttrib(
int instance_group,
386 bool getInstanceAttribLength(
int instance_group,
388 exint& out_len)
const;
391 bool getInstanceAttribVersion(
int instance_group,
395 void setInstanceAttribVersion(
int instance_group,
403 void connectAllPrims(
int connect_index,
407 void connectSomePrims(
int connect_index,
416 void connectIndexedPrims(
int connect_index,
419 bool need_prim_info =
false,
422 void connectSomeVerts(
int connect_index,
429 void connectIndexedVerts(
int connect_index,
432 bool need_prim_info =
false,
438 void setConnectDivisor(
int connect_index,
int divisor,
443 void setConnectUsePrimInfo(
int connect_index,
int base_prim= 0);
450 int getNumRenderPrims(
int connect_index)
const;
453 RV_PrimType getRenderPrimType(
int connect_index)
const;
456 RV_Buffer *getIndexBuffer(
int connect_index)
const;
458 RV_Buffer *getPrimBuffer(
int connect_index)
const;
460 RV_Buffer *getPrimVertexBuffer(
int connect_index)
const;
463 bool hasConnectGroup(
int connect_index)
const;
465 bool hasNonEmptyConnectGroup(
int connect_index)
const;
467 int getMaxConnectGroup()
const;
470 bool removeConnectedPrims(
int connect_index);
472 void resetConnectedPrims();
487 void prepareForDrawInstance(
RV_Render* r,
497 bool force_point_prims =
false);
501 void drawInstanceGroup(
506 bool force_point_prims =
false);
511 int connect_index_start,
512 int num_connect_indexs,
514 bool force_point_prims =
false);
517 void drawInstanceGroupRange(
523 bool force_point_prims =
false);
545 static void cleanupResources();
560 rv_Connectivity* getConnect(
int group_idx,
bool do_create);
565 const char *base_name,
570 const rv_Attribute* findAttribute(
const UT_StringRef& name,
573 int* out_idx =
nullptr)
const;
582 bool attr_owned =
false,
583 bool allow_gpu_write =
false);
584 bool privFreeAttrib(
RV_Render* r, rv_Attribute &attr);
592 bool allocateConnectBuffers(
RV_Render* r, rv_Connectivity&
c,
594 bool allocateInstIndexBuffer(
RV_Render* r, rv_InstanceGroup&
g,
605 bool privPrepareDraw(
607 const rv_Connectivity *connect,
608 int instance_group_idx,
614 const rv_Connectivity *connect,
615 int instance_group_idx,
618 bool force_point_prims
623 const rv_Connectivity *connect,
624 int instance_group_idx,
636 uint32_t myNumPoints = 0;
637 uint32_t myVertBufferSize = 0;
638 uint32_t myPrimBufferSize = 0;
640 bool myAttributesValid =
false;
663 struct rv_DrawSetInfo
667 int myConnectGroupIdx;
668 int myInstanceGroupIdx;
670 bool myIsValid =
false;
678 int myInstTransformUniformIdx = -1;
679 int myInstNestLevelUniformIdx = -1;
697 rv_DrawSetInfo* getDrawSet(
700 const rv_Connectivity *connect,
701 int instance_group_idx,
708 rv_DrawSetInfo& set_info,
709 const rv_Connectivity *connect,
710 int instance_group_idx,
714 bool bindInputAttribute(
717 const rv_Connectivity *connect,
718 const rv_Attribute *attrib,
727 void populateFallbackAttribs(
RV_Render* r);
729 rv_Attribute* getFallbackVertAttrib(
RV_GPUType type);
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
GLsizei GLenum const void * indices
VkFlags VkBufferUsageFlags
VkPrimitiveTopology RVgetVkPrimType(RV_PrimType t)
UT_UniquePtr< RV_VKBuffer > RV_VKBufferPtr
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
GLuint GLsizei GLsizei * length
RV_GPUType RVconvertFromGPUType(UT_GPUType t)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
#define UT_ASSERT_MSG(ZZ,...)
GLint GLenum GLboolean GLsizei stride
GLuint const GLchar * name
GLint GLenum GLboolean normalized
Handle to the main interface of Vulkan.
UT_GPUType RVconvertToUTGPUType(RV_GPUType t)
GLsizeiptr const void GLenum usage
UT_UniquePtr< rv_InstanceGroup > rv_InstanceGroupPtr
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)
Simple class for a mutli-integer cache tag.
UT_UniquePtr< RV_Buffer > RV_BufferPtr
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept