
###########################
A3DGlobalInsertGraphPicture
###########################

.. c:function:: A3DStatus A3DGlobalInsertGraphPicture(const A3DGraphPictureData *pData, A3DUns32 *puiPictureIndex)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DGlobalInsertGraphPicture(*const* :c:struct:`~A3DGraphPictureData`\ \* **pData**\ , :c:type:`~A3DUns32`\ \* **puiPictureIndex**\ )
   
   Insert a new picture into the global state, returning its index.
   
   
      2.0
   
   
   When given an ``A3DGraphPictureData``\ , the function clones the picture data for internal storage and returns a new index to further retrieval with ``A3DGlobalGetGraphPictureData``\ . In case of failure ``*puiPictureIndex``\ is unchanged.
   
   
   ::
   
      A3DGraphPictureDatapicture_data=A3D_MAKE_DATA(A3DGraphPictureData);
      //Configurepicture_data...
      A3DUns32idx=A3D_DEFAULT_MATERIAL_INDEX;
      
      A3DStatusresult=A3DGlobalInsertGraphPicture(&picture_data,&idx);
      assert(result==A3D_SUCCESS);
      assert(idx!=A3D_DEFAULT_MATERIAL_INDEX);
   
   **Parameters**
   
   
      **pData**\ : The picture data to insert.
   
      **puiPictureIndex**\ : The resulting index for the inserted picture data.
   
   
   **Returns**
   
   
      A3D_SUCCESS or an error code.
   
   




