|
|
@@ -9,6 +9,7 @@ namespace CamelotEngine
|
|
|
SamplerStatePtr RenderStateManager::createSamplerState(const SAMPLER_STATE_DESC& desc) const
|
|
|
{
|
|
|
SamplerStatePtr samplerState = SamplerStatePtr(new SamplerState());
|
|
|
+ samplerState->setThisPtr(samplerState);
|
|
|
samplerState->initialize(desc);
|
|
|
|
|
|
return samplerState;
|
|
|
@@ -17,6 +18,7 @@ namespace CamelotEngine
|
|
|
DepthStencilStatePtr RenderStateManager::createDepthStencilState(const DEPTH_STENCIL_STATE_DESC& desc) const
|
|
|
{
|
|
|
DepthStencilStatePtr depthStencilState = DepthStencilStatePtr(new DepthStencilState());
|
|
|
+ depthStencilState->setThisPtr(depthStencilState);
|
|
|
depthStencilState->initialize(desc);
|
|
|
|
|
|
return depthStencilState;
|
|
|
@@ -25,6 +27,7 @@ namespace CamelotEngine
|
|
|
RasterizerStatePtr RenderStateManager::createRasterizerState(const RASTERIZER_STATE_DESC& desc) const
|
|
|
{
|
|
|
RasterizerStatePtr rasterizerState = RasterizerStatePtr(new RasterizerState());
|
|
|
+ rasterizerState->setThisPtr(rasterizerState);
|
|
|
rasterizerState->initialize(desc);
|
|
|
|
|
|
return rasterizerState;
|
|
|
@@ -33,6 +36,7 @@ namespace CamelotEngine
|
|
|
BlendStatePtr RenderStateManager::createBlendState(const BLEND_STATE_DESC& desc) const
|
|
|
{
|
|
|
BlendStatePtr blendState = BlendStatePtr(new BlendState());
|
|
|
+ blendState->setThisPtr(blendState);
|
|
|
blendState->initialize(desc);
|
|
|
|
|
|
return blendState;
|
|
|
@@ -40,21 +44,33 @@ namespace CamelotEngine
|
|
|
|
|
|
SamplerStatePtr RenderStateManager::createEmptySamplerState() const
|
|
|
{
|
|
|
- return SamplerStatePtr(new SamplerState());
|
|
|
+ SamplerStatePtr samplerState = SamplerStatePtr(new SamplerState());
|
|
|
+ samplerState->setThisPtr(samplerState);
|
|
|
+
|
|
|
+ return samplerState;
|
|
|
}
|
|
|
|
|
|
DepthStencilStatePtr RenderStateManager::createEmptyDepthStencilState() const
|
|
|
{
|
|
|
- return DepthStencilStatePtr(new DepthStencilState());
|
|
|
+ DepthStencilStatePtr depthStencilState = DepthStencilStatePtr(new DepthStencilState());
|
|
|
+ depthStencilState->setThisPtr(depthStencilState);
|
|
|
+
|
|
|
+ return depthStencilState;
|
|
|
}
|
|
|
|
|
|
RasterizerStatePtr RenderStateManager::createEmptyRasterizerState() const
|
|
|
{
|
|
|
- return RasterizerStatePtr(new RasterizerState());
|
|
|
+ RasterizerStatePtr rasterizerState = RasterizerStatePtr(new RasterizerState());
|
|
|
+ rasterizerState->setThisPtr(rasterizerState);
|
|
|
+
|
|
|
+ return rasterizerState;
|
|
|
}
|
|
|
|
|
|
BlendStatePtr RenderStateManager::createEmptyBlendState() const
|
|
|
{
|
|
|
- return BlendStatePtr(new BlendState());
|
|
|
+ BlendStatePtr blendState = BlendStatePtr(new BlendState());
|
|
|
+ blendState->setThisPtr(blendState);
|
|
|
+
|
|
|
+ return blendState;
|
|
|
}
|
|
|
}
|