protected void CycleTextures(Texture nextTexture, RectangleF textureClip, RightAngledRotation nextRotation) { TryDispose(ref _lastTexture); // Current -> Last _lastTexture = _currentTexture; _lastRawSourceSize = _currentClippedSize; _lastTextureClip = _currentTextureClip; _lastImageContext = _imageContext; // Next -> Current SizeF textureSize; _currentTexture = CreateTextureCopy(nextTexture, out textureSize); _currentTextureSize = textureSize; UpdateTextureClip(textureClip); _imageContext = new ImageContext { FrameSize = _frameSize, ShaderEffect = Effect, Rotation = nextRotation, HorizontalTextureAlignment = HorizontalTextureAlignment, VerticalTextureAlignment = VerticalTextureAlignment }; StartTransition(); FireChanged(); }
protected void CycleTextures(Texture nextTexture, RectangleF textureClip, RightAngledRotation nextRotation) { TryDispose(ref _lastTexture); // Current -> Last _lastTexture = _currentTexture; _lastRawSourceSize = _currentClippedSize; _lastTextureClip = _currentTextureClip; _lastImageContext = _imageContext; // Next -> Current SizeF textureSize; _currentTexture = CreateTextureCopy(nextTexture, out textureSize); _currentTextureSize = textureSize; UpdateTextureClip(textureClip); _imageContext = new ImageContext { FrameSize = _frameSize, ShaderEffect = Effect, Rotation = nextRotation }; StartTransition(); FireChanged(); }