Function


mgkAppInit

Initializes the application.

Syntax

#include <mgk/App.h>
void mgkAppInit( const u32 frame_latency,
                 const u32 gfx_length,
                 const u32 frame_resource_size,
                 const u32 instance_queue_size,
                 const u32 transform_buffer_size,
                 const u32 max_objs,
                 MgkObj *obj_array,
                 void *user_data )

Arguments

frame_latency
frame_latency is decided, depending upon NuSystem
When Double buffer, frame_latency = 2
When Triple buffer, frame_latency = 3
gfx_length
gfx_length is the size of gfx buffer, and the actual volume of gfx buffer is
frame_latency * gfx_length * sizeof( Gfx )
frame_resource_size
frame_resource_size sets the capacity of frame resource in scene
Frame resource is a temporary storage area for rendering each frame, which will be destroyed everytime frame rendering completes. It is good for Mtx or dynamic Vtx.
instance_queue_size
instance_queue_size sets maximum number of queue needed for hierarchy evaluation
max_obj
max_obj sets maximum number of objects that the application uses
transform_buffer_size
transform_buffer_size sets maximum size of buffer needed for coordinate conversion for hierarchy evaluation

Description

Initializes the application.

See Also

MgkObj

mgkAppInitGroups

Initialized rendering groups

Syntax

#include <mgk/App.h>
void mgkAppInitGroups( void )

Description

Initialized rendering groups

mgkAppEvalAll

Evaluates the hierarchy structure

Syntax

#include <mgk/App.h>
void mgkAppEvalAll( void )

Description

Evaluates the hierarchy structure

mgkAppDraw

Generates Gfx

Syntax

#include <mgk/App.h>
Gfx *mgkAppDraw( void )

Description

Generates Gfx

Global variables



gMgkApp

The application instance.

Syntax

#include <mgk/App.h>
MgkApp gMgkApp

Description

The application instance.
Pointer to MgkApp has not been added to the arguments of mgpApp*( )
because every function has access to this global variable.

See Also

MgkApp

Macros



_mgkAppGetHierarchy

Returns pointer to hierarchy of Scene

Syntax

#include <mgk/App.h>
_mgkAppGetHierarchy( )

Description

Returns pointer to hierarchy of Scene

_mgkAppGetScene

Returns pointer to Scene

Syntax

#include <mgk/App.h>
_mgkAppGetScene( )

Description

Returns pointer to Scene

_mgkAppGetScreen

Returns pointer to Screen

Syntax

#include <mgk/App.h>
_mgkAppGetScreen( )

Description

Returns pointer to Screen

_mgkAppBeginFrame

Declares beginning of a frame.

Syntax

#include <mgk/App.h>
_mgkAppBeginFrame( )

Description

Declares beginning of a frame. Evaluating hierarchy and generating Gfx are performed between BeginFrame() and EndFrame(). Conversely, switching screen modes must not be done between those two functions.

_mgkAppEndFrame

Declares end of a frame.

Syntax

#include <mgk/App.h>
_mgkAppEndFrame( )

Description

Declares end of a frame.

_mgkAppGetFrameCount

Returns frame count

Syntax

#include <mgk/App.h>
_mgkAppGetFrameCount( )

Description

Returns frame count

Structure



MgkApp


typedef struct _MgkApp
{
    u32                 number_of_objs;
    struct _MgkObj      *obj_array;
    struct _MgkObj      *active_camera_ptr;
    void                *user_data;
} MgkApp;

See Also

MgkObj