//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.Stream.PhysicsGpu { #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Xml; #endregion /// /// Enforces usage mechanics for a GpuVariable. /// public interface GpuVariableInterface { /// /// Texture used by Gpu to read values in. /// Swapped with write texture each pass. /// Texture2D _read { get; set; } /// /// Texture used by Gpu to write values out. /// Swapped with read texture each pass. /// Texture2D _write { get; set; } /// /// Gpu handle that sets either the read texture each pass after it is swapped with the write texture. /// EffectParameter _gpuPointer { get; set; } /// /// A render target for the write texture. /// RenderTarget2D _writeRenderTarget { get; set; } /// /// A render target for the read texture. /// RenderTarget2D _readRenderTarget { get; set; } /// /// Add a single property to the GpuVariable, before setting texture data. /// /// A value to add to the texture. void AddProperty(float property); /// /// Add a single property to the GpuVariable, before setting texture data. /// /// A value to add to the texture. void AddProperty(Vector2 property); /// /// Add a single property to the GpuVariable, before setting texture data. /// /// A value to add to the texture. void AddProperty(Vector3 property); /// /// Add a single property to the GpuVariable, before setting texture data. /// /// A value to add to the texture. void AddProperty(Vector4 property); /// /// Set the texture with all added properties. /// Scales values based on minValue and maxValue, to between 0-1. /// void SetTexData(); /// /// Swap the read and write textures. /// Must be done each pass for previously rendered data to be availible to shaders during next pass. /// void SwapBuffers(); /// /// Usefull function for debugging. /// Writes texture out to an image file. /// void WriteToFile(); } }