RenderWare V2.1

Previous Page Index Next Page


Requirements
RenderWare Import Libraries
Libraries and Include Files
RenderWare and Macintosh Palettes
Macintosh Specific API Function Parameters

Power Macintosh Specific Information


Requirements

The floating-point RenderWare library requires a Power Macintosh computer with 4Mb of memory and a color display adapter.

The recommended minimum configuration for the floating-point RenderWare library is an Power Macintosh with 8Mb of memory. For highest performance rendering a display adapter running in 8-bit (256 color) mode is recommended. For highest quality rendering a display adapter running in 15-bit (Thousands) mode is recommended.

RenderWare also requires System 7 of the Macintosh Operating system.

In order to build programs with RenderWare you will need a 32 bit compiler that can link to a Code Fragment Manager Import Library.

RenderWare Import Libraries

RenderWare for the Power Macintosh is only available in Code Fragment Manager Import Library form. The naming convention that has been used is identical to that used for the Windows versions of RenderWare.

RenderWare consists of a core component and a number of loadable driver components. The core component is

· rwl20.dll Floating Point Import Library

In addition, RenderWare provides a number of driver import libraries. These have all been given the prefix RWDL for RenderWare floating point Driver) to facilitate fast querying and loading of the available drivers. For the software drivers, the following naming convention is used. Hardware driver manufacturers are free to select their own names :

RWDL [6|8] [A|B|C|D]21.DLL

6 16 bit

8 8 bit

A 32 bit Z buffer, 256*256 textures

B 16 bit Z buffer, 256*256 textures

C 32 bit Z buffer, 128*128 textures

D 16 bit Z buffer, 128*128 textures

The Import Libraries must be installed in the extensions folder or in a subdirectory of the extensions folder. There are 4 different versions of the Import Libraries provided these are found in the RenderWare V2.1:Lib directory as follows:

· static:debug Static runtime, debugging libraries.
· static:nondebug Static runtime production libraries.
· dynamic:debug Dynamic runtime, debugging libraries.
· dynamic:nondebug Dynamic runtime production libraries.

Note: Only one of these versions should be installed in the extensions folder at any time.

The dynamic libraries require the redistributable components from the Microsoft Visual C++ V4.0 cross compiler to be installed in the extensions folder also.

The Debugging DLLs

When using the Import Libraries, no relinking is necessary in order to use the debugging version of RenderWare. Simply replace the Import Libraries in the extensions folder with their debug counterparts

Libraries and Include Files

Source files must include the RenderWare include file:


#include <rwlib.h>

If your application use the platform specific RwOpenExt() options or RwGetDeviceInfo() information types then the application will also need to include the Macintosh specific header file rwmac.h. However, it is recommended that, to ensure future compatibility, all source files which use RenderWare API functions include rwmac.h after including the standard RenderWare include file:


#include <rwlib.h>
#include <rwmac.h>

RenderWare V2.1 for the Power Macintosh has been tested with both CodeWarrior V8 and the Microsoft Visual C++ V4.0 cross development edition. For CodeWarrior, the core RenderWare Import Library (RWL21.DLL) should be included in the project. For Visual C++, an import library is provided with the PC components.

RenderWare and Macintosh Palettes

RenderWare maintains its own Macintosh palette object (PaletteHandle). Each time RwShowCameraImage() is called this palette is installed into the specified output Window. By default, RenderWare installs its palette as a foreground palette, i.e., FALSE is passed as the third parameter of SetPalette(). With RenderWare V2.1 it is possible to change this default and have RenderWare realize its palette as a background palette. This is useful when building applications where RenderWare has to co-exist with other windows which also have their own. In such situations it is not acceptable for the RenderWare window to realize its palette as a foreground palette on each call to RwShowCameraImage(). Instead, RenderWare should realize its palette as a background palette and the application must take responsibility for realizing the RenderWare palette as a foreground palette at the appropriate time.

To following code instructs RenderWare to realize its palette as a background palette;


RwDeviceControl(rwMACBACKGROUNDPALETTE, TRUE, NULL, 0L);

If an application uses the above control it is essential that it take responsibility for realizing the RenderWare palette as a foreground palette

The following code fragment demonstrates this process;


{
PaletteHandle rwPalette;
PaletteHandle oldPalette;

RwGetDeviceInfo(rwPALETTE, &rwPalette,
sizeof(rwPalette));
oldPalette = SetPalette(window, rwPalette, TRUE);
ActivatePalette(window);
SetPalette(window, oldPalette, FALSE);
}

The following code fragment switches RenderWare back to realizing its palette as a foreground palette;


RwDeviceControl(rwMACBACKGROUNDPALETTE, FALSE, NULL, 0L);

It is possible to determine whether RenderWare is realizing its palette in the foreground and background using the rwMACISBACKGROUNDPALETTE device information type. For example;


RwBool isBackPal;

RwGetDeviceInfo(rwMACISBACKGROUNDPALETTE, &isBackPal, sizeof(isBackPal));
if (isBackPal)
{
/* Background palette realization... */
}
else
{
/* Foreground palette realization... */
}

Macintosh Specific API Function Parameters

A small number of RenderWare API functions have device dependent parameters or return values. The following pages describe these device dependent parameters and return values under Macintosh System 7.