C++ Java Unity
C++ Reference
MetalRenderData Class Reference

Detailed Description

Metal-specific render data.

MetalRenderData object passed to Vuforia when performing Metal rendering operations. Pass a pointer to the current drawable texture and a pointer to a valid render command encoder encapsulated in the mData struct.

Do not call endEncoding on the encoder before making all the Vuforia::Renderer calls you require.

After making all of your Vuforia::Renderer calls, you may call endEncoding on the encoder and pass a different encoder to Vuforia::Renderer::end, but the new encoder passed to Vuforia::Renderer::end must have access to the current frame buffer data in order for Vuforia to draw (blend) over it. This means it must be the same encoder that wrote the data, in which case its commands will be in the buffer before Vuforia adds it commands, or a new encoder that loads the data from the texture at the start of its render pass).

Use with Renderer::begin() and Renderer::end()

Inheritance diagram for MetalRenderData:
RenderData

Public Member Functions

 MetalRenderData ()
 
 ~MetalRenderData ()
 
virtual const void * buffer () const
 Get a pointer to the member data for the class. More...
 
- Public Member Functions inherited from RenderData
int type () const
 Get the type of data in use (one of Vuforia::INIT_FLAGS). More...
 

Public Attributes

struct {
   id< MTLTexture >   drawableTexture
 
   id< MTLRenderCommandEncoder >   commandEncoder
 
mData
 

Additional Inherited Members

- Protected Member Functions inherited from RenderData
 RenderData (int type)
 Construct with a specific type (one of Vuforia::INIT_FLAGS). More...
 
 ~RenderData ()
 Destructor. More...
 

Constructor & Destructor Documentation

Member Function Documentation

virtual const void* buffer ( ) const
virtual

Get a pointer to the member data for the class.

Implements RenderData.

Member Data Documentation

id<MTLTexture> drawableTexture
id<MTLRenderCommandEncoder> commandEncoder
struct { ... } mData