Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::SurfaceFactory Class Referenceabstract

#include <Ultralight/platform/Surface.h>

Details

SurfaceFactory can be used to provide your own native Surface implementation.

This can be used to wrap a platform-specific GPU texture, Windows DIB, macOS CGImage, or any other pixel buffer target for display on screen.

The default factory creates/destroys a BitmapSurface but you can override this by providing your own factory to Platform::set_surface_factory.

Public Member Functions

virtual ~SurfaceFactory ()
 
virtual SurfaceCreateSurface (uint32_t width, uint32_t height)=0
 Create a native Surface with a certain width and height (in pixels).
 
virtual void DestroySurface (Surface *surface)=0
 Destroy a native Surface previously created by CreateSurface().
 

Constructor & Destructor Documentation

◆ ~SurfaceFactory()

virtual ultralight::SurfaceFactory::~SurfaceFactory ( )
virtual

Member Function Documentation

◆ CreateSurface()

virtual Surface * ultralight::SurfaceFactory::CreateSurface ( uint32_t  width,
uint32_t  height 
)
pure virtual

Create a native Surface with a certain width and height (in pixels).

◆ DestroySurface()

virtual void ultralight::SurfaceFactory::DestroySurface ( Surface surface)
pure virtual

Destroy a native Surface previously created by CreateSurface().


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