Skip to content

Commit d2f045d

Browse files
Updated documentation for OpenGL backend interfaces
1 parent d639edb commit d2f045d

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,42 @@ static DILIGENT_CONSTEXPR INTERFACE_ID IID_EngineFactoryOpenGL =
6767

6868
// clang-format off
6969

70+
/// Engine factory for OpenGL rendering backend.
7071
DILIGENT_BEGIN_INTERFACE(IEngineFactoryOpenGL, IEngineFactory)
7172
{
73+
/// Creates a render device and swap chain for OpenGL-based engine implementation.
74+
75+
/// \param [in] EngineCI - Engine creation info, see EngineGLCreateInfo.
76+
/// \param [out] ppDevice - Address of the memory location where pointer to
77+
/// the created device will be written.
78+
/// \param [out] ppImmediateContext - Address of the memory location where pointer to
79+
/// the immediate device context will be written.
80+
/// \param [in] SCDesc - Swap chain description.
81+
/// \param [out] ppSwapChain - Address of the memory location where pointer to
82+
/// the created swap chain will be written.
7283
VIRTUAL void METHOD(CreateDeviceAndSwapChainGL)(THIS_
7384
const EngineGLCreateInfo REF EngineCI,
7485
IRenderDevice** ppDevice,
7586
IDeviceContext** ppImmediateContext,
7687
const SwapChainDesc REF SCDesc,
7788
ISwapChain** ppSwapChain) PURE;
7889

90+
/// Creates a HLSL2GLSL converter.
91+
92+
/// \param [out] ppConverter - Address of the memory location where pointer to
93+
/// the created HLSL2GLSL converter will be written.
7994
VIRTUAL void METHOD(CreateHLSL2GLSLConverter)(THIS_
8095
IHLSL2GLSLConverter** ppConverter) PURE;
8196

97+
/// Attaches to the active GL context in the thread.
98+
99+
/// \param [in] EngineCI - Engine creation info, see EngineGLCreateInfo.
100+
/// \param [out] ppDevice - Address of the memory location where pointer to
101+
/// the created device will be written.
102+
/// \param [out] ppImmediateContext - Address of the memory location where pointer to
103+
/// the immediate device context will be written.
104+
///
105+
/// \note The application is responsible for presenting the main frame buffer.
82106
VIRTUAL void METHOD(AttachToActiveGLContext)(THIS_
83107
const EngineGLCreateInfo REF EngineCI,
84108
IRenderDevice** ppDevice,

Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -55,11 +55,11 @@ DILIGENT_BEGIN_INTERFACE(IPipelineStateGL, IPipelineState)
5555
/// \param [in] Stage - Shader stage.
5656
/// \return OpenGL program handle for the specified shader stage.
5757
///
58-
/// \remarks If device supports separable programs, the function
59-
/// returns the handle of the program for the specified
60-
/// shader stage. Otherwise, the function returns the handle
61-
/// of the program that contains all shaders, if Stage is
62-
/// one of the active shader stages, or zero otherwise.
58+
/// If device supports separable programs, the function
59+
/// returns the handle of the program for the specified
60+
/// shader stage. Otherwise, the function returns the handle
61+
/// of the program that contains all shaders, if Stage is
62+
/// one of the active shader stages, or zero otherwise.
6363
VIRTUAL GLuint METHOD(GetGLProgramHandle)(THIS_
6464
SHADER_TYPE Stage) CONST PURE;
6565

Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice)
8888
/// \param [in] GLHandle - OpenGL texture handle.
8989
/// \param [in] GLBindTarget - OpenGL bind target. If this parameter is null, the engine will
9090
/// automatically select the target based on texture
91-
/// type (e.g. RESOURCE_DIM_TEX_2D will map to GL_TEXTURE_2D).
91+
/// type (e.g. Diligent::RESOURCE_DIM_TEX_2D will map to `GL_TEXTURE_2D`).
9292
/// An application should typically use this parameter when the texture
93-
/// has non-standard bind target such as, GL_TEXTURE_EXTERNAL_OES.
93+
/// has non-standard bind target such as, `GL_TEXTURE_EXTERNAL_OES`.
9494
/// \param [in] TexDesc - Texture description. The engine can automatically
9595
/// set texture width, height, depth, mip levels count, and format.
9696
/// Remaining fields should be set up by the app.
@@ -99,6 +99,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice)
9999
/// texture interface will be stored.
100100
/// The function calls AddRef(), so that the new object will contain
101101
/// one reference.
102+
///
102103
/// \note Diligent engine texture object does not take ownership of the GL resource,
103104
/// and the application must not destroy it while it is in use by the engine.
104105
VIRTUAL void METHOD(CreateTextureFromGLHandle)(THIS_
@@ -119,6 +120,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice)
119120
/// texture interface will be stored.
120121
/// The function calls AddRef(), so that the new object will contain
121122
/// one reference.
123+
///
122124
/// \note Diligent engine buffer object does not take ownership of the GL resource,
123125
/// and the application must not destroy it while it is in use by the engine.
124126
VIRTUAL void METHOD(CreateBufferFromGLHandle)(THIS_
@@ -140,6 +142,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice)
140142
/// texture interface will be stored.
141143
/// The function calls AddRef(), so that the new object will contain
142144
/// one reference.
145+
///
143146
/// \note Only RESOURCE_DIM_TEX_2D dummy textures are supported.
144147
VIRTUAL void METHOD(CreateDummyTexture)(THIS_
145148
const TextureDesc REF TexDesc,

0 commit comments

Comments
 (0)