HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_PointGL3.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_PointGL3 ( GR Library, C++)
7  *
8  * COMMENTS:
9  * Simple point renderer. Cd, alpha and pscale are supported.
10  */
11 #ifndef GR_PointGL3_h
12 #define GR_PointGL3_h
13 
14 #include "GR_API.h"
15 #include "GR_GeoRenderGL.h"
16 #include <RE/RE_ShaderHandle.h>
17 
19 {
20 public:
22  ~GR_PointGL3() override;
23 
24  const char *className() const override { return "GR_PointGL3"; }
25 
27  const GT_PrimitiveHandle &primh,
28  const GR_UpdateParms &parms,
29  const char *cache_name) override;
30 
31  void draw(RE_RenderContext r,
34  GR_DrawParms dp) override;
35 
36  exint getNumGLPrimitives() const override;
37  bool hasTransparency() const override { return myHasAlpha; }
38 
39 private:
40  void updatePointAttribs(RE_Render *r,
41  const GT_PrimitiveHandle &primh,
42  const GR_UpdateParms &parms);
43  void drawPrivate(RE_Render *r,
46  GR_DrawParms dp);
47 
48  void drawUtility(RE_Render *r,
51  GR_DrawParms dp);
52 
53  static RE_ShaderHandle thePointShader;
54  static RE_ShaderHandle thePixelShader;
55  bool myHasCdAttrib;
56  bool myHasAlphaAttrib;
57  bool myHasAlpha;
58  bool myObjectSelected;
59 };
60 
61 #endif
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.
bool hasTransparency() const override
returns true if this drawable renders some transparent elements
Definition: GR_PointGL3.h:37
int64 exint
Definition: SYS_Types.h:125
GT_API const UT_StringHolder cache_name
const char * className() const override
Definition: GR_PointGL3.h:24
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
#define GR_API
Definition: GR_API.h:10
GR_RenderFlags
Definition: GR_Defines.h:86
GLenum mode
Definition: glcorearb.h:99
virtual void update(RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const char *cache_name)=0
GLboolean r
Definition: glcorearb.h:1222
Simple interface to building a shader from a .prog file.