difference between the usage of GL_TEXTURE_3D and GL_TEXTURE_2D_ARRAY​

They are the same to me?
Are they interchangeable?

No.

3D texture can interpolate across ‘slices’, texture array interpolates only inside each ‘slice’.
Also, each mipmap level of 3D texture has half the ‘slices’ of previous level while 2D array has the same number of ‘slices’ across all mipmaps.

For 3D texture third coordinate is normalized while for 2D array it is not (but this rather trivial difference).

[QUOTE=kyle_;1238333]No.

  1. 3D texture can interpolate across ‘slices’, texture array interpolates only inside each ‘slice’.
  2. Also, each mipmap level of 3D texture has half the ‘slices’ of previous level while 2D array has the same number of ‘slices’ across all mipmaps. + For 3D texture third coordinate is normalized while for 2D array it is not (but this rather trivial difference).[/QUOTE]
  3. No, as i found out by accident a few months ago. For example 0.5 as the third texture coordinate interpolates the 0th and 1st texture slice in the 2D_ARRAY texture. Not sure whether the behavior is by OpenGl spec (or just Nvidia interpretation of it). I did not actually need that functionality and hence did not dig it up in spec - if anyone knows, please share.
  4. Yes.

[QUOTE=tanzanite;1238375]1) No, as i found out by accident a few months ago. For example 0.5 as the third texture coordinate interpolates the 0th and 1st texture slice in the 2D_ARRAY texture. Not sure whether the behavior is by OpenGl spec (or just Nvidia interpretation of it). I did not actually need that functionality and hence did not dig it up in spec - if anyone knows, please share.
2) Yes.[/QUOTE]

  1. Well, that sounds like a bug in the NVIDIA drivers if it really works like that. Texel values should not interpolate between array slices.