Detailed Description

All the major stacks used by PowerUI. Each one represents a stack of texture atlases which are shared across all UI's.

Static Public Member Functions

static void SetRate (int rate)
 Called when the global UI rate changes. More...
 
static void Start ()
 Creates our stacks. More...
 
static void Update ()
 Called at the global rate to e.g. optimise the atlases or trigger threaded draws. More...
 
static void Optimise ()
 Attempts to optimise the major atlases. Only does anything if they need it. More...
 
static void Clear ()
 Clears all stacks. More...
 
static void Flush ()
 Flushes all atlases that require it. More...
 

Static Public Attributes

static int InitialSize =1024
 The minimum starting atlas size. More...
 
static AtlasStack Text
 The atlas stack used for rendering SDF text. All fonts share the same atlases. More...
 
static AtlasStack Graphics
 A stack of temporarily buffered atlases. More...
 

Properties

static int TextSpacing [get, set]
 The spacing around letters on the text atlas. More...
 
static int GraphicsSpacing [get, set]
 The spacing around images on the graphics atlas. More...
 
static int MaxSize [get]
 The maximum possible size that atlases can be on this hardware. More...
 
static int AtlasSize [get, set]
 The size of atlases to use. Auto clipped by MaxSize. More...
 

Private Attributes

const int OptimiseFrequency =20
 The max frequency of optimise calls, in seconds. More...
 

Static Private Attributes

static int RawTextSpacing =2
 The spacing around letters on the text atlas. More...
 
static int RawGraphicsSpacing =0
 The spacing around images on the graphics atlas. More...
 
static int OptimiseCount
 A counter which tracks optimise calls and throttles them to at most once every 30s. More...
 
static int OptimiseFrameCount =OptimiseFrequency*UI.DefaultRate
 The max frame count until an optimise happens. More...
 
static int RawMaxSize =2048
 The max available atlas size. See MaxSize. More...
 

Member Function Documentation

static void PowerUI.AtlasStacks.Clear ( )
inlinestatic

Clears all stacks.

static void PowerUI.AtlasStacks.Flush ( )
inlinestatic

Flushes all atlases that require it.

static void PowerUI.AtlasStacks.Optimise ( )
inlinestatic

Attempts to optimise the major atlases. Only does anything if they need it.

static void PowerUI.AtlasStacks.SetRate ( int  rate)
inlinestatic

Called when the global UI rate changes.

static void PowerUI.AtlasStacks.Start ( )
inlinestatic

Creates our stacks.

static void PowerUI.AtlasStacks.Update ( )
inlinestatic

Called at the global rate to e.g. optimise the atlases or trigger threaded draws.

Member Data Documentation

AtlasStack PowerUI.AtlasStacks.Graphics
static

A stack of temporarily buffered atlases.

The stack used for rendering all graphics. Shared across all UI's.

int PowerUI.AtlasStacks.InitialSize =1024
static

The minimum starting atlas size.

int PowerUI.AtlasStacks.OptimiseCount
staticprivate

A counter which tracks optimise calls and throttles them to at most once every 30s.

int PowerUI.AtlasStacks.OptimiseFrameCount =OptimiseFrequency*UI.DefaultRate
staticprivate

The max frame count until an optimise happens.

const int PowerUI.AtlasStacks.OptimiseFrequency =20
private

The max frequency of optimise calls, in seconds.

int PowerUI.AtlasStacks.RawGraphicsSpacing =0
staticprivate

The spacing around images on the graphics atlas.

int PowerUI.AtlasStacks.RawMaxSize =2048
staticprivate

The max available atlas size. See MaxSize.

int PowerUI.AtlasStacks.RawTextSpacing =2
staticprivate

The spacing around letters on the text atlas.

AtlasStack PowerUI.AtlasStacks.Text
static

The atlas stack used for rendering SDF text. All fonts share the same atlases.

Property Documentation

int PowerUI.AtlasStacks.AtlasSize
staticgetset

The size of atlases to use. Auto clipped by MaxSize.

int PowerUI.AtlasStacks.GraphicsSpacing
staticgetset

The spacing around images on the graphics atlas.

int PowerUI.AtlasStacks.MaxSize
staticget

The maximum possible size that atlases can be on this hardware.

int PowerUI.AtlasStacks.TextSpacing
staticgetset

The spacing around letters on the text atlas.