Resource 01 in d3d10

Source: Internet
Author: User

Resource is the data related to the displayed content. Vertex coordinates, normal, color, texture coordinates, texture coordinates, and texture data belong to this column.

1.

There are two types of resources: Buffer and textures. The former can be used to store non-pixel data, while the latter can be used to store pixel data.

All resources are divided into typed and typeless based on the data types that are not defined during creation.

Typed, that is, the data in the resource space has been specified as a certain type, such as a 32-bit integer.

Typeless, that is, the resource space is fixed, but the data type is not necessarily determined by the runtime.

2.

Buffer is divided into vertex buffer, index buffer and constant buffer.

Constant buffer is used by shader. Constant buffer can be an applicationProgramCan also be defined by the effect file. The application uses id3d10effect: getvariablebyname for access and uses the Set * method.

3.

Texture is divided into 1d, 2d, and 3D.

In addition, texturearray, arrayslice, mipslice, and subresources related to texture.

4.

Resource view is mainly used to apply the same resource to different rendering stages.

 

Bytes ---------------------------------------------------------------------------------------------

D3d rendering pipelines are divided into the following phases:

 

The resource used in each stage is different. d3d provides APIs for binding resource and stage. See table.

 

It is strange that the buffer in the output resource is in the OM stage. It's totally understandable .!!! (6/19 2012, probably supporting vector display devices .)

 

In addition to determining the rendering stage in which resource is used, you also need to determine how it will be used.

The preceding values are optional values of d3d10_usage.

The first two are easy to understand.

Staging is a resource used to copy data from other resources. In this case, the first resource is the default resource that is inaccessible to the CPU, the second resource is staging, And the CPU is accessible.

Immutable is a constant resource.

The following table lists how you want to use resource and the appropriate usage value.

 

If you are not sure about the usage, defau is also an option. The shader's constant buffer is always set to default.

 

 

Bytes ---------------------------------------------------------------------------------------------

For details about how to create a buffer and texture, see

Http://msdn.microsoft.com/en-us/library/windows/desktop/bb205130 (V = vs.85). aspx
Http://msdn.microsoft.com/en-us/library/windows/desktop/bb205131 (V = vs.85). aspx

 

 

 

Bytes ---------------------------------------------------------------------------------------------

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.