26 #include "BaseInterfacesGL.h" 27 #include "TextureGL.h" 28 #include "TextureBase.h" 29 #include "RenderDevice.h" 30 #include "GLObjectWrapper.h" 31 #include "TextureViewGLImpl.h" 32 #include "AsyncWritableResource.h" 38 class FixedBlockMemoryAllocator;
41 class TextureBaseGL :
public TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator>,
public AsyncWritableResource
52 bool bIsDeviceInternal =
false);
59 GLuint GLTextureHandle,
61 bool bIsDeviceInternal);
65 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
override;
67 virtual void UpdateData(
class GLContextState &CtxState,
IDeviceContext *pContext, Uint32 MipLevel, Uint32 Slice,
const Box &DstBox,
const TextureSubResData &SubresData );
70 virtual void Map(
IDeviceContext *pContext, Uint32 Subresource,
MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData )
override;
73 const GLObjectWrappers::GLTextureObj& GetGLHandle()
const{
return m_GlTexture; }
74 virtual GLenum
GetBindTarget()const override final{
return m_BindTarget;}
75 GLenum GetGLTexFormat()
const{
return m_GLTexFormat; }
77 void TextureMemoryBarrier( Uint32 RequiredBarriers,
class GLContextState &GLContextState);
79 virtual void AttachToFramebuffer(
const struct TextureViewDesc& ViewDesc, GLenum AttachmentPoint) = 0;
81 virtual void CopyData(IDeviceContext *pContext,
82 ITexture *pSrcTexture,
97 void SetDefaultGLParameters();
99 GLObjectWrappers::GLTextureObj m_GlTexture;
100 const GLenum m_BindTarget;
101 const GLenum m_GLTexFormat;
Base implementation of the Diligent::ITextureGL interface.
Definition: TextureBaseGL.h:41
Texture description.
Definition: Texture.h:82
virtual void CopyData(IDeviceContext *pContext, ITexture *pSrcTexture, Uint32 SrcMipLevel, Uint32 SrcSlice, const Box *pSrcBox, Uint32 DstMipLevel, Uint32 DstSlice, Uint32 DstX, Uint32 DstY, Uint32 DstZ) override
Base implementaiton of ITexture::CopyData(); validates input parameters.
Definition: TextureBaseGL.cpp:312
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
virtual GLuint GetGLTextureHandle() override final
Returns OpenGL texture handle.
Definition: TextureBaseGL.h:92
Implementation of the Diligent::IDeviceContextGL interface.
Definition: DeviceContextGLImpl.h:35
virtual void Unmap(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags) override
Base implementaiton of ITexture::Unmap()
Definition: TextureBaseGL.cpp:446
Describes data for one subresource.
Definition: Texture.h:193
Implementation of the render device interface in OpenGL.
Definition: RenderDeviceGLImpl.h:53
virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface) override
Queries the specific interface, see IObject::QueryInterface() for details.
Describes the initial data to store in the texture.
Definition: Texture.h:243
Device context interface.
Definition: DeviceContext.h:443
Box.
Definition: GraphicsTypes.h:1005
Texture view interface.
Definition: TextureView.h:163
virtual void Map(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData) override
Base implementaiton of ITexture::Map()
Definition: TextureBaseGL.cpp:440
virtual GLenum GetBindTarget() const override final
Returns bind target of the native OpenGL texture.
Definition: TextureBaseGL.h:74
Memory allocator that allocates memory in a fixed-size chunks.
Definition: FixedBlockMemoryAllocator.h:50
Texture view description.
Definition: TextureView.h:55
virtual void * GetNativeHandle() override final
Returns native texture handle specific to the underlying graphics API.
Definition: TextureBaseGL.h:93
virtual void CreateViewInternal(const struct TextureViewDesc &ViewDesc, class ITextureView **ppView, bool bIsDefaultView) override
Pure virtual function that creates texture view for the specific engine implementation.
Definition: TextureBaseGL.cpp:159
Base implementation of the ITexture interface.
Definition: TextureBase.h:52
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:125