|
MTek-GDL 0.100.4-muffintrap
|
Functions for setting up the system, debug environments and some screen and video related functions. More...

Namespaces | |
| namespace | gdl::wii |
| Wii specific functions, structs and global variables. | |
Enumerations | |
| enum | gdl::InitVideoMode { gdl::ModeAuto = 0 , gdl::ModeNTSC , gdl::ModePAL , gdl::ModeMPAL , gdl::ModePAL60 } |
| enum | gdl::InitAspectMode { gdl::AspectAuto = 0 , gdl::Aspect4x3 , gdl::Aspect16x9 } |
| enum | gdl::InitResolution { gdl::HiRes = 0 , gdl::LowRes } |
| enum | gdl::InitFlags { gdl::DontMask = 1<<0 , gdl::ForceNonInt = 1<<1 , gdl::AntiAliased = 1<<2 , gdl::OpenGX = 1<<3 } |
Functions | |
| void | gdl::InitSystem (gdl::InitVideoMode videoMode=gdl::ModeAuto, gdl::InitAspectMode aspectMode=gdl::AspectAuto, gdl::InitResolution resolution=gdl::HiRes, u_int flags=0) |
| Initializes the system. | |
| void | gdl::ConsoleMode () |
| Sets the screen to console mode. | |
| void | gdl::Set2DMatrixRes (short xres, short yres) |
| Sets the resolution of the 2D projection matrix. | |
| void | gdl::Set2DMode (float farClip=100.f) |
| Sets the current projection matrix into an orthographic 2D projection matrix. | |
| void | gdl::Set3DMode (float farClip=1000.f) |
| Sets the current projection matrix into a 3D projection matrix. | |
| void | gdl::SetClearColor (u_char red, u_char grn, u_char blu, u_char alp) |
| Sets the clear color. | |
| void | gdl::SetClearColor (u_int color) |
| Sets the clear color. | |
| void | gdl::SetClipBox (short x1, short y1, short x2, short y2) |
| Sets the clip box. | |
| void | gdl::ResetClipBox () |
| Resets the clip box. | |
| void | gdl::PrepDisplay () |
| Prepares the display for drawing graphics. | |
| void | gdl::Display () |
| Display graphics. | |
| gdl::ErrorCallback | gdl::SetErrorCallback (gdl::ErrorCallback func) |
| Sets an error callback function. | |
| void | gdl::CallErrorCallback (const char *message,...) |
| Calls the currently set error callback function. | |
Functions for setting up the system, debug environments and some screen and video related functions.
| enum gdl::InitAspectMode |
Aspect ratio options
Aspect ratio mode options for the gdl::InitSystem() function.
| enum gdl::InitFlags |
Initialization flag options
Special initialization flags for the for the gdl::InitSystem() function.
| Enumerator | |
|---|---|
| DontMask | Disable screen masking which is used to hide garbage in the FrameBuffer during initialization. |
| ForceNonInt | Force non-interlaced mode for low resolution modes regardless whether or not a component cable is used. |
| AntiAliased | Enable anti-aliasing mode (ignored when resolution is set to gdl::LowRes). |
| OpenGX | OpenGX will be used for drawing and is expected to handle rendering state. |
| enum gdl::InitResolution |
Screen resolution options
Screen resolution mode options for the gdl::InitSystem() function.
| Enumerator | |
|---|---|
| HiRes | Standard hi-res mode (640x480 for NTSC and MPAL, 640x528 for PAL). |
| LowRes | OldSchool low-res mode (320x240/432x240) for NTSC and MPAL, 320x264/432x264 for PAL). |
| enum gdl::InitVideoMode |
Video system options
Video system mode options for the gdl::InitSystem() function.
| void gdl::CallErrorCallback | ( | const char * | message, |
| ... | |||
| ) |
Calls the currently set error callback function.
This function calls the currently set error handler function usually displaying the error message. The default error callback function will set the screen to high-res mode and then prints out the specified error message.
| [in] | message | String of print message (supports printf() style formatting codes). |
| [in] | ... | Print arguments. |
| void gdl::ConsoleMode | ( | ) |
Sets the screen to console mode.
This function sets the screen into a simple TTY console for printing out debug messages through printf(). Use the global variable gdl::ConsoleActive to tell whether or not console mode is set or not. Since v0.65 and onwards of this library, this function will allocate its own framebuffer and rmode settings so that the console screen will always be hi-res even when low-res mode is set but calling gdl::Display() will revert it back to the mode you specified.
| void gdl::Display | ( | ) |
Display graphics.
Finishes GX rendering, waits for it to finish processing, and then switches framebuffers after a VSync, displaying the rendered graphics. It also calculates the delta value for gdl::Delta based on the amount of CPU cycles passed since gdl::PrepDisplay() was called.
| void gdl::InitSystem | ( | gdl::InitVideoMode | videoMode = gdl::ModeAuto, |
| gdl::InitAspectMode | aspectMode = gdl::AspectAuto, |
||
| gdl::InitResolution | resolution = gdl::HiRes, |
||
| u_int | flags = 0 |
||
| ) |
Initializes the system.
This function must be called before using most library functions (usually graphics drawing and sound related). What this function does is that it initializes the system's video, graphics, and audio subsystems as well as automatically setting up anamorphic widescreen and progressive scan based on the system's configuration by default.
| [in] | videoMode | Video system mode (see gdl::InitVideoMode) |
| [in] | aspectMode | Aspect ratio mode (see gdl::InitAspectMode) |
| [in] | resolution | Display resolution mode (see gdl::InitResolution) |
| [in] | flags | Init flags (see gdl::InitFlags) |
| void gdl::PrepDisplay | ( | ) |
Prepares the display for drawing graphics.
Always call this function before calling any of the graphics functions. This function also begins calculation for the gdl::Delta variable based on the amount of time it took for a gdl::PrepDisplay() and gdl::Display() pair to complete.
| void gdl::Set2DMatrixRes | ( | short | xres, |
| short | yres | ||
| ) |
Sets the resolution of the 2D projection matrix.
This function changes the resolution of the 2D projection matrix useful if you want to override the default screen matrix resolution when gdl::Set2Dmode() is called.
| [in] | xres | X resolution of 2D projection matrix. |
| [in] | yres | Y resolution of 2D projection matrix. |
| void gdl::Set2DMode | ( | float | farClip = 100.f | ) |
Sets the current projection matrix into an orthographic 2D projection matrix.
This is the default projection mode set whenever gdl::PrepDisplay() is called. Use this projection mode for drawing 2D graphics. You can still do 3D graphics in this mode but it'll be rendered orthographically (no depth).
| [in] | farClip | Depth clip range (also mirrored for the negative clip range). |
| void gdl::Set3DMode | ( | float | farClip = 1000.f | ) |
Sets the current projection matrix into a 3D projection matrix.
This projection mode is most ideal for rendering 3D graphics.
| [in] | farClip | Far distance clip range. |
| void gdl::SetClearColor | ( | u_char | red, |
| u_char | grn, | ||
| u_char | blu, | ||
| u_char | alp | ||
| ) |
Sets the clear color.
Sets the color used when the screen gets cleared.
| [in] | red | Red component value. |
| [in] | grn | Green component value. |
| [in] | blu | Blue component value. |
| [in] | alp | Alpha component value. |
| void gdl::SetClearColor | ( | u_int | color | ) |
Sets the clear color.
Sets the color used when the screen gets cleared.
| [in] | color |
| void gdl::SetClipBox | ( | short | x1, |
| short | y1, | ||
| short | x2, | ||
| short | y2 | ||
| ) |
Sets the clip box.
Sets the position of the clip box. It uses the scissor box functions of the GX to achieve clipping.
| [in] | x1,y1 | 2D screen coordinate of the top-left position of the box. |
| [in] | x2,y2 | 2D screen coordinate of the bottom-right position of the box. |
| gdl::ErrorCallback gdl::SetErrorCallback | ( | gdl::ErrorCallback | func | ) |
Sets an error callback function.
Sets a function which will be called when an error occurs in the library. To properly define an error callback function, specify parameters myFunc(const char *message) where *message points to a string of the error message.
| [in] | func | Function to set as the error handler. |