mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-10 23:07:04 +00:00
[host] remove the depth buffer, it's unused
This commit is contained in:
parent
2019766989
commit
3799929f59
@ -639,9 +639,10 @@ GrabStatus DXGI::GrabFrame(struct FrameInfo & frame, struct CursorInfo & cursor)
|
||||
frame.height = m_height;
|
||||
|
||||
switch (m_frameType)
|
||||
{
|
||||
case FRAME_TYPE_ARGB: return GrabFrameRaw (frame, cursor);
|
||||
{
|
||||
case FRAME_TYPE_NV12: return GrabFrameNV12(frame, cursor);
|
||||
case FRAME_TYPE_H264: return GrabFrameH264(frame, cursor);
|
||||
}
|
||||
|
||||
return GrabFrameRaw(frame, cursor);
|
||||
}
|
@ -105,27 +105,8 @@ bool TextureConverter::Initialize(
|
||||
texDesc.Usage = D3D11_USAGE_DEFAULT;
|
||||
texDesc.CPUAccessFlags = 0;
|
||||
texDesc.MiscFlags = 0;
|
||||
|
||||
texDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
texDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
|
||||
result = device->CreateTexture2D(&texDesc, NULL, &m_depthTexture);
|
||||
if (FAILED(result))
|
||||
{
|
||||
DeInitialize();
|
||||
DEBUG_ERROR("Failed to create the depth/stencil texture");
|
||||
return false;
|
||||
}
|
||||
|
||||
result = device->CreateDepthStencilView(m_depthTexture, NULL, &m_depthView);
|
||||
if (FAILED(result))
|
||||
{
|
||||
DeInitialize();
|
||||
DEBUG_ERROR("Failed to create the depth stencil view");
|
||||
return false;
|
||||
}
|
||||
|
||||
texDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
texDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
|
||||
texDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
texDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
|
||||
result = device->CreateTexture2D(&texDesc, NULL, &m_targetTexture);
|
||||
if (FAILED(result))
|
||||
{
|
||||
@ -276,7 +257,6 @@ void TextureConverter::DeInitialize()
|
||||
SafeRelease(&m_vertexBuffer );
|
||||
SafeRelease(&m_shaderView );
|
||||
SafeRelease(&m_renderView );
|
||||
SafeRelease(&m_depthTexture );
|
||||
SafeRelease(&m_targetTexture);
|
||||
SafeRelease(&m_vertexShader );
|
||||
SafeRelease(&m_pixelShader );
|
||||
@ -320,7 +300,6 @@ bool TextureConverter::Convert(ID3D11Texture2DPtr &texture)
|
||||
|
||||
m_deviceContext->OMSetRenderTargets(1, renderViews, NULL);
|
||||
m_deviceContext->ClearRenderTargetView(m_renderView, color);
|
||||
m_deviceContext->ClearDepthStencilView(m_depthView , D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
|
||||
|
||||
stride = sizeof(VS_INPUT);
|
||||
offset = 0;
|
||||
|
@ -56,8 +56,6 @@ private:
|
||||
DXGI_FORMAT m_format;
|
||||
|
||||
ID3D11Texture2DPtr m_targetTexture;
|
||||
ID3D11Texture2DPtr m_depthTexture;
|
||||
ID3D11DepthStencilViewPtr m_depthView;
|
||||
ID3D11RenderTargetViewPtr m_renderView;
|
||||
ID3D11ShaderResourceViewPtr m_shaderView;
|
||||
ID3D11InputLayoutPtr m_layout;
|
||||
|
Loading…
Reference in New Issue
Block a user