libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WutDrawCmd Struct Reference

One recorded UI draw (image, glyph quad or flat rectangle). More...

#include <WutVideoDriver.h>

Public Types

enum class  Kind : uint8_t {
  Texture , TextureRotated , Color , Mesh ,
  MeshInstance
}
 Which shader a queued draw goes through. More...
 

Public Attributes

Kind kind
 
uint32_t slot
 TextureRotated only: slot from Texture2DShader::uploadRotatedQuad()
 
const GX2Texture * texture
 Texture/TextureRotated only.
 
const GX2Sampler * sampler
 Texture/TextureRotated only.
 
float angle
 Texture only, radians.
 
float offset [3]
 NDC position (unused by TextureRotated)
 
float scale [3]
 NDC half-extents (unused by TextureRotated)
 
float colorIntensity [4]
 
uint32_t first
 Mesh only: index of the first vertex in the arena.
 
uint32_t count
 Mesh only: number of vertices.
 
const WutMesh * mesh
 MeshInstance only.
 

Detailed Description

One recorded UI draw (image, glyph quad or flat rectangle).

The renderers record these instead of drawing immediately, and WutVideoDriver replays the whole list once for the TV and once for the GamePad (see flushDrawQueue()).

Definition at line 42 of file WutVideoDriver.h.

Member Enumeration Documentation

◆ Kind

enum class WutDrawCmd::Kind : uint8_t
strong

Which shader a queued draw goes through.

Enumerator
Texture 

textured quad through Texture2DShader, shader-side angle/offset/scale

TextureRotated 

textured quad whose corners were pre-rotated into a Texture2DShader rotated slot

Color 

flat-color quad through ColorShader

Mesh 

triangle list from the mesh arena through ColorShader (see WutVideoDriver::queueMesh())

MeshInstance 

a WutMesh through ColorShader, placed by the shader-side offset/scale (see WutVideoDriver::queueMeshInstance())

Definition at line 45 of file WutVideoDriver.h.

Member Data Documentation

◆ angle

float WutDrawCmd::angle

Texture only, radians.

Definition at line 58 of file WutVideoDriver.h.

◆ colorIntensity

float WutDrawCmd::colorIntensity[4]

Definition at line 61 of file WutVideoDriver.h.

◆ count

uint32_t WutDrawCmd::count

Mesh only: number of vertices.

Definition at line 63 of file WutVideoDriver.h.

◆ first

uint32_t WutDrawCmd::first

Mesh only: index of the first vertex in the arena.

Definition at line 62 of file WutVideoDriver.h.

◆ kind

Kind WutDrawCmd::kind

Definition at line 54 of file WutVideoDriver.h.

◆ mesh

const WutMesh* WutDrawCmd::mesh

MeshInstance only.

Definition at line 64 of file WutVideoDriver.h.

◆ offset

float WutDrawCmd::offset[3]

NDC position (unused by TextureRotated)

Definition at line 59 of file WutVideoDriver.h.

◆ sampler

const GX2Sampler* WutDrawCmd::sampler

Texture/TextureRotated only.

Definition at line 57 of file WutVideoDriver.h.

◆ scale

float WutDrawCmd::scale[3]

NDC half-extents (unused by TextureRotated)

Definition at line 60 of file WutVideoDriver.h.

◆ slot

uint32_t WutDrawCmd::slot

TextureRotated only: slot from Texture2DShader::uploadRotatedQuad()

Definition at line 55 of file WutVideoDriver.h.

◆ texture

const GX2Texture* WutDrawCmd::texture

Texture/TextureRotated only.

Definition at line 56 of file WutVideoDriver.h.


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