HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GR_PolySurfaceGL3 Class Reference

#include <GR_PolySurfaceGL3.h>

+ Inheritance diagram for GR_PolySurfaceGL3:

Public Member Functions

 GR_PolySurfaceGL3 (GR_Primitive *prim, bool needs_convexing=false)
 
virtual ~GR_PolySurfaceGL3 ()
 
virtual const char * className () const
 
virtual void draw (RE_Render *r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms dp)
 Normal drawing method. Only issue rendering commands. More...
 
virtual bool supportsInstances () const
 By default, no instanced drawing support. More...
 
virtual bool isConvexed () const
 
virtual bool canFrustumCull ()
 
- Public Member Functions inherited from GR_PolySurface
 GR_PolySurface (GR_Primitive *prim, bool needs_convexing)
 
virtual ~GR_PolySurface ()
 
virtual void update (RE_Render *r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p, const char *cache_name)
 
virtual bool hasTransparency () const
 returns true if this drawable renders some transparent elements More...
 
GT_PrimitiveHandle getConvexGeometry ()
 
virtual exint getNumGLPrimitives () const
 
- Public Member Functions inherited from GR_GeoRender
 GR_GeoRender (GR_Primitive *parent_prim)
 
virtual ~GR_GeoRender ()
 
virtual void updateInstanceGroupArray (const RE_VertexArray *array, int instance_group=-1, const char *attrib_name=NULL, RE_GenericAttribID id=RE_GENATTRIB_NONE)
 
virtual void viewUpdate (RE_Render *r, const GR_DisplayOption &opts, const char *cache_name, RE_CacheVersion geo_version, RE_CacheVersion select_version)
 
RE_GeometrycreateGeometry (int npoints=0)
 
RE_GeometrygetGeometry ()
 
virtual void geometryUpdated (RE_Render *)
 
bool showSelections () const
 
GR_RenderVersion getRenderVersion () const
 
bool inViewFrustum (const UT_Matrix4D &objviewproj)
 
GR_BasePrimType getParentType () const
 
void buildInformation (bool prim_id, bool point_id)
 
bool shouldBuildPrimID () const
 
bool shouldBuildPointID () const
 
void setSelectionMask (GR_AttribMask selection_mask)
 
GR_AttribMask getSelectionMask () const
 
void setSelectionDisplayMode (GR_SelectMode m)
 
GR_SelectMode getSelectionDisplayMode () const
 
void setSelectionInstance (int i)
 
int getSelectionInstance () const
 
void setMaterialOverride (int mat_index)
 
void clearMaterialOverride ()
 
bool getDetailPrimID (int &id) const
 
virtual void retireGeometry ()
 
void setupGeoOverride (RE_Render *r, const GR_DisplayOption *opt, RE_Geometry *geo, UT_UniquePtr< RE_OverrideList > &override_list)
 
void cleanupGeoOverride (RE_Render *r, const GR_DisplayOption *opt, RE_Geometry *geo)
 
void addUpdateMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addUpdateFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
void addRedrawFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder())
 
GT_DataArrayHandle buildPointIDData (const GT_Primitive &prim, const GU_ConstDetailHandle &geo, int npoints)
 
GT_DataArrayHandle buildPrimitiveIDData (const GT_Primitive &prim, const GU_ConstDetailHandle &geo)
 
void setGeoBounds (const UT_BoundingBox &b)
 
const UT_BoundingBoxDgetGeoBounds () const
 

Protected Member Functions

void drawBeauty (RE_Render *r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms dp)
 
void drawUtility (RE_Render *r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms dp)
 
void drawHiddenLine (RE_Render *r, GR_RenderMode mode, GR_RenderFlags flags, GR_DrawParms dp)
 
int buildSurfaceAttributes (RE_Render *r, const GT_Primitive *prim, const GR_UpdateParms &parms, bool needs_normal, bool needs_uv)
 
bool getGeometryHasColor () const
 
RE_ShadergetMaterialShader (RE_Render *r, GR_RenderMode mode, GR_RenderFlags flags, int nlights, int prim_vertex, bool has_color_attrib, bool draw_textures, bool needs_displacement, bool multi_material, bool fill_selections, bool has_prim_transforms)
 
