public void Create(MyBorrowedTextureKey key) { MyRenderProxy.Assert(!IsBorrowed, "The texture cannot be borrowd during initialisation."); m_numRefs = 0; CreateTextureInternal(ref key); LastUsedDebugName = "None"; LastUsedInFrameNum = 0; Key = key; }
protected override void CreateTextureInternal(ref MyBorrowedTextureKey key) { DepthStencilTextureInternal = (IDepthStencilInternal)MyManagers.DepthStencils.CreateDepthStencil( NamesGenerator.GetUniqueName(), key.Width, key.Height, samplesCount: key.SamplesCount, samplesQuality: key.SamplesQuality); }
//public ShaderResourceView Srv { get { return CustomTexture.Linear.Srv; } } protected override void CreateTextureInternal(ref MyBorrowedTextureKey key) { CustomTexture = MyManagers.CustomTextures.CreateTexture( NamesGenerator.GetUniqueName(), key.Width, key.Height, key.SamplesCount, key.SamplesQuality); }
protected abstract void CreateTextureInternal(ref MyBorrowedTextureKey key);