|
bool | isHeadless () const |
|
const bgfx::Caps & | capabilites () const |
| Return the capabilities of the backend renderer.
|
|
bool | supportsReadback () const |
|
bool | isDefaultWindow (void *windowHandle) const |
| Checks whether the context is initialized with the provided window handle.
|
|
bool | isValidViewId (bgfx::ViewId viewId) const |
|
bgfx::ViewId | requestViewId () |
|
void | releaseViewId (bgfx::ViewId viewId) |
|
bgfx::FrameBufferHandle | createOffscreenFramebuffer (uint16_t width, uint16_t height, bgfx::TextureFormat::Enum colorFormat=DEFAULT_COLOR_FORMAT, bgfx::TextureFormat::Enum depthFormat=DEFAULT_DEPTH_FORMAT) |
| Create a framebuffer with with 2 attachments (color and depth)
|
|
void | resetDefaultFramebuffer (uint16_t width, uint16_t height, bgfx::TextureFormat::Enum colorFormat=DEFAULT_COLOR_FORMAT) |
|
bgfx::FrameBufferHandle | createFramebufferAndInitView (void *winId, bgfx::ViewId view, uint16_t width, uint16_t height, bool clear=false, uint32_t clearColor=DEFAULT_CLEAR_COLOR, float clearDepth=DEFAULT_CLEAR_DEPTH, uint8_t clearStencil=DEFAULT_CLEAR_STENCIL, bgfx::TextureFormat::Enum colorFormat=DEFAULT_COLOR_FORMAT, bgfx::TextureFormat::Enum depthFormat=DEFAULT_DEPTH_FORMAT) |
|
bgfx::FrameBufferHandle | createOffscreenFramebufferAndInitView (bgfx::ViewId view, uint16_t width, uint16_t height, bool clear=false, uint32_t clearColor=DEFAULT_CLEAR_COLOR, float clearDepth=DEFAULT_CLEAR_DEPTH, uint8_t clearStencil=DEFAULT_CLEAR_STENCIL, bgfx::TextureFormat::Enum colorFormat=DEFAULT_COLOR_FORMAT, bgfx::TextureFormat::Enum depthFormat=DEFAULT_DEPTH_FORMAT) |
|
FontManager & | fontManager () |
|
ProgramManager & | programManager () |
|
| Context (const Context &)=delete |
|
Context & | operator= (const Context &)=delete |
|
| Context (Context &&)=delete |
|
Context & | operator= (Context &&)=delete |
|
◆ createOffscreenFramebuffer()
bgfx::FrameBufferHandle vcl::Context::createOffscreenFramebuffer |
( |
uint16_t |
width, |
|
|
uint16_t |
height, |
|
|
bgfx::TextureFormat::Enum |
colorFormat = DEFAULT_COLOR_FORMAT , |
|
|
bgfx::TextureFormat::Enum |
depthFormat = DEFAULT_DEPTH_FORMAT |
|
) |
| |
Create a framebuffer with with 2 attachments (color and depth)
- Parameters
-
[in] | width | The width of the framebuffer. |
[in] | height | The height of the framebuffer. |
[in] | colorFormat | The format of the color attachment. |
[in] | depthFormat | The format of the depth attachment. |
- Returns
- The handle of the created framebuffer.
◆ instance()
Return the context instance.
- Parameters
-
[in] | windowHandle | The window handle. |
[in] | displayHandle | The display handle. |
- Returns
- The context instance.
◆ isDefaultWindow()
bool vcl::Context::isDefaultWindow |
( |
void * |
windowHandle | ) |
const |
Checks whether the context is initialized with the provided window handle.
- Parameters
-
[in] | windowHandle | The window handle to check. |
◆ renderType()
bgfx::RendererType::Enum vcl::Context::renderType |
( |
| ) |
|
|
static |
Return the backend renderer type used by bgfx.
This function can be called before the context is initialized or after. If called before, it returns the default renderer type (or the one set by calling setRenderType). If called after, it returns the renderer type used by bgfx.
◆ setRenderType()
void vcl::Context::setRenderType |
( |
bgfx::RendererType::Enum |
renderType | ) |
|
|
static |
Set the backend renderer type used by bgfx.
This function can be called before the context is initialized, to set the type of renderer used by bgfx.
Depending on the platform, some renderer types could not be available. In such cases, the renderer type is set to the default one.
- Warning
- This function must be called before the context is initialized. Otherwise, it throws an exception.
- Parameters
-
[in] | renderType | the renderer type to set. |
◆ setResetFlags()
void vcl::Context::setResetFlags |
( |
uint |
flags | ) |
|
|
static |
◆ DEFAULT_COLOR_FORMAT
constexpr bgfx::TextureFormat::Enum vcl::Context::DEFAULT_COLOR_FORMAT |
|
staticconstexpr |
Initial value:=
bgfx::TextureFormat::RGBA8
◆ DEFAULT_DEPTH_FORMAT
constexpr bgfx::TextureFormat::Enum vcl::Context::DEFAULT_DEPTH_FORMAT |
|
staticconstexpr |
Initial value:=
bgfx::TextureFormat::D24S8
◆ sRenderType
bgfx::RendererType::Enum vcl::Context::sRenderType |
|
inlinestaticprivate |
Initial value:=
bgfx::RendererType::Count
The documentation for this class was generated from the following files:
- vclib/render/include/vclib/bgfx/context.h
- vclib/render/src/vclib/bgfx/context.cpp