CD2DMesh Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CD2DMesh Class.
A wrapper for ID2D1Mesh.
class CD2DMesh : public CD2DResource;
Name | Description |
---|---|
CD2DMesh::CD2DMesh | Constructs a CD2DMesh object. |
CD2DMesh::~CD2DMesh | The destructor. Called when a D2D mesh object is being destroyed. |
Name | Description |
---|---|
CD2DMesh::Attach | Attaches existing resource interface to the object |
CD2DMesh::Create | Creates a CD2DMesh. (Overrides CD2DResource::Create.) |
CD2DMesh::Destroy | Destroys a CD2DMesh object. (Overrides CD2DResource::Destroy.) |
CD2DMesh::Detach | Detaches resource interface from the object |
CD2DMesh::Get | Returns ID2D1Mesh interface |
CD2DMesh::IsValid | Checks resource validity (Overrides CD2DResource::IsValid.) |
CD2DMesh::Open | Opens the mesh for population. |
Name | Description |
---|---|
CD2DMesh::operator ID2D1Mesh* | Returns ID2D1Mesh interface |
Name | Description |
---|---|
CD2DMesh::m_pMesh | A pointer to an ID2D1Mesh. |
Header: afxrendertarget.h
The destructor. Called when a D2D mesh object is being destroyed.
virtual ~CD2DMesh();
Attaches existing resource interface to the object
void Attach(ID2D1Mesh* pResource);
pResource
Existing resource interface. Cannot be NULL
Constructs a CD2DMesh object.
CD2DMesh(
CRenderTarget* pParentTarget,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).
Creates a CD2DMesh.
virtual HRESULT Create(CRenderTarget* pRenderTarget);
pRenderTarget
A pointer to the render target.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Destroys a CD2DMesh object.
virtual void Destroy();
Detaches resource interface from the object
ID2D1Mesh* Detach();
Pointer to detached resource interface.
Returns ID2D1Mesh interface
ID2D1Mesh* Get();
Pointer to an ID2D1Mesh interface or NULL if object is not initialized yet.
Checks resource validity
virtual BOOL IsValid() const;
TRUE if resource is valid; otherwise FALSE.
A pointer to an ID2D1Mesh.
ID2D1Mesh* m_pMesh;
Opens the mesh for population.
ID2D1TessellationSink* Open();
A pointer to an ID2D1TessellationSink that is used to populate the mesh.
Returns ID2D1Mesh interface
operator ID2D1Mesh*();
Pointer to an ID2D1Mesh interface or NULL if object is not initialized yet.