C3DScreen::SetRestoreCallback

Top  Previous  Next

Syntax:

 

SetRestoreCallback(UINT  lpfn, pointer pParam)

 

Purpose:
Specifies the callback function used when full screen mode is restored.

 

Parameters:

lpfn - Address of the callback function.

pParam - User defined parameter passed to the callback.

 

Returned value(s):

None.

 

Application:

m = CreatePyramid(s,2)
'set our callback function and a parameter that will be passed
'when the device has been lost, such as an alt-tab switch
s.SetRestoreCallback(&restore_screen,m)
...
SUB restore_screen(pointer pParam)
    CreatePyramid(null,2,pParam)
RETURN
ENDSUB

 

Class Hierarchy

C3DScreen

 

Additional Info:

The callback function is called by the 3D engine when the screen buffers have been lost, usually due to an alt-tab switch to the desktop and back to your full screen program. At this time custom meshes and environment mapped textures will need to be recreated.

 

The format of the callback function is a subroutine with a single pointer parameter.