[SESI logo]

Houdini Development Toolkit - Version 6.5

Side Effects Software Inc. 2004

Graphics Rendering Classes

GR_RenderHook Class

The GR_RenderHook class allows you to get inside the Houdini rendering pipeline. The methods you override, renderWire and renderShaded, are triggered before the normal Houdini rendering. You can then also restrict further Houdini rendering through the use of the getWireMask and getShadedMask. The GR_RenderHook you create will be kept. Thus, cache information can be stored as member data.

GR_RenderHook Methods

  • void renderWire(GU_Detail *gdp, RE_Render &ren, const GU_AttribOffset &ptinfo, const GR_DisplayOption *dopt, float lod, const GU_PrimGroupClosure *hidden_geometry) const
    This method will be invoked whenever a GU_Detail will be drawn in the viewport in wireframe. The renderer, ren, is a shallow layer on top of GL which can be used for rendering data. The ptinfo is a structure that allows quick and consistent determining of what attributes, if any, are the current colour, texture coordinate, etc. The DisplayOptions allows access to the current display state. The lod is the current viewing level of detail. 1.0f is normal resolution, higher numbers should use higher detail. Finally, the hidden_geometry is a, possible null, group specifying which primitives should not be drawn. It is controlled by the Visibility SOP.
  • int getWireMask(GU_Detail *gdp, const GR_DisplayOption *dopt) const
    This method returns the mask against which all further drawing will be culled. It will take effect in wireframe only. Look at the GEO/GEO_PrimTypes.h for examples of valid masks.
  • void renderShaded(GU_Detail *gdp, RE_Render &ren, const GU_AttribOffset &ptinfo, const GR_DisplayOption *dopt, float lod, const GU_PrimGroupClosure *hidden_geometry) const
    This has the same parameters as the renderWire. The only difference is that this is called when Houdini wants to render a GU_Detail in shaded mode.
  • int getShadedMask(GU_Detail *gdp, const GR_DisplayOption *dopt) const
    This method returns the mask against which all further drawing will be culled. It will take effect in shaded mode only. Look at the GEO/GEO_PrimTypes.h for examples of valid masks.
  • const char *getName() const
    Because the same GR plugin may show up in multiple parts of the HOUDINI_PATH, there needs to be some way to ensure only the highest instance is installed. The name is used for this purpose. Only one plugin of each name will be installed.

  • Table of Contents
    Operators | Surface Operations | Particle Operations | Composite Operators | Channel Operators
    Material & Texture | Objects | Command and Expression | Render Output |
    Mantra Shaders | Utility Classes | Geometry Library | Image Library | Clip Library
    Customizing UI | Questions & Answers

    Copyright © 2004 Side Effects Software Inc.
    477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7