+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-#include "../ComObject.h"\r
-\r
-#include "Enums.h"\r
-#include "Resource10.h"\r
-#include "ImageLoadInformation.h"\r
-\r
-namespace SlimDX\r
-{\r
- ref class DataStream;\r
-\r
- namespace Direct3D10\r
- {\r
- ref class Device;\r
- value class Texture1DDescription;\r
- \r
- public ref class Texture1D : public Resource\r
- {\r
- COMOBJECT(ID3D10Texture1D, Texture1D);\r
- \r
- private:\r
- static ID3D10Texture1D* Build( SlimDX::Direct3D10::Device^ device, Texture1DDescription description, D3D10_SUBRESOURCE_DATA* data ); \r
- \r
- public:\r
- /// <summary>\r
- /// Gets the texture description.\r
- /// </summary>\r
- property Texture1DDescription Description\r
- {\r
- Texture1DDescription get();\r
- }\r
- \r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="Texture1D"/> class.\r
- /// </summary>\r
- /// <param name="device">The device to associate the texture with.</param>\r
- /// <param name="description">The description of the texture.</param>\r
- Texture1D( SlimDX::Direct3D10::Device^ device, Texture1DDescription description );\r
- \r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="Texture1D"/> class.\r
- /// </summary>\r
- /// <param name="device">The device to associate the texture with.</param>\r
- /// <param name="description">The description of the texture.</param>\r
- /// <param name="data">The initial texture data.</param>\r
- Texture1D( SlimDX::Direct3D10::Device^ device, Texture1DDescription description, DataStream^ data );\r
- \r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="Texture1D"/> class.\r
- /// </summary>\r
- /// <param name="device">The device to associate the texture with.</param>\r
- /// <param name="description">The description of the texture.</param>\r
- /// <param name="data">An array of initial texture data for each subresource.</param>\r
- Texture1D( SlimDX::Direct3D10::Device^ device, Texture1DDescription description, array<DataStream^>^ data );\r
- \r
- /// <summary>\r
- /// Maps the texture, providing CPU access to its contents.\r
- /// </summary>\r
- /// <param name="subresource">The subresource to map.</param>\r
- /// <param name="mode">The IO operations to enable on the CPU.</param>\r
- /// <param name="flags">Flags indicating how the CPU should respond when the GPU is busy.</param>\r
- /// <returns>A data stream containing the mapped data. This data stream is invalidated\r
- /// when the buffer is unmapped.</returns>\r
- DataStream^ Map( int subresource, MapMode mode, MapFlags flags );\r
- \r
- /// <summary>\r
- /// Unmaps the texture.\r
- /// </summary>\r
- /// <param name="subresource">The subresource to unmap.</param>\r
- void Unmap( int subresource );\r
- \r
- static Texture1D^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName );\r
- static Texture1D^ FromFile( SlimDX::Direct3D10::Device^ device, System::String^ fileName, ImageLoadInformation loadInfo );\r
- static Texture1D^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory );\r
- static Texture1D^ FromMemory( SlimDX::Direct3D10::Device^ device, array<System::Byte>^ memory, ImageLoadInformation loadInfo );\r
- static Texture1D^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, int sizeInBytes );\r
- static Texture1D^ FromStream( SlimDX::Direct3D10::Device^ device, System::IO::Stream^ stream, int sizeInBytes, ImageLoadInformation loadInfo );\r
-\r
- static Result ToFile( Texture1D^ texture, ImageFileFormat format, System::String^ fileName );\r
- static Result ToStream( Texture1D^ texture, ImageFileFormat format, System::IO::Stream^ stream );\r
- };\r
- }\r
-};
\ No newline at end of file