Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 4.66 KB

nf-d3d10-id3d10device-createtexture2d.md

File metadata and controls

90 lines (68 loc) · 4.66 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d10.ID3D10Device.CreateTexture2D
ID3D10Device::CreateTexture2D (d3d10.h)
Create an array of 2D textures (see Texture2D).
38b3a1e8-7790-fb65-bd38-77d5f709bdbd
CreateTexture2D
CreateTexture2D method [Direct3D 10]
CreateTexture2D method [Direct3D 10]
ID3D10Device interface
ID3D10Device interface [Direct3D 10]
CreateTexture2D method
ID3D10Device.CreateTexture2D
ID3D10Device::CreateTexture2D
d3d10/ID3D10Device::CreateTexture2D
direct3d10.id3d10device_createtexture2d
direct3d10\id3d10device_createtexture2d.htm
direct3d10
VS|directx_sdk|~\id3d10device_createtexture2d.htm
12/05/2018
38b3a1e8-7790-fb65-bd38-77d5f709bdbd, CreateTexture2D, CreateTexture2D method [Direct3D 10], CreateTexture2D method [Direct3D 10],ID3D10Device interface, ID3D10Device interface [Direct3D 10],CreateTexture2D method, ID3D10Device.CreateTexture2D, ID3D10Device::CreateTexture2D, d3d10/ID3D10Device::CreateTexture2D, direct3d10.id3d10device_createtexture2d
d3d10.h
Windows
D3D10.lib
Windows
19H1
ID3D10Device::CreateTexture2D
d3d10/ID3D10Device::CreateTexture2D
c++
APIRef
kbSyntax
COM
D3D10.lib
D3D10.dll
ID3D10Device.CreateTexture2D

ID3D10Device::CreateTexture2D

-description

Create an array of 2D textures (see Texture2D).

-parameters

-param pDesc [in]

Type: const D3D10_TEXTURE2D_DESC*

Pointer to a 2D texture description (see D3D10_TEXTURE2D_DESC). To create a typeless resource that can be interpreted at runtime into different, compatible formats, specify a typeless format in the texture description. To generate mipmap levels automatically, set the number of mipmap levels to 0.

-param pInitialData [in]

Type: const D3D10_SUBRESOURCE_DATA*

Pointer to an array of subresource descriptions (see D3D10_SUBRESOURCE_DATA); one for each subresource (ordered by texture array index, then mip level). Applications may not specify NULL for pInitialData when creating IMMUTABLE resources (see D3D10_USAGE). If the resource is multisampled, pInitialData must be NULL because multisampled resources cannot be initialized with data when they are created.

-param ppTexture2D [out]

Type: ID3D10Texture2D**

Address of a pointer to the created texture (see ID3D10Texture2D Interface). Set this parameter to NULL to validate the other input parameters (the method will return S_FALSE if the other input parameters pass validation).

-returns

Type: HRESULT

If the method succeeds, the return code is S_OK. See Direct3D 10 Return Codes for failing error codes.

-remarks

CreateTexture2D creates a 2D texture resource, which contains an array of 1D textures. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.

All resources are made up of one or more subresources. To load data into the texture, applications may supply the data initially as part of D3D10_SUBRESOURCE_DATA structure pointed to by pInitialData, or it may use one of the Texturing Functions supplied by the SDK.

-see-also

ID3D10Device Interface