public void Dispose() { _disposer.DisposeAll(); PaletteView?.Dispose(); PaletteTexture?.Dispose(); CommonResourceSet?.Dispose(); PaletteView = null; PaletteTexture = null; CommonResourceSet = null; }
public void DestroyDeviceObjects() { _disposer.DisposeAll(); PaletteView?.Dispose(); PaletteTexture?.Dispose(); CommonResourceSet?.Dispose(); PaletteView = null; PaletteTexture = null; CommonResourceSet = null; }
public void UpdatePerFrameResources(GraphicsDevice gd, CommandList cl) { CommonResourceSet?.Dispose(); CommonResourceSet = gd.ResourceFactory.CreateResourceSet(new ResourceSetDescription( CommonResourceLayout, CameraInfoBuffer, ProjectionMatrixBuffer, ModelViewMatrixBuffer, PaletteView)); CommonResourceSet.Name = "RS_Common"; cl.UpdateBuffer(ProjectionMatrixBuffer, 0, Camera.ProjectionMatrix); cl.UpdateBuffer(ModelViewMatrixBuffer, 0, Camera.ViewMatrix); cl.UpdateBuffer(CameraInfoBuffer, 0, Camera.GetCameraInfo()); }