wrapCache_s Struct Reference

This structure caches information about rendering a text in one font wrapped to a specific width. It points to structures in the chunkCache that cache detailed information and the textures used. More...

Collaboration diagram for wrapCache_s:
Collaboration graph
[legend]

Data Fields

char text [MAX_CACHE_STRING]
const font_tfont
struct wrapCache_snext
int maxWidth
longlines_t method
int numChunks
int numLines
int chunkIdx
qboolean aborted

Detailed Description

This structure caches information about rendering a text in one font wrapped to a specific width. It points to structures in the chunkCache that cache detailed information and the textures used.

Note:
Caching text-wrapping information is particularly important for Cyrillic and possibly other non-ascii text, where TTF_SizeUTF8() is almost as slow as rendering. Intro sequence went from 4 fps to 50 after introducing the wrapCache.

Definition at line 69 of file r_font.c.


Field Documentation

true if we can't finish the chunk generation

Definition at line 78 of file r_font.c.

Referenced by R_FontWrapText().

first chunk in chunkCache for this text

Definition at line 77 of file r_font.c.

Referenced by R_FontDrawString(), R_FontTextSize(), and R_FontWrapText().

font used for wrapping/rendering this text

Definition at line 71 of file r_font.c.

Referenced by R_FontWrapText().

width to which this text was wrapped

Definition at line 73 of file r_font.c.

Referenced by R_FontWrapText().

were long lines wrapped or truncated?

Definition at line 74 of file r_font.c.

Referenced by R_FontWrapText().

next hash entry in case of collision

Definition at line 72 of file r_font.c.

Referenced by R_FontListCache_f(), and R_FontWrapText().

number of (contiguous) chunks in chunkCache used

Definition at line 75 of file r_font.c.

Referenced by R_FontDrawString(), R_FontTextSize(), and R_FontWrapText().

total line count of wrapped text

Definition at line 76 of file r_font.c.

Referenced by R_FontDrawString(), R_FontTextSize(), and R_FontWrapText().

char wrapCache_s::text[MAX_CACHE_STRING]

hash id

Definition at line 70 of file r_font.c.

Referenced by R_FontListCache_f(), and R_FontWrapText().


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

Generated by  doxygen 1.6.2