1. Visualisation package specifies the format it expects for data; the
client program has to dump data in files in this format. Since the only
issue is whether to use int or long or long long, float or double, the
programming effort required from the user is quite small. Code is not
portable, but the system dependent part can be encapsulated in a few
datatype definitions.
2. Visualization package is interfaced by a client library. The library
provides one portable interface (say, accepts arguments of type float).
The data conversion is dealt with inside the library. The user code is
fully portable. The library code is not portable, but the system dependnet
part can be encapsulated in a few datatype definitions.
I suggest not to go beyond this level of portability since, in many
instances, users will not want 64 bit values to be transparently truncated
to 32 bit values.