void Set_Priority (HC_KEY key, long priority)
 Overrides the default drawing priority automatically assigned by HOOPS. More...

Detailed Description

Function Documentation

◆ Set_Priority()

void Set_Priority ( HC_KEY  key,
long  priority 

Overrides the default drawing priority automatically assigned by HOOPS.

key- key to items whose priority is being specified
priority- Drawing priority of the item specified


By default all HOOPS geometry (and includes) have a drawing priority assigned according to their order of insertion. Set_Priority() allows you to assign a specific priority value to a segment, geometry, or include link. The meaning of these priorities is highly dependent on the hidden surfaces Heuristic, and the hidden surfaces removal algorithm=priority Rendering Option. Refer to the documentation on those attributes for further details.


The DirectX and OpenGL2 drivers have special code which optimizes the rendering of models which set priorities and use the priority hsra. A current limitation of this code is that priorities are not honored when they are set on include links.

When the 'priority' hsra is set, all tristrips within a single piece of geometry are given the same priority. This results in tristrips being drawn in a random order which can give undesired results. You can reduce these undesired results by turning on backplane culling.


See also
Set_Rendering_Options, Show_Priority