HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_PointVK.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_PointVK ( GR Library, C++)
7  *
8  * COMMENTS:
9  * Simple point renderer. Cd, alpha and pscale are supported.
10  */
11 #ifndef GR_PointVK_h
12 #define GR_PointVK_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 
25 {
26 public:
27  GR_PointVK(GR_Primitive *prim);
28  ~GR_PointVK() override;
29 
30  const char *className() const override { return "GR_PointVK"; }
31 
32  void update(RE_RenderContext rc,
33  const GT_PrimitiveHandle &primh,
34  const GR_UpdateParms &parms,
35  const char *cache_name) override;
36 
37  void draw(RE_RenderContext rc,
40  GR_DrawParms dp) override;
41 
42  exint getNumGLPrimitives() const override;
43  bool hasTransparency() const override { return myHasAlpha; }
44 
45  static bool initShaders(RV_Instance* inst);
46  static void cleanupShaders();
47 
48  static RV_ShaderProgram* getPointShader() { return thePointShader; }
49  static RV_ShaderProgram* getPixelShader() { return thePixelShader; }
50  static RV_ShaderProgram* getMatteShader() { return theMatteShader; }
51 private:
52  void updatePointAttribs(RV_Render *rv,
53  GR_FillAttributesVK *attrib_fill,
54  const GT_PrimitiveHandle &primh,
55  const GR_UpdateParms &parms);
56 
57  void drawPrivate(RV_Render *rv,
58  GR_Uniforms* u,
61  GR_DrawParms dp);
62 
63  void drawUtility(RV_Render *rv,
64  GR_Uniforms* u,
67  GR_DrawParms dp);
68 
69  static RV_ShaderProgram *thePointShader;
70  static RV_ShaderProgram *theSimplePointShader;
71  static RV_ShaderProgram *thePixelShader;
72  static RV_ShaderProgram *theMatteShader;
73  static RV_ShaderProgram *theDepthShader;
74  static RV_ShaderProgram *theDepthLinearShader;
75  static RV_ShaderProgram *theDepthCubePointShader;
76  static RV_ShaderProgram *theDepthCascadePointShader;
77 
78  bool myHasCdAttrib;
79  bool myHasAlphaAttrib;
80  bool myHasAlpha;
81  bool myObjectSelected;
82 };
83 
84 #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)
bool hasTransparency() const override
returns true if this drawable renders some transparent elements
Definition: GR_PointVK.h:43
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.
virtual exint getNumGLPrimitives() const =0
set of parameters sent to GR_Primitive::update()
GR_RenderMode
Definition: GR_Defines.h:48
static RV_ShaderProgram * getPixelShader()
Definition: GR_PointVK.h:49
#define GR_API
Definition: GR_API.h:10
static RV_ShaderProgram * getPointShader()
Definition: GR_PointVK.h:48
GR_RenderFlags
Definition: GR_Defines.h:88
Handle to the main interface of Vulkan.
Definition: RV_Instance.h:48
GLenum mode
Definition: glcorearb.h:99
GA_API const UT_StringHolder parms
const char * className() const override
Definition: GR_PointVK.h:30
static RV_ShaderProgram * getMatteShader()
Definition: GR_PointVK.h:50
virtual void update(RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const char *cache_name)=0
set of parameters sent to GR_Primitive::update()
Definition: GR_Uniforms.h:56
static void cleanupShaders()