/// <summary> /// Attaches a single face of the given cube map array texture level to an attachment point. /// </summary> /// <param name="target">The framebuffer target to bind to.</param> /// <param name="attachment">The attachment point to attach to.</param> /// <param name="texture">The texture to attach.</param> /// <param name="arrayLayer">The layer of the texture to attach.</param> /// <param name="face">The cube map face of the texture to attach.</param> /// <param name="level">The level of the texture to attach.</param> public void Attach(FramebufferTarget target, FramebufferAttachment attachment, TextureCubemapArray texture, int arrayLayer, int face, int level = 0) { Attach(target, attachment, (LayeredTexture)texture, 6 * arrayLayer + face, level); }
/// <summary> /// Binds a single face of the given texture level to an image unit.<br/> /// Calculates the index of the layer-face as 6 * arrayLayer + face. /// </summary> /// <param name="imageUnit">The image unit to use.</param> /// <param name="texture">The texture to bind.</param> /// <param name="level">The mipmap level to bind.</param> /// <param name="arrayLayer">The layer of the texture to bind.</param> /// <param name="face">The cube map face to bind.</param> /// <param name="access">Specifies the type of access allowed on the image.</param> public void Bind(int imageUnit, TextureCubemapArray texture, int level, int arrayLayer, int face, TextureAccess access) { // note: the layer parameter indexes the layer-faces, hence the multiplication of the array-layer by 6 Bind(imageUnit, texture, level, false, 6 * arrayLayer + face, access); }