0

I am creating two 2dtextures in d3d11 like this: m_device->CreateTexture2D(&D3D11Tex, NULL, &tex1); m_device->CreateTexture2D(&D3D11Tex, NULL, &tex2);

D3D11Tex.ArraySize = 1;//currently using I read that this value can be kept as two.

But then how do we get 2 textures. Will keeping ArraSize as 2 give me two textures in tex1 and tex2? Or will tex1 be the array of size two.

Any help on this is appreciated. Thanks in advance.

SentyGuy
  • 11
  • 1

1 Answers1

0

tex1 and tex2 are independent resources that have to be bound to distinct shader resource slots. If you make one of them a 2D texture array, you will still have two shader resources, just one of them has room for two 2D textures in an array.

Note that 2D texture arrays require Feature Level 10.0 or better hardware. The call would fail on a system with a Feature Level 9.1, 9.2, or 9.3 device (i.e. Surface RT, Surface RT 2, Windows phone 8, Shader Model 2.0 video card, etc.).

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81