Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #ifndef __SP_DIRECT3D11_SHADER_CONSTANT_BUFFER_H__
00009 #define __SP_DIRECT3D11_SHADER_CONSTANT_BUFFER_H__
00010 
00011 
00012 #include "Base/spStandard.hpp"
00013 
00014 #if defined(SP_COMPILE_WITH_DIRECT3D11)
00015 
00016 
00017 #include "RenderSystem/spConstantBuffer.hpp"
00018 
00019 #include <d3d11.h>
00020 #include <d3d11Shader.h>
00021 
00022 
00023 namespace sp
00024 {
00025 namespace video
00026 {
00027 
00028 
00029 class Direct3D11ShaderClass;
00030 
00031 class SP_EXPORT Direct3D11ConstantBuffer : public ConstantBuffer
00032 {
00033     
00034     public:
00035         
00036         Direct3D11ConstantBuffer(
00037             Direct3D11ShaderClass* Owner, const D3D11_SHADER_BUFFER_DESC &ShaderBufferDesc, u32 Index
00038         );
00039         ~Direct3D11ConstantBuffer();
00040         
00041         
00042         
00043         bool updateBuffer(const void* Buffer, u32 Size = 0);
00044         
00045         bool valid() const;
00046         
00047     private:
00048         
00049         
00050         
00051         
00052         
00053         
00054         
00055         ID3D11Buffer* HWBuffer_;
00056         
00057 };
00058 
00059 
00060 } 
00061 
00062 } 
00063 
00064 
00065 #endif
00066 
00067 #endif
00068 
00069 
00070 
00071