From 2c877d95ab04b3aa4a0946ee4d5c3f755a76229a Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 8 May 2020 22:51:38 -0700 Subject: Added option to specify bind target when creating texture from GL handle (API version 240058). Fixed https://github.com/DiligentGraphics/DiligentCore/issues/136 --- .../include/RenderDeviceGLImpl.hpp | 1 + .../include/Texture1DArray_OGL.hpp | 1 + .../GraphicsEngineOpenGL/include/Texture1D_OGL.hpp | 1 + .../include/Texture2DArray_OGL.hpp | 1 + .../GraphicsEngineOpenGL/include/Texture2D_OGL.hpp | 1 + .../GraphicsEngineOpenGL/include/Texture3D_OGL.hpp | 1 + .../include/TextureCubeArray_OGL.hpp | 1 + .../GraphicsEngineOpenGL/include/TextureCube_OGL.hpp | 1 + .../GraphicsEngineOpenGL/interface/RenderDeviceGL.h | 8 +++++++- Graphics/GraphicsEngineOpenGL/readme.md | 14 ++++++++------ .../GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 20 ++++++++++++-------- .../GraphicsEngineOpenGL/src/Texture1DArray_OGL.cpp | 3 ++- Graphics/GraphicsEngineOpenGL/src/Texture1D_OGL.cpp | 3 ++- .../GraphicsEngineOpenGL/src/Texture2DArray_OGL.cpp | 5 ++++- Graphics/GraphicsEngineOpenGL/src/Texture2D_OGL.cpp | 5 ++++- Graphics/GraphicsEngineOpenGL/src/Texture3D_OGL.cpp | 3 ++- .../src/TextureCubeArray_OGL.cpp | 3 ++- .../GraphicsEngineOpenGL/src/TextureCube_OGL.cpp | 3 ++- 18 files changed, 53 insertions(+), 22 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp index 3887be7f..310faaf6 100644 --- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp @@ -115,6 +115,7 @@ public: /// Implementation of IRenderDeviceGL::CreateTextureFromGLHandle(). virtual void DILIGENT_CALL_TYPE CreateTextureFromGLHandle(Uint32 GLHandle, + Uint32 GLBindTarget, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) override final; diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.hpp index 3bc0c2fe..ba768adc 100644 --- a/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/Texture1DArray_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~Texture1DArray_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.hpp index 9f98e248..fd562a1a 100644 --- a/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/Texture1D_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~Texture1D_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.hpp index 605a2453..00350a1c 100644 --- a/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/Texture2DArray_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~Texture2DArray_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.hpp index 24ee46b0..f92c7910 100644 --- a/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/Texture2D_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); /// This constructor is used to create a dummy texture object for the default framebuffer. diff --git a/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.hpp index 6902a907..79c4e8fd 100644 --- a/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/Texture3D_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~Texture3D_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.hpp index be583c0c..e202e66f 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/TextureCubeArray_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~TextureCubeArray_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.hpp b/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.hpp index f91196d2..f9c74b3f 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/TextureCube_OGL.hpp @@ -50,6 +50,7 @@ public: class GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal = false); ~TextureCube_OGL(); diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h index 287b1cc6..ebaa7335 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h @@ -53,7 +53,12 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice) { /// Creates a texture from OpenGL handle - /// \param [in] GLHandle - OpenGL texture handle + /// \param [in] GLHandle - OpenGL texture handle. + /// \param [in] GLBindTarget - OpenGL bind target. If this parameter is null, the engine will + /// automatically select the target based on texture + /// type (e.g. RESOURCE_DIM_TEX_2D will map to GL_TEXTURE_2D). + /// An application should typically use this paramter when the texture + /// has non-standard bind target such as, GL_TEXTURE_EXTERNAL_OES. /// \param [in] TexDesc - Texture description. The engine can automatically /// set texture width, height, depth, mip levels count, and format. /// Remaining fields should be set up by the app. @@ -66,6 +71,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice) /// and the application must not destroy it while it is in use by the engine. VIRTUAL void METHOD(CreateTextureFromGLHandle)(THIS_ Uint32 GLHandle, + Uint32 GLBindTarget, const TextureDesc REF TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) PURE; diff --git a/Graphics/GraphicsEngineOpenGL/readme.md b/Graphics/GraphicsEngineOpenGL/readme.md index b59cde75..2af25099 100644 --- a/Graphics/GraphicsEngineOpenGL/readme.md +++ b/Graphics/GraphicsEngineOpenGL/readme.md @@ -50,15 +50,17 @@ Below are some of the methods that provide access to internal D3D11 objects: ## Creating Diligent Engine Objects from OpenGL Handles -* `void IRenderDeviceGL::CreateTextureFromGLHandle(Uint32 GLHandle, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture)` - - creates a diligent engine texture from OpenGL handle. The method takes OpenGL handle GLHandle, texture description TexDesc, - and writes the pointer to the created texture object at the memory address pointed to by ppTexture. The engine can automatically - set texture width, height, depth, mip levels count, and format, but the remaining field of TexDesc structure must be populated by +* `void IRenderDeviceGL::CreateTextureFromGLHandle(Uint32 GLHandle, Uint32 GLBindTarget, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture)` - + creates a diligent engine texture from OpenGL handle. The method takes OpenGL handle `GLHandle`, texture bind target `GLBindTarget` + (when null value is provided, the engine automatically selects the target that corresponds to the texture type, e.g. GL_TEXTURE_2D + for a 2D texture), texture description `TexDesc`, as well as initial state `InitialState`, + and writes the pointer to the created texture object at the memory address pointed to by `ppTexture`. The engine can automatically + set texture width, height, depth, mip levels count, and format, but the remaining field of `TexDesc` structure must be populated by the application. Note that diligent engine texture object does not take ownership of the GL resource, and the application must not destroy it while it is in use by the engine. * `void IRenderDeviceGL::CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer)` - - creates a diligent engine buffer from OpenGL handle. The method takes OpenGL handle GLHandle, buffer description BuffDesc, - and writes the pointer to the created buffer object at the memory address pointed to by ppBuffer. The engine can automatically + creates a diligent engine buffer from OpenGL handle. The method takes OpenGL handle `GLHandle`, buffer description `BuffDesc`, + and writes the pointer to the created buffer object at the memory address pointed to by `ppBuffer`. The engine can automatically set the buffer size, but the rest of the fields need to be set by the client. Note that diligent engine buffer object does not take ownership of the GL resource, and the application must not destroy it while it is in use by the engine. diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index dee2cd15..53828b29 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -368,7 +368,11 @@ void RenderDeviceGLImpl::CreateTexture(const TextureDesc& TexDesc, const Texture CreateTexture(TexDesc, Data, ppTexture, false); } -void RenderDeviceGLImpl::CreateTextureFromGLHandle(Uint32 GLHandle, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) +void RenderDeviceGLImpl::CreateTextureFromGLHandle(Uint32 GLHandle, + Uint32 GLBindTarget, + const TextureDesc& TexDesc, + RESOURCE_STATE InitialState, + ITexture** ppTexture) { VERIFY(GLHandle, "GL texture handle must not be null"); CreateDeviceObject( @@ -383,31 +387,31 @@ void RenderDeviceGLImpl::CreateTextureFromGLHandle(Uint32 GLHandle, const Textur switch (TexDesc.Type) { case RESOURCE_DIM_TEX_1D: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture1D_OGL instance", Texture1D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture1D_OGL instance", Texture1D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_1D_ARRAY: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture1DArray_OGL instance", Texture1DArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture1DArray_OGL instance", Texture1DArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_2D: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture2D_OGL instance", Texture2D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture2D_OGL instance", Texture2D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_2D_ARRAY: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture2DArray_OGL instance", Texture2DArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture2DArray_OGL instance", Texture2DArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_3D: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture3D_OGL instance", Texture3D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "Texture3D_OGL instance", Texture3D_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_CUBE: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "TextureCube_OGL instance", TextureCube_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "TextureCube_OGL instance", TextureCube_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; case RESOURCE_DIM_TEX_CUBE_ARRAY: - pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "TextureCubeArray_OGL instance", TextureCubeArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle); + pTextureOGL = NEW_RC_OBJ(m_TexObjAllocator, "TextureCubeArray_OGL instance", TextureCubeArray_OGL)(m_TexViewObjAllocator, this, GLState, TexDesc, GLHandle, GLBindTarget); break; default: LOG_ERROR_AND_THROW("Unknown texture type. (Did you forget to initialize the Type member of TextureDesc structure?)"); diff --git a/Graphics/GraphicsEngineOpenGL/src/Texture1DArray_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/Texture1DArray_OGL.cpp index 2dd93b6c..bb54fac9 100644 --- a/Graphics/GraphicsEngineOpenGL/src/Texture1DArray_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/Texture1DArray_OGL.cpp @@ -109,6 +109,7 @@ Texture1DArray_OGL::Texture1DArray_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -119,7 +120,7 @@ Texture1DArray_OGL::Texture1DArray_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - GL_TEXTURE_1D_ARRAY, + static_cast(GLBindTarget != 0 ? GLBindTarget : GL_TEXTURE_1D_ARRAY), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/Texture1D_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/Texture1D_OGL.cpp index 8f385238..a53de9e0 100644 --- a/Graphics/GraphicsEngineOpenGL/src/Texture1D_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/Texture1D_OGL.cpp @@ -106,6 +106,7 @@ Texture1D_OGL::Texture1D_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -116,7 +117,7 @@ Texture1D_OGL::Texture1D_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - GL_TEXTURE_1D, + static_cast(GLBindTarget != 0 ? GLBindTarget : GL_TEXTURE_1D), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/Texture2DArray_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/Texture2DArray_OGL.cpp index ee8b1182..e7cc33a9 100644 --- a/Graphics/GraphicsEngineOpenGL/src/Texture2DArray_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/Texture2DArray_OGL.cpp @@ -130,6 +130,7 @@ Texture2DArray_OGL::Texture2DArray_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -140,7 +141,9 @@ Texture2DArray_OGL::Texture2DArray_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - static_cast(TexDesc.SampleCount > 1 ? GL_TEXTURE_2D_MULTISAMPLE_ARRAY : GL_TEXTURE_2D_ARRAY), + GLBindTarget != 0 ? + static_cast(GLBindTarget) : + static_cast(TexDesc.SampleCount > 1 ? GL_TEXTURE_2D_MULTISAMPLE_ARRAY : GL_TEXTURE_2D_ARRAY), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/Texture2D_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/Texture2D_OGL.cpp index fd2f4dc2..47aff697 100644 --- a/Graphics/GraphicsEngineOpenGL/src/Texture2D_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/Texture2D_OGL.cpp @@ -133,6 +133,7 @@ Texture2D_OGL::Texture2D_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -143,7 +144,9 @@ Texture2D_OGL::Texture2D_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - static_cast(TexDesc.SampleCount > 1 ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D), + GLBindTarget != 0 ? + static_cast(GLBindTarget) : + static_cast(TexDesc.SampleCount > 1 ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/Texture3D_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/Texture3D_OGL.cpp index 7b4d19a0..b1202d12 100644 --- a/Graphics/GraphicsEngineOpenGL/src/Texture3D_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/Texture3D_OGL.cpp @@ -110,6 +110,7 @@ Texture3D_OGL::Texture3D_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -120,7 +121,7 @@ Texture3D_OGL::Texture3D_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - GL_TEXTURE_3D, + static_cast(GLBindTarget != 0 ? GLBindTarget : GL_TEXTURE_3D), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp index 8acdd5f5..ef1d772d 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureCubeArray_OGL.cpp @@ -118,6 +118,7 @@ TextureCubeArray_OGL::TextureCubeArray_OGL(IReferenceCounters* pRefCounte GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -128,7 +129,7 @@ TextureCubeArray_OGL::TextureCubeArray_OGL(IReferenceCounters* pRefCounte GLState, TexDesc, GLTextureHandle, - GL_TEXTURE_CUBE_MAP_ARRAY, + static_cast(GLBindTarget != 0 ? GLBindTarget : GL_TEXTURE_CUBE_MAP_ARRAY), bIsDeviceInternal } // clang-format on diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureCube_OGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureCube_OGL.cpp index 165961fa..6a4192ac 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureCube_OGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureCube_OGL.cpp @@ -117,6 +117,7 @@ TextureCube_OGL::TextureCube_OGL(IReferenceCounters* pRefCounters, GLContextState& GLState, const TextureDesc& TexDesc, GLuint GLTextureHandle, + GLuint GLBindTarget, bool bIsDeviceInternal) : // clang-format off TextureBaseGL @@ -127,7 +128,7 @@ TextureCube_OGL::TextureCube_OGL(IReferenceCounters* pRefCounters, GLState, TexDesc, GLTextureHandle, - GL_TEXTURE_CUBE_MAP, + static_cast(GLBindTarget != 0 ? GLBindTarget : GL_TEXTURE_CUBE_MAP), bIsDeviceInternal } // clang-format on -- cgit v1.2.3