From 96ce2c96df072507ce8c69c38902183a753f8190 Mon Sep 17 00:00:00 2001 From: Egor Date: Mon, 19 Feb 2018 21:34:46 -0800 Subject: Added a couple of debug checks --- Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 51dd552f..12f40f1a 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -108,6 +108,7 @@ void RenderDeviceGLImpl :: CreateBuffer(const BufferDesc& BuffDesc, const Buffer void RenderDeviceGLImpl :: CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc &BuffDesc, IBuffer **ppBuffer) { + VERIFY(GLHandle, "GL buffer handle must not be null"); CreateDeviceObject( "buffer", BuffDesc, ppBuffer, [&]() { @@ -208,7 +209,8 @@ void RenderDeviceGLImpl::CreateTexture(const TextureDesc& TexDesc, const Texture void RenderDeviceGLImpl::CreateTextureFromGLHandle(Uint32 GLHandle, const TextureDesc &TexDesc, ITexture **ppTexture) { - CreateDeviceObject( "texture", TexDesc, ppTexture, + VERIFY(GLHandle, "GL texture handle must not be null"); + CreateDeviceObject( "texture", TexDesc, ppTexture, [&]() { auto spDeviceContext = GetImmediateContext(); -- cgit v1.2.3