HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_PolyCurveVK.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GR_PolyCurveVK ( GR Library, C++)
7  *
8  * COMMENTS:
9  * Line primitive.
10  */
11 #ifndef GR_PolyCurveVK_h
12 #define GR_PolyCurveVK_h
13 
14 #include "GR_API.h"
15 #include "GR_GeoRenderVK.h"
16 
17 #include <RV/RV_Geometry.h>
18 
19 class RV_Geometry;
20 class RV_Render;
22 class RV_ShaderBlock;
23 class GT_PrimCurveMesh;
24 
26 {
27 public:
29  ~GR_PolyCurveVK() override;
30 
31  const char *className() const override { return "GR_PolyCurveVK"; }
32 
33  void update(RE_RenderContext rc,
34  const GT_PrimitiveHandle &primh,
35  const GR_UpdateParms &parms,
36  const char *cache_name) override;
37 
38  void draw(RE_RenderContext rc,
41  GR_DrawParms dp) override;
42 
43  void getPickConnectGroup(unsigned int pick_mode,
44  GR_PickGeometry pick_geo,
45  int &out_connect_start,
46  int &out_connect_num) override;
47 
48  void getVkDecorConnectGroup(RV_PrimType render_prim,
49  bool is_uv_view,
50  int &out_connect_start,
51  int &out_connect_num) override;
52 
53  exint getNumGLPrimitives() const override;
54  bool hasTransparency() const override { return false; }
55  void retireGeometry() override;
56 
57  static bool initShaders(RV_Instance* inst);
58  static void cleanupShaders();
59 
61  static RV_ShaderProgram* getWireMatteShader(GR_RenderFlags flags);
62  static RV_ShaderProgram* getWireSnapShader(bool points_only);
63 
64  static GT_PrimitiveHandle getCurveMesh(const GT_PrimitiveHandle &primh,
65  const GR_UpdateParms &parms);
66 
67 
68 private:
69  void buildConnectivity(const GT_PrimCurveMesh *primh,
70  const GR_UpdateParms &parms,
71  UT_Int32Array &connect_indices);
72 
73  bool myObjectSelected;
74 
75 };
76 
77 #endif
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
GLbitfield flags
Definition: glcorearb.h:1596
virtual void draw(RE_RenderContext r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms draw_parms)=0
Normal drawing method. Only issue rendering commands.
static bool initShaders(RV_Instance *inst)
int64 exint
Definition: SYS_Types.h:125
GT_API const UT_StringHolder cache_name
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
Definition: RV_Geometry.h:165
Temporary container for either a RV_Render and an RE_Render.
A mesh of curves.
virtual exint getNumGLPrimitives() const =0
set of parameters sent to GR_Primitive::update()
GR_RenderMode
Definition: GR_Defines.h:48
virtual void getVkDecorConnectGroup(RV_PrimType render_prim, bool is_uv_view, int &out_connect_start, int &out_connect_num)
#define GR_API
Definition: GR_API.h:10
GR_RenderFlags
Definition: GR_Defines.h:88
Handle to the main interface of Vulkan.
Definition: RV_Instance.h:48
GR_API RE_Shader * getWireShader(RE_Render *r)
GLenum mode
Definition: glcorearb.h:99
virtual void retireGeometry()
Definition: GR_GeoRender.h:86
virtual void getPickConnectGroup(unsigned int pick_mode, GR_PickGeometry pick_geo, int &out_connect_start, int &out_connect_num)
Definition: GR_GeoRender.h:100
GR_PickGeometry
Definition: GR_PickRecord.h:60
RV_PrimType
Definition: RV_Type.h:356
GA_API const UT_StringHolder parms
const char * className() const override
virtual void update(RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const char *cache_name)=0
bool hasTransparency() const override
returns true if this drawable renders some transparent elements
static void cleanupShaders()