class render::NVGVectorPathRenderable

VectorPathRenderable implementation that uses NanoVG for rasterizing a VectorPath.

Public

Constructors

NVGVectorPathRenderable

NVGVectorPathRenderable(const VectorPath &vectorPath, const VectorGraphicsSettings &settings)

NVGVectorPathRenderable

NVGVectorPathRenderable() = default

*********************************************************************

Methods

Prepare

SPtr<GpuParameterSet> Prepare() override

Prepares GPU parameters for rendering.

Must be called before Render().

Render

void Render(GpuCommandBuffer &commandBuffer) override

Records command required for rasterizing the path into pixels.

Before calling this the user is required to have bound a render target containing a color texture and a stencil buffer. Prepare() must be called before this method.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

Private

Methods

CookRenderBuffers

RenderGpuBuffers CookRenderBuffers()

Converts the raw render data from mRawRenderData into GPU buffers that can be fed to the vector graphics rendering material.

staticPlaybackPathCommands

static NVGPathRenderData PlaybackPathCommands(const VectorPath &vectorPath, const VectorGraphicsSettings &settings)

Plays back the commands in and returns the mesh data and render commands that can be executed for rendering the path.

staticNVGRenderFillCallback

static void NVGRenderFillCallback(void *uptr, NVGpaint *paint, NVGcompositeOperationState compositeOperation, NVGscissor *scissor, float fringe, const float *bounds, const NVGpath *paths, int npaths)

Callback called by NanoVG when a fill command is executed.

This will record the provided vertices and indices into the render context, as well as render commands for rendering that mesh data.

staticNVGRenderStrokeCallback

static void NVGRenderStrokeCallback(void *uptr, NVGpaint *paint, NVGcompositeOperationState compositeOperation, NVGscissor *scissor, float fringe, float strokeWidth, const NVGpath *paths, int npaths)

Callback called by NanoVG when a stroke command is executed.

This will record the provided vertices and indices into the render context, as well as render commands for rendering that mesh data.

Fields

mRawRenderData

NVGPathRenderData mRawRenderData

mRenderBuffers

RenderGpuBuffers mRenderBuffers

mRenderBuffersCooked

bool mRenderBuffersCooked