Go to the documentation of this file.
38 template <
class BaseInterface>
65 " is not an allowed pretransform because OpenGL swap chains only support identity transform. "
66 "Use SURFACE_TRANSFORM_OPTIMAL (recommended) or SURFACE_TRANSFORM_IDENTITY.");
76 auto* pImmediateCtxGL = pDeviceContext.template RawPtr<DeviceContextGLImpl>();
79 auto RenderTargetsReset = pImmediateCtxGL->UnbindTextureFromFramebuffer(pCurrentBackBuffer,
false);
80 if (RenderTargetsReset)
82 LOG_INFO_MESSAGE_ONCE(
"Resizing the swap chain requires back and depth-stencil buffers to be unbound from the device context. "
83 "An application should use SetRenderTargets() to restore them.");
99 ColorBuffDesc.
Name =
"Main color buffer stub";
109 DepthBuffDesc.
Name =
"Main depth buffer stub";
const char * GetSurfaceTransformString(SURFACE_TRANSFORM SrfTransform)
Definition: GraphicsAccessories.cpp:1119
@ TEXTURE_VIEW_RENDER_TARGET
A texture view will define a render target view that will be used as the target for rendering operati...
Definition: GraphicsTypes.h:285
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
TEXTURE_FORMAT Format
Texture format, see Diligent::TEXTURE_FORMAT.
Definition: Texture.h:68
SwapChainGLBase(IReferenceCounters *pRefCounters, IRenderDevice *pDevice, IDeviceContext *pDeviceContext, const SwapChainDesc &SCDesc)
Definition: SwapChainGLBase.hpp:44
bool Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform, Int32)
Definition: SwapChainGLBase.hpp:59
Uint32 Width
The swap chain width. Default value is 0.
Definition: GraphicsTypes.h:1350
Base implementation of a swap chain for OpenGL.
Definition: SwapChainGLBase.hpp:39
TEXTURE_FORMAT ColorBufferFormat
Back buffer format. Default value is Diligent::TEX_FORMAT_RGBA8_UNORM_SRGB.
Definition: GraphicsTypes.h:1356
virtual ITextureView * GetDepthBufferDSV() override final
Implementation of ISwapChain::GetDepthBufferDSV() in OpenGL backend.
Definition: SwapChainGLBase.hpp:56
Texture view interface.
Definition: TextureView.h:202
TEXTURE_FORMAT DepthBufferFormat
Depth buffer format. Default value is Diligent::TEX_FORMAT_D32_FLOAT. Use Diligent::TEX_FORMAT_UNKNOW...
Definition: GraphicsTypes.h:1360
@ SURFACE_TRANSFORM_IDENTITY
The image content is presented without being transformed.
Definition: GraphicsTypes.h:1321
RefCntWeakPtr< IDeviceContext > m_wpDeviceContext
Weak references to the immediate device context. The context holds the strong reference to the swap c...
Definition: SwapChainBase.hpp:119
int32_t Int32
32-bit signed integer
Definition: BasicTypes.h:46
@ SURFACE_TRANSFORM_OPTIMAL
Uset the most optimal surface transform.
Definition: GraphicsTypes.h:1318
Render device interface.
Definition: RenderDevice.h:75
virtual void CreateDummyTexture(const TextureDesc &TexDesc, RESOURCE_STATE InitialState, ITexture **ppTexture) override final
Implementation of IRenderDeviceGL::CreateDummyTexture().
Definition: RenderDeviceGLImpl.cpp:691
SURFACE_TRANSFORM
The transform applied to the image content prior to presentation.
Definition: GraphicsTypes.h:1315
Texture description.
Definition: Texture.h:47
Uint32 Width
Texture width, in pixels.
Definition: Texture.h:53
Template class that implements reference counting.
Definition: RefCntAutoPtr.hpp:73
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
virtual ITextureView * GetCurrentBackBufferRTV() override final
Implementation of ISwapChain::GetCurrentBackBufferRTV() in OpenGL backend.
Definition: SwapChainGLBase.hpp:53
@ RESOURCE_STATE_RENDER_TARGET
The resource is accessed as a render target.
Definition: GraphicsTypes.h:2832
Base implementation of the swap chain.
Definition: SwapChainBase.hpp:51
Swap chain description.
Definition: GraphicsTypes.h:1347
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
bool Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform, Int32 Dummy=0)
Definition: SwapChainBase.hpp:97
void CreateDummyBuffers(RenderDeviceGLImpl *pRenderDeviceGL)
Definition: SwapChainGLBase.hpp:95
Render device implementation in OpenGL backend.
Definition: RenderDeviceGLImpl.hpp:45
RefCntAutoPtr< IRenderDevice > m_pRenderDevice
Strong reference to the render device.
Definition: SwapChainBase.hpp:115
@ RESOURCE_DIM_TEX_2D
Two-dimensional texture.
Definition: GraphicsTypes.h:262
SwapChainDesc m_SwapChainDesc
Swap chain description.
Definition: SwapChainBase.hpp:122
RefCntAutoPtr< TextureViewGLImpl > m_pDepthStencilView
Definition: SwapChainGLBase.hpp:118
BIND_FLAGS BindFlags
Bind flags, see Diligent::BIND_FLAGS for details. The following bind flags are allowed: Diligent::BI...
Definition: Texture.h:86
#define LOG_WARNING_MESSAGE(...)
Definition: Errors.hpp:123
@ BIND_DEPTH_STENCIL
A texture can be bound as a depth-stencil target.
Definition: GraphicsTypes.h:126
Device context interface.
Definition: DeviceContext.h:1460
@ TEXTURE_VIEW_DEPTH_STENCIL
A texture view will define a depth stencil view that will be used as the target for rendering operati...
Definition: GraphicsTypes.h:289
#define LOG_INFO_MESSAGE_ONCE(...)
Definition: Errors.hpp:141
@ BIND_RENDER_TARGET
A texture can be bound as a render target.
Definition: GraphicsTypes.h:125
Uint32 Height
The swap chain height. Default value is 0.
Definition: GraphicsTypes.h:1353
RESOURCE_DIMENSION Type
Texture type. See Diligent::RESOURCE_DIMENSION for details.
Definition: Texture.h:50
RefCntAutoPtr< TextureViewGLImpl > m_pRenderTargetView
Definition: SwapChainGLBase.hpp:117
@ RESOURCE_STATE_DEPTH_WRITE
The resource is used in a writable depth-stencil view or in clear operation.
Definition: GraphicsTypes.h:2838
Uint32 Height
Texture height, in pixels.
Definition: Texture.h:56
const Char * Name
Object name.
Definition: GraphicsTypes.h:1199
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37