summaryrefslogtreecommitdiffstats
path: root/unityplugin
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-02-09 23:06:00 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-02-09 23:06:00 +0000
commit3c8fa483a325ff3f82ba23c5fc24c7a731761d17 (patch)
tree17c541d746e474831bc923ddcb9aca7afa42e5ad /unityplugin
parentUpdated core (fixed dynamic heap master block counting issue). (diff)
downloadDiligentEngine-3c8fa483a325ff3f82ba23c5fc24c7a731761d17.tar.gz
DiligentEngine-3c8fa483a325ff3f82ba23c5fc24c7a731761d17.zip
Replaced reference to initial data parameter with pointer in CreateTexture and CreateBuffer methods; updated light scattering implementation to not use lua
Diffstat (limited to 'unityplugin')
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp8
-rw-r--r--unityplugin/GhostCubeScene/src/GhostCubeScene.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp
index 164cea5..859951d 100644
--- a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp
+++ b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp
@@ -88,8 +88,8 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T
LayoutElement LayoutElems[] =
{
- LayoutElement(0, 0, 3, VT_FLOAT32, False),
- LayoutElement(1, 0, 4, VT_FLOAT32, False)
+ LayoutElement{0, 0, 3, VT_FLOAT32, False},
+ LayoutElement{1, 0, 4, VT_FLOAT32, False}
};
PSODesc.GraphicsPipeline.pVS = pVS;
@@ -126,7 +126,7 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T
BufferData VBData;
VBData.pData = CubeVerts;
VBData.DataSize = sizeof(CubeVerts);
- pDevice->CreateBuffer(VertBuffDesc, VBData, &m_CubeVertexBuffer);
+ pDevice->CreateBuffer(VertBuffDesc, &VBData, &m_CubeVertexBuffer);
}
{
@@ -147,7 +147,7 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T
BufferData IBData;
IBData.pData = Indices;
IBData.DataSize = sizeof(Indices);
- pDevice->CreateBuffer(IndBuffDesc, IBData, &m_CubeIndexBuffer);
+ pDevice->CreateBuffer(IndBuffDesc, &IBData, &m_CubeIndexBuffer);
}
}
diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
index a6f4a07..a2599cd 100644
--- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
+++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
@@ -69,13 +69,13 @@ void GhostCubeScene::OnGraphicsInitialized()
TexDesc.ClearValue.Color[1] = 0.2f;
TexDesc.ClearValue.Color[2] = 0.5f;
TexDesc.ClearValue.Color[3] = 1.0f;
- pDevice->CreateTexture(TexDesc, TextureData(), &m_pRenderTarget);
+ pDevice->CreateTexture(TexDesc, nullptr, &m_pRenderTarget);
TexDesc.Name = "Mirror depth buffer";
TexDesc.Format = TEX_FORMAT_D32_FLOAT;
TexDesc.BindFlags = BIND_DEPTH_STENCIL | BIND_SHADER_RESOURCE;
TexDesc.ClearValue.DepthStencil.Depth = 0.f;
- pDevice->CreateTexture(TexDesc, TextureData(), &m_pDepthBuffer);
+ pDevice->CreateTexture(TexDesc, nullptr, &m_pDepthBuffer);
//auto deviceType = pDevice->GetDeviceCaps().DevType;
{