Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::GlTextureCache Class Reference

Owns the GL textures the advanced editor uses for flat, overlay, and composited presentation. More...

#include "donner/editor/GlTextureCache.h"

Public Member Functions

 GlTextureCache (const GlTextureCache &)=delete
GlTextureCache & operator= (const GlTextureCache &)=delete
void initialize ()
void uploadFlat (const svg::RendererBitmap &bitmap)
void uploadOverlay (const svg::RendererBitmap &bitmap)
void uploadComposited (const RenderResult::CompositedPreview &preview)
void clearOverlay ()
void resetComposited ()
GLuint flatTexture () const
GLuint overlayTexture () const
GLuint backgroundTexture () const
GLuint promotedTexture () const
GLuint foregroundTexture () const
int flatWidth () const
int flatHeight () const
int overlayWidth () const
int overlayHeight () const
int backgroundWidth () const
int backgroundHeight () const
int promotedWidth () const
int promotedHeight () const
int foregroundWidth () const
int foregroundHeight () const
const Vector2dpromotedTranslationDoc () const
 Compositor-reported translation to apply when drawing promotedTexture() on top of bg/fg. Reflects the delta between the bitmap's rasterize-time DOM transform and the entity's current DOM transform — i.e. how far the user has dragged since the bitmap was last stamped.

Detailed Description

Owns the GL textures the advanced editor uses for flat, overlay, and composited presentation.

The cache is intentionally dumb: callers decide when textures should update; this class only owns the texture names, uploads pixel buffers, and tracks the currently-valid dimensions.


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