Writing the Code

Writing 8 and 16-Bit Versions

By following certain conventions, you can reuse the same code to create one .so file that handles 8 bits per channel and another .so file that handles 16 bits per channel.

Instead of using char* for an 8-bit pixel component and unsigned short* for a 16-bit pixel component, use DK_PIXEL* in your code. This data type is defined in DK_Types.h.

When you compile the code, set the compiler flag BIT_16 for a 16-bit version of your effect. For an 8-bit version, unset the BIT_16 flag.

Make sure to install the 8-bit version in the plugins subdirectory and the 16-bit version in the plugins16 subdirectory.


SOFTIMAGE Eddie 3.5 - 10 JAN 1997