OSDN Git Service

Merge branch 'feature/#36529_SlimDXからSharpDXへの移行' into develop
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d10 / GeometryShaderWrapper.cpp
diff --git a/SlimDXc_Jun2010(VC++2008)/source/direct3d10/GeometryShaderWrapper.cpp b/SlimDXc_Jun2010(VC++2008)/source/direct3d10/GeometryShaderWrapper.cpp
deleted file mode 100644 (file)
index af43246..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*\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
-#include "stdafx.h"\r
-\r
-#include "../stack_array.h"\r
-\r
-#include "Buffer.h"\r
-#include "SamplerState.h"\r
-#include "ShaderResourceView.h"\r
-#include "GeometryShaderWrapper.h"\r
-#include "GeometryShader.h"\r
-\r
-using namespace System;\r
-\r
-namespace SlimDX\r
-{\r
-namespace Direct3D10\r
-{ \r
-       GeometryShaderWrapper::GeometryShaderWrapper( ID3D10Device* device )\r
-       {\r
-               if( device == 0 )\r
-                       throw gcnew ArgumentNullException( "device" );\r
-               m_Device = device;\r
-       }\r
-\r
-       void GeometryShaderWrapper::Set( GeometryShader^ shader )\r
-       {\r
-               m_Device->GSSetShader( shader == nullptr ? 0 : shader->InternalPointer );\r
-       }\r
-\r
-       GeometryShader^ GeometryShaderWrapper::Get()\r
-       {\r
-               ID3D10GeometryShader* shader = 0;\r
-               m_Device->GSGetShader( &shader );\r
-\r
-               return shader == 0 ? nullptr : GeometryShader::FromPointer( shader );\r
-       }\r
-\r
-       array<Buffer^>^ GeometryShaderWrapper::GetConstantBuffers( int startSlot, int count )\r
-       {\r
-               array<Buffer^>^ buffers = gcnew array<Buffer^>( count );\r
-               stack_array<ID3D10Buffer*> results = stackalloc( ID3D10Buffer*, count );\r
-\r
-               m_Device->GSGetConstantBuffers( startSlot, count, &results[0] );\r
-\r
-               for( int i = 0; i < count; i++ )\r
-                       buffers[i] = Buffer::FromPointer( results[i] );\r
-\r
-               return buffers;\r
-       }\r
-\r
-       array<SamplerState^>^ GeometryShaderWrapper::GetSamplers( int startSlot, int count )\r
-       {\r
-               array<SamplerState^>^ samplers = gcnew array<SamplerState^>( count );\r
-               stack_array<ID3D10SamplerState*> results = stackalloc( ID3D10SamplerState*, count );\r
-\r
-               m_Device->GSGetSamplers( startSlot, count, &results[0] );\r
-\r
-               for( int i = 0; i < count; i++ )\r
-                       samplers[i] = SamplerState::FromPointer( results[i] );\r
-\r
-               return samplers;\r
-       }\r
-\r
-       array<ShaderResourceView^>^ GeometryShaderWrapper::GetShaderResources( int startSlot, int count )\r
-       {\r
-               array<ShaderResourceView^>^ resources = gcnew array<ShaderResourceView^>( count );\r
-               stack_array<ID3D10ShaderResourceView*> results = stackalloc( ID3D10ShaderResourceView*, count );\r
-\r
-               m_Device->GSGetShaderResources( startSlot, count, &results[0] );\r
-\r
-               for( int i = 0; i < count; i++ )\r
-                       resources[i] = ShaderResourceView::FromPointer( results[i] );\r
-\r
-               return resources;\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetConstantBuffer( Buffer^ constantBuffer, int slot )\r
-       {\r
-               ID3D10Buffer *buffer = constantBuffer == nullptr ? NULL : constantBuffer->InternalPointer;\r
-               m_Device->GSSetConstantBuffers( slot, 1, &buffer );\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetConstantBuffers( array<Buffer^>^ constantBuffers, int startSlot, int count )\r
-       {\r
-               if( count > constantBuffers->Length )\r
-                       throw gcnew ArgumentOutOfRangeException( "count" );\r
-\r
-               stack_array<ID3D10Buffer*> input = stackalloc( ID3D10Buffer*, count );\r
-               for( int i = 0; i < count; i++ )\r
-                       input[i] = constantBuffers[i] == nullptr ? NULL : constantBuffers[i]->InternalPointer;\r
-\r
-               m_Device->GSSetConstantBuffers( startSlot, count, &input[0] );\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetSampler( SamplerState^ sampler, int slot )\r
-       {\r
-               ID3D10SamplerState *pointer = sampler == nullptr ? NULL : sampler->InternalPointer;\r
-               m_Device->GSSetSamplers( slot, 1, &pointer );\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetSamplers( array<SamplerState^>^ samplers, int startSlot, int count )\r
-       {\r
-               if( count > samplers->Length )\r
-                       throw gcnew ArgumentOutOfRangeException( "count" );\r
-\r
-               stack_array<ID3D10SamplerState*> input = stackalloc( ID3D10SamplerState*, count );\r
-               for( int i = 0; i < count; i++ )\r
-                       input[i] = samplers[i] == nullptr ? NULL : samplers[i]->InternalPointer;\r
-\r
-               m_Device->GSSetSamplers( startSlot, count, &input[0] );\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetShaderResource( ShaderResourceView^ resourceView, int slot )\r
-       {\r
-               ID3D10ShaderResourceView *resource = resourceView == nullptr ? NULL : resourceView->InternalPointer;\r
-               m_Device->GSSetShaderResources( slot, 1, &resource );\r
-       }\r
-\r
-       void GeometryShaderWrapper::SetShaderResources( array<ShaderResourceView^>^ resourceViews, int startSlot, int count )\r
-       {\r
-               if( count > resourceViews->Length )\r
-                       throw gcnew ArgumentOutOfRangeException( "count" );\r
-\r
-               stack_array<ID3D10ShaderResourceView*> input = stackalloc( ID3D10ShaderResourceView*, count );\r
-               for( int i = 0; i < count; i++ )\r
-                       input[i] = resourceViews[i] == nullptr ? NULL : resourceViews[i]->InternalPointer;\r
-\r
-               m_Device->GSSetShaderResources( startSlot, count, &input[0] );\r
-       }\r
-}\r
-}\r