This object exposes RenderWare Graphics engine. The engine manages:
All plugins must be registered - by calling their respective "PluginAttach()" functions - prior to calling RwEngineStart.
|
RwEngineInitFlag Engine initialization flags. An application can use these to control the memory manager that RenderWare uses for dynamic memory management. By default RenderWare uses FreeLists. This is the preferred way of using RenderWare. If the application does not want RenderWare to use the memory manager, then the application can pass rwENGINEINITNOFREELISTS as the argument to RwEngineInit and RenderWare will replace freelist calls to corresponding calls to RwMalloc and RwFree. This will result in more memory management related calls. |
|
RwVideoModeFlag These flags specify the type of display that RenderWare will use. The flags may be OR'd together to build composite modes. Note that not all modes are supported on all platforms. |
|
RwEngineClose closes the RenderWare Graphics engine by releasing the currently selected rendering subsystem (graphics device). This function must only be called after the rendering engine has been stopped. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down.
|
|
RwEngineGetCurrentSubSystem retrieves the index of the currently selected rendering subsystem (graphics device). This function should only be called after the engine has been opened.
|
|
RwEngineGetCurrentVideoMode retrieves the index of the currently selected video mode. This function should only be called after the engine has been opened.
|
|
RwEngineGetMaxTextureSize determines the maximum dimensions of textures allocatable with this device.
|
|
RwEngineGetMetrics gets metrics from RenderWare Graphics to evaluate the performance of the system. Information such as current polygon and vertex throughput, and cache swapping occurring in the resource arena and texture cache (if applicable) is available. Metrics are only available on a metrics build. Note: The metrics structure is an accumulated value since the last RwCameraShowRaster or RwRasterShowRaster, and is most useful when examined immediately before calls to these functions.
|
|
RwEngineGetNumSubSystems determines the number of rendering subsystems (graphics devices) currently available on the platform the RenderWare Graphics engine is running. This function should only be called after the engine has been opened.
|
|
RwEngineGetNumVideoModes determines the number of video modes available in the currently selected rendering subsystem (graphics device). This function should only be called after the engine has been opened.
|
|
RwEngineGetPluginOffset gets the offset of a previously registered RenderWare Graphics engine plugin.
|
|
RwEngineGetSubSystemInfo retrieves information about the rendering subsystem (graphics device) corresponding to the specified index. This function should only be called after the engine has been opened.
The sequence to print out the identifying names of all graphics devices on a particular platform is as follows: RwInt32 numSubSystems, i; RwSubSystemInfo ssInfo; numSubSystems = RwEngineGetNumSubSystems(); for(i=0; i<numSubSystems; i++) { RwSubSystemInfo ssInfo; if( RwEngineGetSubSystemInfo(&ssInfo, i) ) { printf("SubSystem %d: %s\n", i, ssInfo.name ); } } |
|
RwEngineGetTextureMemorySize determines the amount of available texture memory.
|
|
RwEngineGetVersion determines the version of the RenderWare Graphics engine. The version number is returned as a 5 digit hex number where the first three digits represent the RenderWare Graphics SDK release number, and the last two are binary stream format revision number (zero for an official release). For example, the version 0x31001 corresponds to 3.1.0.1 (SDK 3.1.0, binary revision 1). Prior to version 3.1.0.1, this function returned the three digit SDK number only. Note that the engine must be initialized before using this function.
|
|
RwEngineGetVideoModeInfo retrieves information about the video mode in the current rendering subsystem (graphics device) corresponding to the specified index. This function should only be called after the engine has been opened.
The sequence to print out all the video modes for the current graphics device is as follows: RwInt32 numVideoModes, j; RwVideoMode vmodeInfo; numVideoModes = RwEngineGetNumVideoModes(); for(j=0; j<numVideoModes; j++) { if( RwEngineGetVideoModeInfo(&vmodeInfo, j) ) { printf("Video Mode %d: %dx%dx%d %s\n", j, vmodeInfo.width, vmodeInfo.height, vmodeInfo.depth, (vmodeInfo.flags & rwVIDEOMODEEXCLUSIVE ? "(EXCLUSIVE)" : "") ); } } |
|
RwEngineInit initializes the core of the RenderWare Graphics rendering engine. This function must be called before any other RenderWare function except functions listed in RwFreeList Overview. This function may also be used to specify an alternative interface that RenderWare Graphics will use for memory management. If specified, RenderWare Graphics will use the supplied memory allocation routines rather than the default standard library ones. Specifying NULL for this parameter forces the default ones to be used. Similarly, a default file system interface is initialized by RwEngineInit. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down. Note that the purpose of FreeLists is to improve memory management performance. It is recommended that developers benchmark their applications with and without the use of FreeLists. FreeLists should be used if possible. Note too that ultimately RenderWare Graphics FreeLists make use of the memory functions supplied as the first parameter. Most customers will want to use FreeLists as they increase performance. Running RenderWare Graphics without Freelists is allowed purely to help developers observe memory usage since calls to RwMalloc are easily hooked.
|
|
RwEngineOpen initializes the default rendering subsystem (graphics device) and video mode. The device is opened on the specified display. Once the device has been opened use the API functions RwEngineSetSubSystem and RwEngineSetVideoMode to set the display device, as appropriate. This function must only be called after the rendering engine has been initialized. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down.
To open the RenderWare Graphics engine from a Windows application. The variable hwnd is a Windows device handle returned from CreateWindow (type HWND). Assume the engine has been initialized: RwEngineOpenParams openParams; openParams.displayID = hwnd; if( !RwEngineOpen(&openParams) ) { RwEngineTerm(); fprintf(stderr, "RwEngineOpen failed\n"); ... } |
|
The functionRwEngineRegisterPlugin registers a plugin and reserves some space within the global engine space. This must happen after the engine has been initialized but before the engine is opened and is the mechanism for adding plugins to RenderWare Graphics. The global data is initialized using the specified object constructor when RwEngineStart is called. Note that a NULL return value from the constructor will cause RwEngineStart to fail.
|
|
RwEngineSetFocus changes the focus properties of the currently selected rendering subsystem (graphics device). Use this function to grab or release the current device focus. This function is especially useful for full screen applications.
|
|
RwEngineSetSubSystem is used to set the current rendering subsystem (graphic device) to the subsystem with the specified index. The rendering subsystem can only be set after the RenderWare Graphics engine has been opened.
|
|
RwEngineSetVideoMode sets the current video mode to the video mode with the specified index. The video mode can only be set after the RenderWare Graphics engine has been opened.
|
|
RwEngineStart starts the RenderWare Graphics engine. This function must only be called after the rendering engine has been initialized and opened (in that order). This function also initializes the memory requested by all registered plugins. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down. A NULL return value from any of the registered plugin object constructors will cause this function to fail.
|
|
RwEngineStop stops the RenderWare Graphics engine. This function must be called before any attempt is made to close (and then terminate, if required) the rendering engine. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down.
|
|
RwEngineTerm terminates the RenderWare Graphics engine. Before termination, the engine must first be stopped and then closed (in that order). This function should be called before the application closes down. Note the sequence of function calls used to run-up and run-down the RenderWare Graphics engine is as follows: RwEngineInit, RwEngineOpen, RwEngineStart to run-up and RwEngineStop, RwEngineClose, RwEngineTerm to run-down.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |