## Draw

### Description

Draws the custom primitive.

The primitive is drawn in the scene directly using OpenGL calls. The coordinates are set to the local space of the custom primitive object. Use GL_LINES or GL_LINE_STRIP to define the outline of the object. The plugin should not change the OpenGL states on exiting the callback.

### Applies To

Custom Primitive

### Syntax

    CStatus <plugin-item_name>_Draw( CRef& in_context )

    {

    	...

    }

<plugin-item-name> is the name specified in the call to PluginRegistrar.RegisterPrimitive with any spaces converted to underscores. For example, if you register a primitive with the name "My Primitive", the callback function names start with "My_Primitive".

### Parameters

Parameter | Language | Type | Description
--- | --- | --- | ---
in_context | C++ | CRef& | A reference to the Context object. Context::GetSource returns the CustomPrimitive.

### See Also

- PluginRegistrar.RegisterPrimitive
- Primitive Callbacks