27 #include "BufferBase.h" 28 #include "GLObjectWrapper.h" 29 #include "AsyncWritableResource.h" 30 #include "BaseInterfacesGL.h" 31 #include "BufferViewGLImpl.h" 37 class FixedBlockMemoryAllocator;
40 class BufferGLImpl :
public BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator>,
public AsyncWritableResource
50 bool bIsDeviceInternal);
56 bool bIsDeviceInternal);
60 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
override;
67 void BufferMemoryBarrier( Uint32 RequiredBarriers,
class GLContextState &GLContextState );
69 const GLObjectWrappers::GLBufferObj& GetGLHandle(){
return m_GlBuffer; }
75 virtual void CreateViewInternal(
const struct BufferViewDesc &ViewDesc,
class IBufferView **ppView,
bool bIsDefaultView )
override;
78 friend class VAOCache;
80 GLObjectWrappers::GLBufferObj m_GlBuffer;
82 const GLenum m_GLUsageHint;
83 const Bool m_bUseMapWriteDiscardBugWA;
virtual void * GetNativeHandle() override final
Returns native buffer handle specific to the underlying graphics API.
Definition: BufferGLImpl.h:72
virtual void Unmap(IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags) override
Base implementation of IBuffer::Unmap()
Definition: BufferGLImpl.cpp:314
Buffer view description.
Definition: BufferView.h:39
Describes the buffer initial data.
Definition: Buffer.h:176
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Implementation of the Diligent::IDeviceContextGL interface.
Definition: DeviceContextGLImpl.h:35
Template class implementing base functionality for a buffer object.
Definition: BufferBase.h:46
virtual GLuint GetGLBufferHandle() override final
Returns OpenGL buffer handle.
Definition: BufferGLImpl.h:71
Implementation of the render device interface in OpenGL.
Definition: RenderDeviceGLImpl.h:53
Buffer interface.
Definition: Buffer.h:200
Device context interface.
Definition: DeviceContext.h:443
virtual void Map(IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData) override
Base implementation of IBuffer::Map(); validates input parameters.
Definition: BufferGLImpl.cpp:230
Buffer description.
Definition: Buffer.h:57
Memory allocator that allocates memory in a fixed-size chunks.
Definition: FixedBlockMemoryAllocator.h:50
Implementation of the Diligent::IBufferGL interface.
Definition: BufferGLImpl.h:40
virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface) override
Queries the specific interface, see IObject::QueryInterface() for details.
Buffer view interface.
Definition: BufferView.h:91
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:125
virtual void CopyData(IDeviceContext *pContext, IBuffer *pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size) override
Base implementation of IBuffer::CopyData(); validates input parameters.
Definition: BufferGLImpl.cpp:200
virtual void UpdateData(IDeviceContext *pContext, Uint32 Offset, Uint32 Size, const PVoid pData) override
Base implementation of IBuffer::UpdateData(); validates input parameters.
Definition: BufferGLImpl.cpp:177