Supported Browsers Home   
GM_setAppActivate Previous   
GM_setDriverOptions Next   
External Functions Up   

GM_setDrawFunc

Sets the draw callback function

Declaration

void MGLAPI GM_setDrawFunc(
    GM_drawFunc func)
typedef void (*GM_drawFunc)(void)

Prototype In

gm/gm.h

Parameters

func

Draw callback function to register

 

Description

This function sets the draw callback function for your Game Framework game and is called by the Game Framework main loop (GM_mainLoop) once per frame to draw the current frame in the game. Note that the Game Framework expects this function both draw the current frame and swap the buffers to make them visible using GM_swapBuffers or GM_swapDirtyBuffers.

Note:    In order to be able to continue running your games main logic loops while the user has switch away (ie: Alt-Tab) from your game in Windows, while the application is minimised we continue to process messages and call the registered game logic callback, however the draw callback will not be called until the application is restored to fullscreen mode. Hence your draw callback should not contain any game logic functionality, but only contain code to draw the current frame in the game.

See Also

GM_init, GM_swapBuffers, GM_swapDirtyBuffers

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com