summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor <egor.yusov@gmail.com>2018-02-20 05:34:46 +0000
committerEgor <egor.yusov@gmail.com>2018-02-20 05:34:46 +0000
commit96ce2c96df072507ce8c69c38902183a753f8190 (patch)
tree5f06713fc46e035832cd7180d3c1affb6dd4a231 /Graphics/GraphicsEngineOpenGL
parentFixed error when setting independent blend states on GLES devices that only s... (diff)
downloadDiligentCore-96ce2c96df072507ce8c69c38902183a753f8190.tar.gz
DiligentCore-96ce2c96df072507ce8c69c38902183a753f8190.zip
Added a couple of debug checks
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp4
1 files changed, 3 insertions, 1 deletions
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();