virtual void updateBoneTransforms (RE_Render *r, const GT_DataArrayHandle &a)
 
virtual int numMaterials () const
 
- Protected Member Functions inherited from GR_PolySurface
virtual bool getMayCacheConvexedPrimitive () const
 
GT_PrimitiveHandle convexWithEdgeInfo (const GT_PrimPolygonMesh *pmesh, GT_DataArrayHandle &ph, GT_DataArrayHandle &vh, GT_DataArrayHandle &vch)
 
GT_DataArrayHandle getPointNormals ()
 
void freePointNormals ()
 
- Protected Member Functions inherited from GR_GeoRender
RE_VertexArraygetDirtyAttribArray (RE_Render *r, const char *attrib_name, const GT_DataArrayHandle &h, const GR_DisplayOption &opts, RE_ArrayType atype, RE_CacheVersion attr_version)
 
void initLights (RE_Render *r, RE_Shader *sh, GR_RenderMode mode, GR_RenderFlags flags, const GR_DisplayOption *opt)
 
GR_AttribMask hasAttribute (const GT_Primitive *prim, const char *name, GT_DataArrayHandle &h) const
 
void buildPointID (RE_Render *r, const GT_Primitive &prim, const GU_ConstDetailHandle &geo, RE_CacheVersion geo_version)
 
void buildPrimitiveID (RE_Render *r, const GT_Primitive &primh, const GU_ConstDetailHandle &geo, RE_CacheVersion geo_version)
 
GR_SelectMode buildSelection (RE_Render *r, const GR_UpdateParms &parms, RE_Geometry &obj, const GT_PrimitiveHandle &primh, const GT_DataArrayHandle &vertexlist)
 
GR_SelectMode addToPointSelection (RE_Render *r, RE_VertexArray *select_array, int length, const GU_Detail &geo, const GT_DataArrayHandle &vh, const GT_DataArrayHandle &vl, const GA_PointGroup *pntsel, bool use_vertex_for_point_select, bool &init)
 
GR_SelectMode addToVertexSelection (RE_Render *r, RE_VertexArray *select_array, int length, const GU_Detail &geo, const GT_DataArrayHandle &vh, const GA_VertexGroup *vertsel, bool &init)
 
GR_SelectMode addToEdgeSelection (RE_Render *r, RE_VertexArray *select_array, int length, const GU_Detail &geo, const GT_DataArrayHandle &vt, const GT_DataArrayHandle &vert_list, const GA_EdgeGroup *edgesel, bool &init)
 
GR_SelectMode addToPrimSelection (RE_Render *r, RE_VertexArray *sel_array, const GT_DataArrayHandle &vh, const GA_PrimitiveGroup *primsel, bool &init)
 
virtual GR_SelectMode addToBreakpointSelection (RE_Render *r, RE_VertexArray *select, int bpnt_len, const GA_BreakpointGroup *bps, bool &init)
 
GR_SelectMode buildInstanceSelection (RE_Render *r, const GR_UpdateParms &p, RE_Geometry &obj)
 
void fillAttributesGL3 (RE_Render *r, const GT_Primitive *prim, const GR_UpdateParms &p, RE_Geometry *geo, bool fast_pnt, bool needs_nml, bool needs_uv, bool need_prim_vert_info, const GT_DataArrayHandle &point_norm)
 
virtual int setupSelection (RE_Render *r, const GR_DisplayOption *opt, GR_RenderFlags flags) const
 
virtual void cleanupSelection (RE_Render *r, int key) const
 Clean up selection uniforms; much be paired with a setupSelection(). More...
 
GT_PrimitiveHandle getCachedGTPrimitive ()
 
void cacheGTPrimitive (GT_PrimitiveHandle &primh)
 
void updateWireColor (RE_Render *r, RE_Geometry *geo, const GR_DisplayOption *opt, int start_draw_idx, int num_draw_idx=1) const
 
int getCurrentLayer () const
 

Additional Inherited Members

