MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::gl::RendererBackend Class Referenceabstract

#include <renderer_backend.hpp>

Inheritance diagram for mbgl::gl::RendererBackend:
mbgl::gfx::RendererBackend

Public Member Functions

 RendererBackend (gfx::ContextMode)
 
 ~RendererBackend () override
 
virtual void updateAssumedState ()=0
 Called prior to rendering to update the internally assumed OpenGL state. More...
 
void setFramebufferBinding (FramebufferID fbo)
 
void setViewport (int32_t x, int32_t y, const Size &)
 
void setScissorTest (bool)
 
- Public Member Functions inherited from mbgl::gfx::RendererBackend
 RendererBackend (const RendererBackend &)=delete
 
RendererBackendoperator= (const RendererBackend &)=delete
 
Context & getContext ()
 Returns the device's context. More...
 
template<typename T >
T & getContext ()
 
bool contextIsShared () const
 
virtual RenderablegetDefaultRenderable ()=0
 Returns a reference to the default surface that should be rendered on. More...
 

Protected Member Functions

std::unique_ptr< gfx::Context > createContext () override
 
virtual ProcAddress getExtensionFunctionPointer (const char *)=0
 
PremultipliedImage readFramebuffer (const Size &)
 Reads the color pixel data from the currently bound framebuffer. More...
 
void assumeFramebufferBinding (FramebufferID fbo)
 
void assumeViewport (int32_t x, int32_t y, const Size &)
 
void assumeScissorTest (bool)
 
bool implicitFramebufferBound ()
 Returns true when assumed framebuffer binding hasn't changed from the implicit binding. More...
 
- Protected Member Functions inherited from mbgl::gfx::RendererBackend
 RendererBackend (ContextMode)
 
virtual void activate ()=0
 
virtual void deactivate ()=0
 

Static Protected Attributes

static constexpr const FramebufferID ImplicitFramebufferBinding
 A constant to signal that a framebuffer is bound, but with an unknown ID. More...
 

Additional Inherited Members

- Protected Attributes inherited from mbgl::gfx::RendererBackend
std::unique_ptr< Context > context
 
const ContextMode contextMode
 
std::once_flag initialized
 

Detailed Description

Definition at line 14 of file renderer_backend.hpp.

Constructor & Destructor Documentation

◆ RendererBackend()

mbgl::gl::RendererBackend::RendererBackend ( gfx::ContextMode  )

◆ ~RendererBackend()

mbgl::gl::RendererBackend::~RendererBackend ( )
overridevirtual

Reimplemented from mbgl::gfx::RendererBackend.

Member Function Documentation

◆ assumeFramebufferBinding()

void mbgl::gl::RendererBackend::assumeFramebufferBinding ( FramebufferID  fbo)
protected

Tells the renderer that OpenGL state has already been set by the windowing toolkit. It sets the internal assumed state to the supplied values.

◆ assumeScissorTest()

void mbgl::gl::RendererBackend::assumeScissorTest ( bool  )
protected

◆ assumeViewport()

void mbgl::gl::RendererBackend::assumeViewport ( int32_t  x,
int32_t  y,
const Size  
)
protected

◆ createContext()

std::unique_ptr<gfx::Context> mbgl::gl::RendererBackend::createContext ( )
overrideprotectedvirtual

◆ getExtensionFunctionPointer()

virtual ProcAddress mbgl::gl::RendererBackend::getExtensionFunctionPointer ( const char *  )
protectedpure virtual

Called with the name of an OpenGL extension that should be loaded. RendererBackend implementations must call the API-specific version that obtains the function pointer for this function, or a null pointer if unsupported/unavailable.

◆ implicitFramebufferBound()

bool mbgl::gl::RendererBackend::implicitFramebufferBound ( )
protected

Returns true when assumed framebuffer binding hasn't changed from the implicit binding.

◆ readFramebuffer()

PremultipliedImage mbgl::gl::RendererBackend::readFramebuffer ( const Size )
protected

Reads the color pixel data from the currently bound framebuffer.

◆ setFramebufferBinding()

void mbgl::gl::RendererBackend::setFramebufferBinding ( FramebufferID  fbo)

Triggers an OpenGL state update if the internal assumed state doesn't match the supplied values.

◆ setScissorTest()

void mbgl::gl::RendererBackend::setScissorTest ( bool  )

◆ setViewport()

void mbgl::gl::RendererBackend::setViewport ( int32_t  x,
int32_t  y,
const Size  
)

◆ updateAssumedState()

virtual void mbgl::gl::RendererBackend::updateAssumedState ( )
pure virtual

Called prior to rendering to update the internally assumed OpenGL state.

Member Data Documentation

◆ ImplicitFramebufferBinding

constexpr const FramebufferID mbgl::gl::RendererBackend::ImplicitFramebufferBinding
staticconstexprprotected
Initial value:
=
std::enable_if_t< std::is_integral_v< T >, T > max(T a, T b)
Definition: minmax.hpp:11

A constant to signal that a framebuffer is bound, but with an unknown ID.

Definition at line 34 of file renderer_backend.hpp.


The documentation for this class was generated from the following file: