| Object | Memory Required (bytes) |
|---|---|
| XintOBJECT_LINE | 582+ (num_vertices * 12) + (num_indices * 4) |
| XintOBJECT_MESH_SURFACE | nv=num verts, nl=num index lists, ni=num of indices/list, np=num polys, nvp=num verts/poly.
|
| XintOBJECT_MARKER | 450 + strlen(label) |
| XintOBJECT_POINT | 502 + (num_vertices * 12) |
| XintOBJECT_RASTER | 522 + (num_pixels * 16) |
| XintOBJECT_GROUP | 290 + (num_objects_in_group * 4) |
These figures are rough estimates of the memory requirements. For example: a 1000x1000 Uniform grid will use approximately 72 megs or memory. You can reduce memory used by this surface to a little as 16 megs by disabling normals and polygon data (XintView3DSetGlobalFlags(), using XintGLOBAL_DISABLE_NORMALS and XintGLOBAL_DISABLE_POLYGON_DATA). If these figures seem extreme, remember that the minimum memory required for a 3D 1000x1000 grid is 12 megs just for the data points.
Different material types will require more memory than others. XintMATERIAL_SINGLE_COLOR only uses a single color value for an object. XintMATERIAL_COLOR_SCALE and XintMATERIAL_MULTI_COLOR require a different color for each vertex. In the example above, using a multi color surface would add approximately 16 megs of data. Using a single color material would only add about 131 bytes (the minimum required for a material).
If you are using multiple View3D widgets to view the same object, the object's data will not be duplicated. If you assign different materials to the object in the different views, the different materials will require their own memory.
If you have enough memory to store the surface at different sample intervals, do so. Use the Zoom callback (Release 1.1) to determine when to remove a lower resolution surface and replace it with a higher resolution version.
In general, you do not need to use objects that contain more points (width or height) than the resolution of the window that you are using. If you are displaying 500x500 grids in a 500x500 window, you are wasting resources, try using a 200x200 grid instead (or even a 100x100 grid).
| Material Property | Effect |
|---|---|
| lighting | Requires a normal to be specified with each vertex during rendering. This pushes twice as much data along the graphics pipeline. Calculating the effect of light on an object is also costly. |
| multiple colors | Using more than a single color to describe an object causes a color value to be specified with each vertex. This double the amount of information needed in the rendering loops. If only a single color is needed, use it. |
| transparency | Forces the rendering to blend colors displayed on the screen. |
| two sided surfaces | Forces the rendering routines to render the front and back sides of a surface differently. A two step process. |
| grid lines | More data that needs to be drawn. |
| highlighting | More data that needs to be drawn. |