public TextureSlot(int colourAttachmentSlot = 0, Texture texture = null, TextureTarget target = TextureTarget.Texture2D) { Enabled = true; External = texture != null; Slot = colourAttachmentSlot; TextureParam = new TextureSlotParam() { Target = target }; Texture = texture; }
public GBuffer SetSlot(int slot, TextureSlotParam texparam) { if (slot < 0 || slot >= MAXSLOTS) { throw new InvalidOperationException("GBuffer.SetSlotTextureParams: slot out of range."); } TextureSlots[slot].Enabled = true; TextureSlots[slot].External = false; TextureSlots[slot].Slot = slot; TextureSlots[slot].TextureParam = texparam; LogTrace($"Internal texture {slot} = {texparam}"); return(this); }