mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Fix Legacy Overlay & Fix Spammed Begin Error
This commit is contained in:
@@ -110,7 +110,6 @@ namespace VRCX
|
|||||||
if ((IntPtr)_renderTarget.Handle == IntPtr.Zero)
|
if ((IntPtr)_renderTarget.Handle == IntPtr.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_deviceContext.Begin(_query);
|
|
||||||
using ComPtr<ID3D11Texture2D> cefTexture =
|
using ComPtr<ID3D11Texture2D> cefTexture =
|
||||||
_device1.OpenSharedResource1<ID3D11Texture2D>(paintInfo.SharedTextureHandle.ToPointer());
|
_device1.OpenSharedResource1<ID3D11Texture2D>(paintInfo.SharedTextureHandle.ToPointer());
|
||||||
_deviceContext.CopyResource(_renderTarget, cefTexture);
|
_deviceContext.CopyResource(_renderTarget, cefTexture);
|
||||||
|
|||||||
@@ -139,37 +139,43 @@ namespace VRCX
|
|||||||
_device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!));
|
_device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!));
|
||||||
|
|
||||||
_texture1.Dispose();
|
_texture1.Dispose();
|
||||||
_device.CreateTexture2D(new Texture2DDesc
|
SilkMarshal.ThrowHResult
|
||||||
{
|
(
|
||||||
Width = 512,
|
_device.CreateTexture2D(new Texture2DDesc
|
||||||
Height = 512,
|
|
||||||
MipLevels = 1,
|
|
||||||
ArraySize = 1,
|
|
||||||
Format = Format.FormatB8G8R8A8Unorm,
|
|
||||||
SampleDesc = new SampleDesc
|
|
||||||
{
|
{
|
||||||
Count = 1,
|
Width = 512,
|
||||||
Quality = 0
|
Height = 512,
|
||||||
},
|
MipLevels = 1,
|
||||||
BindFlags = (uint)BindFlag.ShaderResource
|
ArraySize = 1,
|
||||||
}, null, ref _texture1);
|
Format = Format.FormatB8G8R8A8Unorm,
|
||||||
|
SampleDesc = new SampleDesc
|
||||||
|
{
|
||||||
|
Count = 1,
|
||||||
|
Quality = 0
|
||||||
|
},
|
||||||
|
BindFlags = (uint)BindFlag.ShaderResource
|
||||||
|
}, null, ref _texture1)
|
||||||
|
);
|
||||||
_wristOverlay?.UpdateRender(_device, _deviceContext, _texture1);
|
_wristOverlay?.UpdateRender(_device, _deviceContext, _texture1);
|
||||||
|
|
||||||
_texture2.Dispose();
|
_texture2.Dispose();
|
||||||
_device.CreateTexture2D(new Texture2DDesc
|
SilkMarshal.ThrowHResult
|
||||||
{
|
(
|
||||||
Width = 1024,
|
_device.CreateTexture2D(new Texture2DDesc
|
||||||
Height = 1024,
|
|
||||||
MipLevels = 1,
|
|
||||||
ArraySize = 1,
|
|
||||||
Format = Format.FormatB8G8R8A8Unorm,
|
|
||||||
SampleDesc = new SampleDesc
|
|
||||||
{
|
{
|
||||||
Count = 1,
|
Width = 1024,
|
||||||
Quality = 0
|
Height = 1024,
|
||||||
},
|
MipLevels = 1,
|
||||||
BindFlags = (uint)BindFlag.ShaderResource
|
ArraySize = 1,
|
||||||
}, null, ref _texture2);
|
Format = Format.FormatB8G8R8A8Unorm,
|
||||||
|
SampleDesc = new SampleDesc
|
||||||
|
{
|
||||||
|
Count = 1,
|
||||||
|
Quality = 0
|
||||||
|
},
|
||||||
|
BindFlags = (uint)BindFlag.ShaderResource
|
||||||
|
}, null, ref _texture2)
|
||||||
|
);
|
||||||
_hmdOverlay?.UpdateRender(_device, _deviceContext, _texture2);
|
_hmdOverlay?.UpdateRender(_device, _deviceContext, _texture2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,36 +133,44 @@ namespace VRCX
|
|||||||
_device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!));
|
_device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!));
|
||||||
|
|
||||||
_texture1.Dispose();
|
_texture1.Dispose();
|
||||||
_device.CreateTexture2D(new Texture2DDesc
|
SilkMarshal.ThrowHResult
|
||||||
{
|
(
|
||||||
Width = 512,
|
_device.CreateTexture2D(new Texture2DDesc
|
||||||
Height = 512,
|
|
||||||
MipLevels = 1,
|
|
||||||
ArraySize = 1,
|
|
||||||
Format = Format.FormatB8G8R8A8Unorm,
|
|
||||||
SampleDesc = new SampleDesc
|
|
||||||
{
|
{
|
||||||
Count = 1,
|
Width = 512,
|
||||||
Quality = 0
|
Height = 512,
|
||||||
},
|
MipLevels = 1,
|
||||||
BindFlags = (uint)BindFlag.ShaderResource
|
ArraySize = 1,
|
||||||
}, null, ref _texture1);
|
Format = Format.FormatB8G8R8A8Unorm,
|
||||||
|
SampleDesc = new SampleDesc
|
||||||
|
{
|
||||||
|
Count = 1,
|
||||||
|
Quality = 0
|
||||||
|
},
|
||||||
|
BindFlags = (uint)BindFlag.ShaderResource,
|
||||||
|
CPUAccessFlags = (uint)CpuAccessFlag.Write
|
||||||
|
}, null, ref _texture1)
|
||||||
|
);
|
||||||
|
|
||||||
_texture2.Dispose();
|
_texture2.Dispose();
|
||||||
_device.CreateTexture2D(new Texture2DDesc
|
SilkMarshal.ThrowHResult
|
||||||
{
|
(
|
||||||
Width = 1024,
|
_device.CreateTexture2D(new Texture2DDesc
|
||||||
Height = 1024,
|
|
||||||
MipLevels = 1,
|
|
||||||
ArraySize = 1,
|
|
||||||
Format = Format.FormatB8G8R8A8Unorm,
|
|
||||||
SampleDesc = new SampleDesc
|
|
||||||
{
|
{
|
||||||
Count = 1,
|
Width = 1024,
|
||||||
Quality = 0
|
Height = 1024,
|
||||||
},
|
MipLevels = 1,
|
||||||
BindFlags = (uint)BindFlag.ShaderResource
|
ArraySize = 1,
|
||||||
}, null, ref _texture2);
|
Format = Format.FormatB8G8R8A8Unorm,
|
||||||
|
SampleDesc = new SampleDesc
|
||||||
|
{
|
||||||
|
Count = 1,
|
||||||
|
Quality = 0
|
||||||
|
},
|
||||||
|
BindFlags = (uint)BindFlag.ShaderResource,
|
||||||
|
CPUAccessFlags = (uint)CpuAccessFlag.Write
|
||||||
|
}, null, ref _texture2)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user