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 UpdateGlobal ()
 Updates the global material. 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 Material GlobalMaterial
 The prime global material. Most often used when lots of WorldUI's are on screen. 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 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 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.

static void PowerUI.AtlasStacks.UpdateGlobal ( )
inlinestatic

Updates the global material.

Member Data Documentation

Material PowerUI.AtlasStacks.GlobalMaterial
static

The prime global material. Most often used when lots of WorldUI's are on screen.

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.RawMaxSize =2048
staticprivate

The max available atlas size. See MaxSize.

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.MaxSize
staticget

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