- Static Public Member Functions inherited from GR_PolySurface
static GR_PolySurfacecreate (GR_Primitive *parent, bool convex)
 
- Protected Attributes inherited from GR_PolySurface
bool myHasAlpha
 
- Protected Attributes inherited from GR_GeoRender
RE_GeometrymyGeometry
 
const GR_RenderInfomyInfo
 
GR_MaterialGroups myMatGroups
 
UT_BoundingBoxD myBounds
 
unsigned myBuildPointInfo: 1
 
unsigned myBuildPrimInfo: 1
 
unsigned myHasDetailPrimID: 1
 
unsigned myHasInstancedTransform: 1
 
unsigned myHasIdentityTransform: 1
 
unsigned myUseBoneDeform: 1
 
unsigned myNumBoneDeform: 2
 
UT_Matrix4D myPrimitiveTransform
 
GR_AttribMask mySelectionMask
 
GR_SelectMode myCurrentSelection
 
int myCurrentPointSelectInstance
 
int myMaterialOverride
 
int myConvexFlag
 
int myDetailPrimID
 

Detailed Description

Definition at line 21 of file GR_PolySurfaceGL3.h.

Constructor & Destructor Documentation

GR_PolySurfaceGL3::GR_PolySurfaceGL3 ( GR_Primitive prim,
bool  needs_convexing = false 
)
virtual GR_PolySurfaceGL3::~GR_PolySurfaceGL3 ( )
virtual

Member Function Documentation

int GR_PolySurfaceGL3::buildSurfaceAttributes ( RE_Render r,
const GT_Primitive prim,
const GR_UpdateParms parms,
bool  needs_normal,
bool  needs_uv 
)
protected
virtual bool GR_PolySurfaceGL3::canFrustumCull ( )
virtual

Reimplemented from GR_GeoRender.

virtual const char* GR_PolySurfaceGL3::className ( void  ) const
inlinevirtual

Reimplemented from GR_PolySurface.

Reimplemented in GR_OSDSubdSurfaceGL4, and GR_OSDSubdSurfaceGL3.

Definition at line 28 of file GR_PolySurfaceGL3.h.

virtual void GR_PolySurfaceGL3::draw ( RE_Render r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
GR_DrawParms  draw_parms 
)
virtual

Normal drawing method. Only issue rendering commands.

Implements GR_GeoRender.

Reimplemented in GR_OSDSubdSurfaceGL4.

void GR_PolySurfaceGL3::drawBeauty ( RE_Render r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
GR_DrawParms  dp 
)
protected
void GR_PolySurfaceGL3::drawHiddenLine ( RE_Render r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
GR_DrawParms  dp 
)
protected
void GR_PolySurfaceGL3::drawUtility ( RE_Render r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
GR_DrawParms  dp 
)
protected
bool GR_PolySurfaceGL3::getGeometryHasColor ( ) const
protected
RE_Shader* GR_PolySurfaceGL3::getMaterialShader ( RE_Render r,
GR_RenderMode  mode,
GR_RenderFlags  flags,
int  nlights,
int  prim_vertex,
bool  has_color_attrib,
bool  draw_textures,
bool  needs_displacement,
bool  multi_material,
bool  fill_selections,
bool  has_prim_transforms 
)
protected
virtual bool GR_PolySurfaceGL3::isConvexed ( ) const
inlinevirtual

Reimplemented from GR_GeoRender.

Definition at line 36 of file GR_PolySurfaceGL3.h.

virtual int GR_PolySurfaceGL3::numMaterials ( ) const
inlineprotectedvirtual

Implements GR_PolySurface.

Definition at line 76 of file GR_PolySurfaceGL3.h.

virtual bool GR_PolySurfaceGL3::supportsInstances ( ) const
inlinevirtual

By default, no instanced drawing support.

Reimplemented from GR_GeoRender.

Definition at line 35 of file GR_PolySurfaceGL3.h.

virtual void GR_PolySurfaceGL3::updateBoneTransforms ( RE_Render r,
const GT_DataArrayHandle a 
)
protectedvirtual

Implements GR_PolySurface.


The documentation for this class was generated from the following file: