다음을 통해 공유


CD3D11_RENDER_TARGET_VIEW_DESC 구조체(d3d11.h)

렌더링 대상 보기를 나타내며 렌더링 대상 뷰를 만들기 위한 편리한 메서드를 제공합니다.

Syntax

struct CD3D11_RENDER_TARGET_VIEW_DESC : D3D11_RENDER_TARGET_VIEW_DESC {
  void CD3D11_RENDER_TARGET_VIEW_DESC();
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    const D3D11_RENDER_TARGET_VIEW_DESC & o
  );
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    D3D11_RTV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize
  );
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    ID3D11Buffer *unnamedParam1,
    DXGI_FORMAT  format,
    UINT         firstElement,
    UINT         numElements
  );
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    ID3D11Texture1D     *pTex1D,
    D3D11_RTV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize
  );
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    ID3D11Texture2D     *pTex2D,
    D3D11_RTV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize
  );
  void CD3D11_RENDER_TARGET_VIEW_DESC(
    ID3D11Texture3D *pTex3D,
    DXGI_FORMAT     format,
    UINT            mipSlice,
    UINT            firstWSlice,
    UINT            wSize
  );
  void ~CD3D11_RENDER_TARGET_VIEW_DESC();
};

상속

CD3D11_RENDER_TARGET_VIEW_DESC 구조체는 D3D11_RENDER_TARGET_VIEW_DESC 구현합니다.

멤버

void CD3D11_RENDER_TARGET_VIEW_DESC()

초기화되지 않은 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( const D3D11_RENDER_TARGET_VIEW_DESC & o)

D3D11_RENDER_TARGET_VIEW_DESC 구조체로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( D3D11_RTV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize)

D3D11_RENDER_TARGET_VIEW_DESC 값으로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( ID3D11Buffer *unnamedParam1, DXGI_FORMAT format, UINT firstElement, UINT numElements)

D3D11_RTV_DIMENSION 값으로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( ID3D11Texture1D *pTex1D, D3D11_RTV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize)

D3D11_TEX1D_RTV 또는 D3D11_TEX1D_ARRAY_RTV 값으로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( ID3D11Texture2D *pTex2D, D3D11_RTV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize)

2D 텍스처 값으로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void CD3D11_RENDER_TARGET_VIEW_DESC( ID3D11Texture3D *pTex3D, DXGI_FORMAT format, UINT mipSlice, UINT firstWSlice, UINT wSize)

3D 텍스처 값으로 초기화된 CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 새 instance 인스턴스화합니다.

void ~CD3D11_RENDER_TARGET_VIEW_DESC()

CD3D11_RENDER_TARGET_VIEW_DESC 구조체의 instance 제거합니다.

설명

D3D11.h에서 CD3D11_RENDER_TARGET_VIEW_DESC 정의하는 방법은 다음과 같습니다.

struct CD3D11_RENDER_TARGET_VIEW_DESC : public D3D11_RENDER_TARGET_VIEW_DESC
{
    CD3D11_RENDER_TARGET_VIEW_DESC()
    {}
    explicit CD3D11_RENDER_TARGET_VIEW_DESC( const D3D11_RENDER_TARGET_VIEW_DESC& o ) :
        D3D11_RENDER_TARGET_VIEW_DESC( o )
    {}
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(
        D3D11_RTV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0, // FirstElement for BUFFER
        UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D
        UINT arraySize = -1 ) // WSize for TEXTURE3D
    {
        Format = format;
        ViewDimension = viewDimension;
        switch (viewDimension)
        {
        case D3D11_RTV_DIMENSION_BUFFER:
            Buffer.FirstElement = mipSlice;
            Buffer.NumElements = firstArraySlice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE1D:
            Texture1D.MipSlice = mipSlice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MipSlice = mipSlice;
            Texture1DArray.FirstArraySlice = firstArraySlice;
            Texture1DArray.ArraySize = arraySize;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2D:
            Texture2D.MipSlice = mipSlice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MipSlice = mipSlice;
            Texture2DArray.FirstArraySlice = firstArraySlice;
            Texture2DArray.ArraySize = arraySize;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DMS:
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
            Texture2DMSArray.FirstArraySlice = firstArraySlice;
            Texture2DMSArray.ArraySize = arraySize;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE3D:
            Texture3D.MipSlice = mipSlice;
            Texture3D.FirstWSlice = firstArraySlice;
            Texture3D.WSize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(
        _In_ ID3D11Buffer*,
        DXGI_FORMAT format,
        UINT firstElement,
        UINT numElements )
    {
        Format = format;
        ViewDimension = D3D11_RTV_DIMENSION_BUFFER;
        Buffer.FirstElement = firstElement;
        Buffer.NumElements = numElements;
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(
        _In_ ID3D11Texture1D* pTex1D,
        D3D11_RTV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstArraySlice = 0,
        UINT arraySize = -1 )
    {
        ViewDimension = viewDimension;
        if (DXGI_FORMAT_UNKNOWN == format ||
            (-1 == arraySize && D3D11_RTV_DIMENSION_TEXTURE1DARRAY == viewDimension))
        {
            D3D11_TEXTURE1D_DESC TexDesc;
            pTex1D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice;
        }
        Format = format;
        switch (viewDimension)
        {
        case D3D11_RTV_DIMENSION_TEXTURE1D:
            Texture1D.MipSlice = mipSlice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MipSlice = mipSlice;
            Texture1DArray.FirstArraySlice = firstArraySlice;
            Texture1DArray.ArraySize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(
        _In_ ID3D11Texture2D* pTex2D,
        D3D11_RTV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstArraySlice = 0,
        UINT arraySize = -1 )
    {
        ViewDimension = viewDimension;
        if (DXGI_FORMAT_UNKNOWN == format || 
            (-1 == arraySize &&
                (D3D11_RTV_DIMENSION_TEXTURE2DARRAY == viewDimension ||
                D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY == viewDimension)))
        {
            D3D11_TEXTURE2D_DESC TexDesc;
            pTex2D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice;
        }
        Format = format;
        switch (viewDimension)
        {
        case D3D11_RTV_DIMENSION_TEXTURE2D:
            Texture2D.MipSlice = mipSlice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MipSlice = mipSlice;
            Texture2DArray.FirstArraySlice = firstArraySlice;
            Texture2DArray.ArraySize = arraySize;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DMS:
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
            Texture2DMSArray.FirstArraySlice = firstArraySlice;
            Texture2DMSArray.ArraySize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(
        _In_ ID3D11Texture3D* pTex3D,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstWSlice = 0,
        UINT wSize = -1 )
    {
        ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D;
        if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize)
        {
            D3D11_TEXTURE3D_DESC TexDesc;
            pTex3D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice;
        }
        Format = format;
        Texture3D.MipSlice = mipSlice;
        Texture3D.FirstWSlice = firstWSlice;
        Texture3D.WSize = wSize;
    }
    ~CD3D11_RENDER_TARGET_VIEW_DESC() {}
    operator const D3D11_RENDER_TARGET_VIEW_DESC&() const { return *this; }
};

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows 7 [데스크톱 앱 | UWP 앱]
지원되는 최소 서버 Windows Server 2008 R2 [데스크톱 앱 | UWP 앱]
머리글 d3d11.h

추가 정보

CD3D11 도우미 구조체