Support for 64 Bit Operating Systems

Version 6 supports 64 bit operating systems.

To compile your plugins in 64 bit select item, which you can find in the Windows menu.

[Note] Note
The SDK adds 64 bit CMD shortcut menus only for Visual Studio 2005. If you have Visual Studio version 6, then you need to install Microsoft's Platform SDK and configure it manually for building 64 bit apps.

Building on 64 bit works then exactly the same way as building 32 bit apps. The only difference is an additional precompilation stage which first converts source file to an intermediate format.

A few notes thought

The 64 bit Realsoft 3D version is not complete yet. A few program features are missing because some 3rd party libraries and tools won't run on Vista. For example, to build 64 bit ffmpeg and gif versions for Vista requires MinGW, which does not work on Vista yet.

If you are using C++, some compilers don't allow casting pointers to an integer. Use the macro R3A2I() to do the cast:

    R3INT i;
    
    i = (int)tag->value; // won't work

    i = R3A2I(tag->value); // works

There is a new type R3LONGLONG for 64 bit integers. This corresponds to 'long long' type in ANSI and is 64 bit even on 32 bit platforms.

Another new type is R3SIZE, which corresponds to 'size_t'. This type can be used for representing memory chunk sizes and other size information that is related to the memory space. R3SIZE can be defined as 32 bit or 64 bit integer so newer try to save it into a file.

[Note] Note
You should write such a code that it works on any platform or hardware so use these new types with extreme care.

For example, if you save R3LONGLONG types to a file 32 bit users won't be able to load projects written with 64 bit version.

So use only 32 bit integers in file format. They should be enough for all practical purposes, such as representing the number of vertices in an SDS object (4 billion vertices per object should be enough for all practical purposes).

Another example: the size of an image can easily hit the 4GB barrier. But if you design the image format so that it saves the image size as two separate fields: width and height, then you can avoid using 64 bit integers. You'll format will still be able to cope with 4 billion by 4 billion pixel image sizes, which should be quite enough.

If you need to write 64/32 sensitive code, you can study the R364 directive. For example:

#ifdef R364
    char *msg = "Welcome to 64 bit ...";
#else
    char *msg = "Welcome to 32 bit ...";
#endif