DEMOGL_ConsoleSetAppearance
- DEMOGL_ConsoleSetAppearance sets the width in characters per line and height in lines visible of the system console and the
debug overlay.
int
DEMOGL_ConsoleSetAppearance(
const int iAmCharsPerLine,
const int iAmLinesInBuffer,
const int iAmLinesOnScreen,
const int iAmLinesInDebugInfo
);
- Parameters.
- iAmCharsPerLine
- Specifies the amount of characters per line. This value is used for the console buffer, the console screen and the debug
info overlay. The value of iAmCharsPerLine will determine the width portion of the visible characters on screen.
- iAmLinesInBuffer
- Specifies the amount of lines in the console buffer. The system console uses a cyclic buffer to store all contents of the
system console. The visible window moves through this buffer, wrapping around the end of the buffer to start at the beginning.
- iAmLinesOnScreen
- Specifies the amount of lines displayed inside the system console. This value is the summation of the amount of lines in
the header(4), the input lines(2) and the amount of lines from the console buffer to show inside the system console.
The value of iAmLinesOnScreen will determine the height portion of the visible characters on screen.
- iAmLinesInDebugInfo
- Specifies how many lines of the console buffer are visible in the debug info overlay. This value is the summation of the
amount of lines in the timebar(1), the input lines(2) and the amount of lines from the console buffer to show inside the
debug info overlay.
- Return values.
- If the function succeeds, it returns SYS_OK.
If the function fails, it returns SYS_NOK.
- Remarks.
- This routine should be called before DEMOGL_AppRun. When this routine is called during
a running application, thus from an effectclass, the current contents of the console buffer is lost. The system console and the debug
info overlay use a default font, stored in two textures, fnt_cnl.bmp and fnt_cnr.bmp, stored in the systex directory of
the rootdirectory your application reads from (which can be a datafile or a directory). These fonts are rendered using OpenGL quads
and as texture the character inside the fonttexture. To do this reasonably fast, vertex arrays are used, which are fixed sized to
avoid reallocating them each frame. By setting the width of a line on screen and the height in lines on screen these vertex arrays
are allocated and prepared. The console contents buffer, a cyclic buffer, is also created using the values specified with this
function.
There are minimum values defined for the parameters of this function. If one or more of the parameters conflicts with these
minimum values, DEMOGL_ConsoleSetAppearance will fail.
| Parameter |
Minimum/maximum value |
| iAmCharsPerLine |
Minimum: 60. Maximum: limited by available RAM. |
| iAmLinesInBuffer |
Minimim: 2. Maximum: limited by available RAM. |
| iAmLinesOnScreen |
Mimimum: 7. Maximum: <= (iAmLinesInBuffer + 7) |
| iAmLinesInDebugInfo |
Minimum: 0. Maximum: <= (iAmLinesOnScreen - 4) and < iAmLinesInBuffer
|
These values, together with the default values used by DemoGL when you don't call DEMOGL_ConsoleSetAppearance
before you call DEMOGL_AppRun, are specified in brief in
Definitions and defaults.
- Example.
int iResult;
// Specify a 80x24 screen, 8 lines in the debug info overlay,
// and a 150 line console buffer.
iResult = DEMOGL_ConsoleSetAppearance(80,150,24,8);
- Requirements.
- DemoGL v1.3 (build 0112 or higher)
- See also.
-
DEMOGL_AppRun, Definitions and defaults