Commit 21f5024e authored by Martin Finkel's avatar Martin Finkel
Browse files

Fix indentation, uses spaces

parent 74184daa
......@@ -5,11 +5,11 @@
RenderAPI* CreateRenderAPI(UnityGfxRenderer apiType)
{
// if (apiType == kUnityGfxRendererD3D11)
// {
extern RenderAPI* CreateRenderAPI_D3D11();
return CreateRenderAPI_D3D11();
// }
// if (apiType == kUnityGfxRendererD3D11)
// {
extern RenderAPI* CreateRenderAPI_D3D11();
return CreateRenderAPI_D3D11();
// }
// # if SUPPORT_D3D9
// if (apiType == kUnityGfxRendererD3D9)
......@@ -46,6 +46,6 @@ RenderAPI* CreateRenderAPI(UnityGfxRenderer apiType)
// }
// # endif // if SUPPORT_OPENGL_UNIFIED
// Unknown or unsupported graphics API
return NULL;
// Unknown or unsupported graphics API
return NULL;
}
......@@ -13,10 +13,10 @@ struct IUnityInterfaces;
class RenderAPI
{
public:
virtual ~RenderAPI() { }
virtual ~RenderAPI() { }
// Process general event like initialization, shutdown, device loss/reset etc.
virtual void ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) = 0;
// Process general event like initialization, shutdown, device loss/reset etc.
virtual void ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) = 0;
virtual void setVlcContext(libvlc_media_player_t *mp) {}
......
......@@ -29,7 +29,7 @@ class RenderAPI_D3D11 : public RenderAPI
{
public:
virtual void setVlcContext(libvlc_media_player_t *mp) override;
virtual void ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) override;
virtual void ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) override;
void* getVideoFrame(bool* out_updated) override;
/* VLC callbacks */
......@@ -42,14 +42,14 @@ public:
void Resize(void (*report_size_change)(void *report_opaque, unsigned width, unsigned height), void *report_opaque );
private:
void CreateResources(ID3D11Device *d3device, ID3D11DeviceContext *d3dctx);
void ReleaseResources();
void CreateResources(ID3D11Device *d3device, ID3D11DeviceContext *d3dctx);
void ReleaseResources();
void DebugInUnity(LPCSTR message);
void Update(UINT width, UINT height);
/* Unity side resources */
ID3D11Device *m_d3deviceUnity = nullptr;
ID3D11DeviceContext *m_d3dctxUnity = nullptr;
ID3D11Device *m_d3deviceUnity = nullptr;
ID3D11DeviceContext *m_d3dctxUnity = nullptr;
ID3D11Texture2D *m_textureUnity = nullptr;
ID3D11ShaderResourceView *m_textureShaderInput = nullptr;
HANDLE m_sharedHandle = nullptr; // handle of the texture used by VLC and the app
......@@ -113,7 +113,7 @@ void Resize_cb( void *opaque,
RenderAPI* CreateRenderAPI_D3D11()
{
return new RenderAPI_D3D11();
return new RenderAPI_D3D11();
}
void RenderAPI_D3D11::setVlcContext(libvlc_media_player_t *mp)
......@@ -130,8 +130,8 @@ void RenderAPI_D3D11::ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInt
{
DEBUG("Entering ProcessDeviceEvent \n");
switch (type)
{
switch (type)
{
case kUnityGfxDeviceEventInitialize:
{
IUnityGraphicsD3D11* d3d = interfaces->Get<IUnityGraphicsD3D11>();
......@@ -311,7 +311,7 @@ void RenderAPI_D3D11::CreateResources(ID3D11Device *d3device, ID3D11DeviceContex
{
DEBUG("Entering CreateResources \n");
HRESULT hr;
HRESULT hr;
ZeroMemory(&m_sizeLock, sizeof(CRITICAL_SECTION));
InitializeCriticalSection(&m_sizeLock);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment