IceT.h 22.8 KB
Newer Older
1 2 3
/* -*- c -*- *******************************************************/
/*
 * Copyright (C) 2003 Sandia Corporation
4 5 6 7
 * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
 * the U.S. Government retains certain rights in this software.
 *
 * This source code is released under the New BSD License.
8 9
 */

Kenneth Moreland's avatar
Kenneth Moreland committed
10 11
#ifndef __IceT_h
#define __IceT_h
12 13 14 15 16 17 18 19 20 21 22 23

#include <IceTConfig.h>

#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif
#if 0
}
#endif

24 25 26 27 28 29 30 31 32 33 34 35
typedef IceTUnsignedInt32       IceTEnum;
typedef IceTUnsignedInt32       IceTBitField;
typedef IceTFloat64             IceTDouble;
typedef IceTFloat32             IceTFloat;
typedef IceTInt32               IceTInt;
typedef IceTUnsignedInt32       IceTUInt;
typedef IceTInt16               IceTShort;
typedef IceTUnsignedInt16       IceTUShort;
typedef IceTInt8                IceTByte;
typedef IceTUnsignedInt8        IceTUByte;
typedef IceTUnsignedInt8        IceTBoolean;
typedef void                    IceTVoid;
36
typedef IceTInt32               IceTSizeType;
37

38 39
struct IceTContextStruct;
typedef struct IceTContextStruct *IceTContext;
40 41 42

struct IceTCommunicatorStruct;

43 44 45 46 47
typedef struct IceTCommRequestStruct {
    IceTEnum magic_number;
    IceTVoid *internals;
} *IceTCommRequest;
#define ICET_COMM_REQUEST_NULL ((IceTCommRequest)NULL)
48 49 50 51 52

struct IceTCommunicatorStruct {
    struct IceTCommunicatorStruct *
         (*Duplicate)(struct IceTCommunicatorStruct *self);
    void (*Destroy)(struct IceTCommunicatorStruct *self);
53 54 55
    struct IceTCommunicatorStruct *
         (*Subset)(struct IceTCommunicatorStruct *self,
                   int count,
56
                   const IceTInt32 *ranks);
57
    void (*Barrier)(struct IceTCommunicatorStruct *self);
58
    void (*Send)(struct IceTCommunicatorStruct *self,
59 60 61 62
                 const void *buf,
                 int count,
                 IceTEnum datatype,
                 int dest,
63 64
                 int tag);
    void (*Recv)(struct IceTCommunicatorStruct *self,
65 66 67 68 69
                 void *buf,
                 int count,
                 IceTEnum datatype,
                 int src,
                 int tag);
70 71

    void (*Sendrecv)(struct IceTCommunicatorStruct *self,
72 73 74 75 76 77 78 79 80 81
                     const void *sendbuf,
                     int sendcount,
                     IceTEnum sendtype,
                     int dest,
                     int sendtag,
                     void *recvbuf,
                     int recvcount,
                     IceTEnum recvtype,
                     int src,
                     int recvtag);
82
    void (*Gather)(struct IceTCommunicatorStruct *self,
83 84 85 86 87
                   const void *sendbuf,
                   int sendcount,
                   IceTEnum datatype,
                   void *recvbuf,
                   int root);
88
    void (*Gatherv)(struct IceTCommunicatorStruct *self,
89 90 91
                    const void *sendbuf,
                    int sendcount,
                    IceTEnum datatype,
92
                    void *recvbuf,
93 94 95
                    const int *recvcounts,
                    const int *recvoffsets,
                    int root);
96
    void (*Allgather)(struct IceTCommunicatorStruct *self,
97 98 99
                      const void *sendbuf,
                      int sendcount,
                      IceTEnum datatype,
100
                      void *recvbuf);
101 102 103 104 105
    void (*Alltoall)(struct IceTCommunicatorStruct *self,
                     const void *sendbuf,
                     int sendcount,
                     IceTEnum datatype,
                     void *recvbuf);
106 107

    IceTCommRequest (*Isend)(struct IceTCommunicatorStruct *self,
108 109 110 111 112
                             const void *buf,
                             int count,
                             IceTEnum datatype,
                             int dest,
                             int tag);
113
    IceTCommRequest (*Irecv)(struct IceTCommunicatorStruct *self,
114 115 116 117 118
                             void *buf,
                             int count,
                             IceTEnum datatype,
                             int src,
                             int tag);
119 120 121 122 123 124 125 126 127 128 129

    void (*Wait)(struct IceTCommunicatorStruct *self, IceTCommRequest *request);
    int  (*Waitany)(struct IceTCommunicatorStruct *self,
                    int count, IceTCommRequest *array_of_requests);

    int  (*Comm_size)(struct IceTCommunicatorStruct *self);
    int  (*Comm_rank)(struct IceTCommunicatorStruct *self);
    void *data;
};

typedef struct IceTCommunicatorStruct *IceTCommunicator;
130
#define ICET_COMM_NULL ((IceTCommunicator)NULL)
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145

ICET_EXPORT IceTDouble  icetWallTime(void);

ICET_EXPORT IceTContext icetCreateContext(IceTCommunicator comm);
ICET_EXPORT void        icetDestroyContext(IceTContext context);
ICET_EXPORT IceTContext icetGetContext(void);
ICET_EXPORT void        icetSetContext(IceTContext context);
ICET_EXPORT void        icetCopyState(IceTContext dest, const IceTContext src);

#define ICET_BOOLEAN    (IceTEnum)0x8000
#define ICET_BYTE       (IceTEnum)0x8001
#define ICET_SHORT      (IceTEnum)0x8002
#define ICET_INT        (IceTEnum)0x8003
#define ICET_FLOAT      (IceTEnum)0x8004
#define ICET_DOUBLE     (IceTEnum)0x8005
146
#define ICET_SIZE_TYPE  ICET_INT
147
#define ICET_POINTER    (IceTEnum)0x8008
148
#define ICET_VOID       (IceTEnum)0x800F
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
#define ICET_NULL       (IceTEnum)0x0000

#define ICET_FALSE      0
#define ICET_TRUE       1

ICET_EXPORT void icetBoundingVertices(IceTInt size, IceTEnum type,
                                      IceTSizeType stride, IceTSizeType count,
                                      const IceTVoid *pointer);
ICET_EXPORT void icetBoundingBoxd(IceTDouble x_min, IceTDouble x_max,
                                  IceTDouble y_min, IceTDouble y_max,
                                  IceTDouble z_min, IceTDouble z_max);
ICET_EXPORT void icetBoundingBoxf(IceTFloat x_min, IceTFloat x_max,
                                  IceTFloat y_min, IceTFloat y_max,
                                  IceTFloat z_min, IceTFloat z_max);

ICET_EXPORT void icetResetTiles(void);
ICET_EXPORT int  icetAddTile(IceTInt x, IceTInt y,
                             IceTSizeType width, IceTSizeType height,
                             int display_rank);

169 170
ICET_EXPORT void icetPhysicalRenderSize(IceTInt width, IceTInt height);

171
typedef struct { IceTVoid *opaque_internals; } IceTImage;
172 173 174

#define ICET_IMAGE_COLOR_RGBA_UBYTE     (IceTEnum)0xC001
#define ICET_IMAGE_COLOR_RGBA_FLOAT     (IceTEnum)0xC002
175
#define ICET_IMAGE_COLOR_NONE           (IceTEnum)0xC000
176 177

#define ICET_IMAGE_DEPTH_FLOAT          (IceTEnum)0xD001
178
#define ICET_IMAGE_DEPTH_NONE           (IceTEnum)0xD000
179

180 181 182
ICET_EXPORT void icetSetColorFormat(IceTEnum color_format);
ICET_EXPORT void icetSetDepthFormat(IceTEnum depth_format);

183 184
ICET_EXPORT IceTImage icetImageNull(void);
ICET_EXPORT IceTBoolean icetImageIsNull(const IceTImage image);
185 186
ICET_EXPORT IceTEnum icetImageGetColorFormat(const IceTImage image);
ICET_EXPORT IceTEnum icetImageGetDepthFormat(const IceTImage image);
187 188
ICET_EXPORT IceTSizeType icetImageGetWidth(const IceTImage image);
ICET_EXPORT IceTSizeType icetImageGetHeight(const IceTImage image);
189
ICET_EXPORT IceTSizeType icetImageGetNumPixels(const IceTImage image);
190 191 192 193
ICET_EXPORT IceTUByte *icetImageGetColorub(IceTImage image);
ICET_EXPORT IceTUInt *icetImageGetColorui(IceTImage image);
ICET_EXPORT IceTFloat *icetImageGetColorf(IceTImage image);
ICET_EXPORT IceTFloat *icetImageGetDepthf(IceTImage image);
194 195 196 197
ICET_EXPORT const IceTUByte *icetImageGetColorcub(const IceTImage image);
ICET_EXPORT const IceTUInt *icetImageGetColorcui(const IceTImage image);
ICET_EXPORT const IceTFloat *icetImageGetColorcf(const IceTImage image);
ICET_EXPORT const IceTFloat *icetImageGetDepthcf(const IceTImage image);
198 199 200 201 202 203 204 205 206
ICET_EXPORT void icetImageCopyColorub(const IceTImage image,
                                      IceTUByte *color_buffer,
                                      IceTEnum color_format);
ICET_EXPORT void icetImageCopyColorf(const IceTImage image,
                                     IceTFloat *color_buffer,
                                     IceTEnum color_format);
ICET_EXPORT void icetImageCopyDepthf(const IceTImage image,
                                     IceTFloat *depth_buffer,
                                     IceTEnum depth_format);
207

208 209 210 211 212
#define ICET_STRATEGY_DIRECT            (IceTEnum)0x6001
#define ICET_STRATEGY_SEQUENTIAL        (IceTEnum)0x6002
#define ICET_STRATEGY_SPLIT             (IceTEnum)0x6003
#define ICET_STRATEGY_REDUCE            (IceTEnum)0x6004
#define ICET_STRATEGY_VTREE             (IceTEnum)0x6005
213

214
ICET_EXPORT void icetStrategy(IceTEnum strategy);
215

216
ICET_EXPORT const char *icetGetStrategyName(void);
217

218 219 220
#define ICET_SINGLE_IMAGE_STRATEGY_AUTOMATIC    (IceTEnum)0x7001
#define ICET_SINGLE_IMAGE_STRATEGY_BSWAP        (IceTEnum)0x7002
#define ICET_SINGLE_IMAGE_STRATEGY_TREE         (IceTEnum)0x7003
221
#define ICET_SINGLE_IMAGE_STRATEGY_RADIXK       (IceTEnum)0x7004
222
#define ICET_SINGLE_IMAGE_STRATEGY_RADIXKR      (IceTEnum)0x7005
223
#define ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING (IceTEnum)0x7006
224

225
ICET_EXPORT void icetSingleImageStrategy(IceTEnum strategy);
226 227 228

ICET_EXPORT const char *icetGetSingleImageStrategyName(void);

229 230 231
#define ICET_COMPOSITE_MODE_Z_BUFFER    (IceTEnum)0x0301
#define ICET_COMPOSITE_MODE_BLEND       (IceTEnum)0x0302
ICET_EXPORT void icetCompositeMode(IceTEnum mode);
232 233 234 235 236 237 238

ICET_EXPORT void icetCompositeOrder(const IceTInt *process_ranks);

ICET_EXPORT void icetDataReplicationGroup(IceTInt size,
                                          const IceTInt *processes);
ICET_EXPORT void icetDataReplicationGroupColor(IceTInt color);

239 240 241 242 243 244
typedef void (*IceTDrawCallbackType)(const IceTDouble *projection_matrix,
                                     const IceTDouble *modelview_matrix,
                                     const IceTFloat *background_color,
                                     const IceTInt *readback_viewport,
                                     IceTImage result);

245
ICET_EXPORT void icetDrawCallback(IceTDrawCallbackType callback);
246

Kenneth Moreland's avatar
Kenneth Moreland committed
247 248 249
ICET_EXPORT IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
                                    const IceTDouble *modelview_matrix,
                                    const IceTFloat *background_color);
250

251 252 253 254 255 256 257
ICET_EXPORT IceTImage icetCompositeImage(const IceTVoid *color_buffer,
                                         const IceTVoid *depth_buffer,
                                         const IceTInt *valid_pixels_viewport,
                                         const IceTDouble *projection_matrix,
                                         const IceTDouble *modelview_matrix,
                                         const IceTFloat *background_color);

258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
#define ICET_DIAG_OFF           (IceTEnum)0x0000
#define ICET_DIAG_ERRORS        (IceTEnum)0x0001
#define ICET_DIAG_WARNINGS      (IceTEnum)0x0003
#define ICET_DIAG_DEBUG         (IceTEnum)0x0007
#define ICET_DIAG_ROOT_NODE     (IceTEnum)0x0000
#define ICET_DIAG_ALL_NODES     (IceTEnum)0x0100
#define ICET_DIAG_FULL          (IceTEnum)0xFFFF

ICET_EXPORT void icetDiagnostics(IceTBitField mask);


#define ICET_STATE_ENGINE_START (IceTEnum)0x00000000

#define ICET_DIAGNOSTIC_LEVEL   (ICET_STATE_ENGINE_START | (IceTEnum)0x0001)
#define ICET_RANK               (ICET_STATE_ENGINE_START | (IceTEnum)0x0002)
#define ICET_NUM_PROCESSES      (ICET_STATE_ENGINE_START | (IceTEnum)0x0003)
274
/* #define ICET_ABSOLUTE_FAR_DEPTH (ICET_STATE_ENGINE_START | (IceTEnum)0x0004) */
275 276
#define ICET_BACKGROUND_COLOR   (ICET_STATE_ENGINE_START | (IceTEnum)0x0005)
#define ICET_BACKGROUND_COLOR_WORD (ICET_STATE_ENGINE_START | (IceTEnum)0x0006)
277 278
#define ICET_PHYSICAL_RENDER_WIDTH (ICET_STATE_ENGINE_START | (IceTEnum)0x0007)
#define ICET_PHYSICAL_RENDER_HEIGHT (ICET_STATE_ENGINE_START| (IceTEnum)0x0008)
279 280
#define ICET_COLOR_FORMAT       (ICET_STATE_ENGINE_START | (IceTEnum)0x0009)
#define ICET_DEPTH_FORMAT       (ICET_STATE_ENGINE_START | (IceTEnum)0x000A)
281 282 283 284 285 286 287 288 289 290 291

#define ICET_NUM_TILES          (ICET_STATE_ENGINE_START | (IceTEnum)0x0010)
#define ICET_TILE_VIEWPORTS     (ICET_STATE_ENGINE_START | (IceTEnum)0x0011)
#define ICET_GLOBAL_VIEWPORT    (ICET_STATE_ENGINE_START | (IceTEnum)0x0012)
#define ICET_TILE_MAX_WIDTH     (ICET_STATE_ENGINE_START | (IceTEnum)0x0013)
#define ICET_TILE_MAX_HEIGHT    (ICET_STATE_ENGINE_START | (IceTEnum)0x0014)
#define ICET_DISPLAY_NODES      (ICET_STATE_ENGINE_START | (IceTEnum)0x001A)
#define ICET_TILE_DISPLAYED     (ICET_STATE_ENGINE_START | (IceTEnum)0x001B)

#define ICET_GEOMETRY_BOUNDS    (ICET_STATE_ENGINE_START | (IceTEnum)0x0022)
#define ICET_NUM_BOUNDING_VERTS (ICET_STATE_ENGINE_START | (IceTEnum)0x0023)
292 293
#define ICET_STRATEGY           (ICET_STATE_ENGINE_START | (IceTEnum)0x0024)
#define ICET_SINGLE_IMAGE_STRATEGY (ICET_STATE_ENGINE_START | (IceTEnum)0x0025)
294 295 296 297 298 299 300
#define ICET_COMPOSITE_MODE     (ICET_STATE_ENGINE_START | (IceTEnum)0x0028)
#define ICET_COMPOSITE_ORDER    (ICET_STATE_ENGINE_START | (IceTEnum)0x0029)
#define ICET_PROCESS_ORDERS     (ICET_STATE_ENGINE_START | (IceTEnum)0x002A)
#define ICET_STRATEGY_SUPPORTS_ORDERING (ICET_STATE_ENGINE_START | (IceTEnum)0x002B)
#define ICET_DATA_REPLICATION_GROUP (ICET_STATE_ENGINE_START | (IceTEnum)0x002C)
#define ICET_DATA_REPLICATION_GROUP_SIZE (ICET_STATE_ENGINE_START | (IceTEnum)0x002D)
#define ICET_FRAME_COUNT        (ICET_STATE_ENGINE_START | (IceTEnum)0x002E)
301

302
#define ICET_MAGIC_K            (ICET_STATE_ENGINE_START | (IceTEnum)0x0040)
303
#define ICET_MAX_IMAGE_SPLIT    (ICET_STATE_ENGINE_START | (IceTEnum)0x0041)
304

305
#define ICET_DRAW_FUNCTION      (ICET_STATE_ENGINE_START | (IceTEnum)0x0060)
306
#define ICET_RENDER_LAYER_DESTRUCTOR (ICET_STATE_ENGINE_START|(IceTEnum)0x0061)
307 308 309 310 311

#define ICET_STATE_FRAME_START  (IceTEnum)0x00000080

#define ICET_IS_DRAWING_FRAME   (ICET_STATE_FRAME_START | (IceTEnum)0x0000)
#define ICET_PROJECTION_MATRIX  (ICET_STATE_FRAME_START | (IceTEnum)0x0001)
Kenneth Moreland's avatar
Kenneth Moreland committed
312 313 314 315 316 317 318 319 320 321
#define ICET_MODELVIEW_MATRIX   (ICET_STATE_FRAME_START | (IceTEnum)0x0002)
#define ICET_CONTAINED_VIEWPORT (ICET_STATE_FRAME_START | (IceTEnum)0x0003)
#define ICET_NEAR_DEPTH         (ICET_STATE_FRAME_START | (IceTEnum)0x0004)
#define ICET_FAR_DEPTH          (ICET_STATE_FRAME_START | (IceTEnum)0x0005)
#define ICET_NUM_CONTAINED_TILES (ICET_STATE_FRAME_START| (IceTEnum)0x0006)
#define ICET_CONTAINED_TILES_LIST (ICET_STATE_FRAME_START|(IceTEnum)0x0007)
#define ICET_CONTAINED_TILES_MASK (ICET_STATE_FRAME_START|(IceTEnum)0x0008)
#define ICET_ALL_CONTAINED_TILES_MASKS (ICET_STATE_FRAME_START|(IceTEnum)0x0009)
#define ICET_TILE_CONTRIB_COUNTS (ICET_STATE_FRAME_START| (IceTEnum)0x000A)
#define ICET_TOTAL_IMAGE_COUNT  (ICET_STATE_FRAME_START | (IceTEnum)0x000B)
322 323 324 325 326 327 328 329 330 331
#define ICET_NEED_BACKGROUND_CORRECTION (ICET_STATE_FRAME_START | (IceTEnum)0x000C)
#define ICET_TRUE_BACKGROUND_COLOR (ICET_STATE_FRAME_START | (IceTEnum)0x000D)
#define ICET_TRUE_BACKGROUND_COLOR_WORD (ICET_STATE_FRAME_START | (IceTEnum)0x000E)

#define ICET_VALID_PIXELS_TILE  (ICET_STATE_FRAME_START | (IceTEnum)0x0018)
#define ICET_VALID_PIXELS_OFFSET (ICET_STATE_FRAME_START | (IceTEnum)0x0019)
#define ICET_VALID_PIXELS_NUM   (ICET_STATE_FRAME_START | (IceTEnum)0x001A)

#define ICET_RENDERED_VIEWPORT  (ICET_STATE_FRAME_START | (IceTEnum)0x0020)
#define ICET_RENDER_BUFFER      (ICET_STATE_FRAME_START | (IceTEnum)0x0021)
332 333
#define ICET_PRE_RENDERED       (ICET_STATE_FRAME_START | (IceTEnum)0x0022)
#define ICET_TILE_PROJECTIONS   (ICET_STATE_FRAME_START | (IceTEnum)0x0023)
334 335 336 337 338 339 340

#define ICET_STATE_TIMING_START (IceTEnum)0x000000C0

#define ICET_RENDER_TIME        (ICET_STATE_TIMING_START | (IceTEnum)0x0001)
#define ICET_BUFFER_READ_TIME   (ICET_STATE_TIMING_START | (IceTEnum)0x0002)
#define ICET_BUFFER_WRITE_TIME  (ICET_STATE_TIMING_START | (IceTEnum)0x0003)
#define ICET_COMPRESS_TIME      (ICET_STATE_TIMING_START | (IceTEnum)0x0004)
341 342
#define ICET_INTERLACE_TIME     (ICET_STATE_TIMING_START | (IceTEnum)0x0005)
#define ICET_COMPARE_TIME       (ICET_STATE_TIMING_START | (IceTEnum)0x0006)
343
#define ICET_BLEND_TIME         ICET_COMPARE_TIME
344 345 346 347
#define ICET_COMPOSITE_TIME     (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
#define ICET_COLLECT_TIME       (ICET_STATE_TIMING_START | (IceTEnum)0x0008)
#define ICET_TOTAL_DRAW_TIME    (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
#define ICET_BYTES_SENT         (ICET_STATE_TIMING_START | (IceTEnum)0x000A)
Kenneth Moreland's avatar
Kenneth Moreland committed
348 349 350 351 352

#define ICET_DRAW_START_TIME    (ICET_STATE_TIMING_START | (IceTEnum)0x0010)
#define ICET_DRAW_TIME_ID       (ICET_STATE_TIMING_START | (IceTEnum)0x0011)
#define ICET_SUBFUNC_START_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0012)
#define ICET_SUBFUNC_TIME_ID    (ICET_STATE_TIMING_START | (IceTEnum)0x0013)
353

354 355 356 357 358 359
/* This set of state variables are reserved for the rendering layer. */
#define ICET_RENDER_LAYER_STATE_START (IceTEnum)0x00000100
#define ICET_RENDER_LAYER_STATE_END   (IceTEnum)0x00000140

#define ICET_STATE_ENABLE_START (IceTEnum)0x00000140
#define ICET_STATE_ENABLE_END   (IceTEnum)0x00000180
360 361 362 363

#define ICET_FLOATING_VIEWPORT  (ICET_STATE_ENABLE_START | (IceTEnum)0x0001)
#define ICET_ORDERED_COMPOSITE  (ICET_STATE_ENABLE_START | (IceTEnum)0x0002)
#define ICET_CORRECT_COLORED_BACKGROUND (ICET_STATE_ENABLE_START | (IceTEnum)0x0003)
364
#define ICET_COMPOSITE_ONE_BUFFER (ICET_STATE_ENABLE_START | (IceTEnum)0x0004)
365
#define ICET_INTERLACE_IMAGES   (ICET_STATE_ENABLE_START | (IceTEnum)0x0005)
366
#define ICET_COLLECT_IMAGES     (ICET_STATE_ENABLE_START | (IceTEnum)0x0006)
367
#define ICET_RENDER_EMPTY_IMAGES (ICET_STATE_ENABLE_START | (IceTEnum)0x0007)
368

369 370 371 372 373 374 375 376 377 378 379
/* This set of enable state variables are reserved for the rendering layer. */
#define ICET_RENDER_LAYER_ENABLE_START (ICET_STATE_ENABLE_START | (IceTEnum)0x0030)
#define ICET_RENDER_LAYER_ENABLE_END   (ICET_STATE_ENABLE_END)

/* These variables are used to store buffers. */
#define ICET_STATE_BUFFER_START (IceTEnum)0x00000180
#define ICET_STATE_BUFFER_END   (IceTEnum)0x00000200

#define ICET_CORE_BUFFER_START  (ICET_STATE_BUFFER_START | (IceTEnum)0x0000)
#define ICET_CORE_BUFFER_END    (ICET_STATE_BUFFER_START | (IceTEnum)0x0010)

380 381 382 383
#define ICET_TRANSFORMED_BOUNDS (ICET_CORE_BUFFER_START | (IceTEnum)0x0000)
#define ICET_CONTAINED_LIST_BUF (ICET_CORE_BUFFER_START | (IceTEnum)0x0001)
#define ICET_CONTAINED_MASK_BUF (ICET_CORE_BUFFER_START | (IceTEnum)0x0002)
#define ICET_DATA_REP_GROUP_BUF (ICET_CORE_BUFFER_START | (IceTEnum)0x0003)
384 385
#define ICET_COMM_COUNT_BUF     (ICET_CORE_BUFFER_START | (IceTEnum)0x0004)
#define ICET_COMM_OFFSET_BUF    (ICET_CORE_BUFFER_START | (IceTEnum)0x0005)
386 387 388
#define ICET_STRATEGY_COMMON_BUF_0 (ICET_CORE_BUFFER_START | (IceTEnum)0x0006)
#define ICET_STRATEGY_COMMON_BUF_1 (ICET_CORE_BUFFER_START | (IceTEnum)0x0007)
#define ICET_STRATEGY_COMMON_BUF_2 (ICET_CORE_BUFFER_START | (IceTEnum)0x0008)
389

390 391 392 393 394
#define ICET_RENDER_LAYER_BUFFER_START (ICET_STATE_BUFFER_START | (IceTEnum)0x0010)
#define ICET_RENDER_LAYER_BUFFER_END   (ICET_STATE_BUFFER_START | (IceTEnum)0x0020)

#define ICET_STRATEGY_BUFFER_START (ICET_STATE_BUFFER_START | (IceTEnum)0x0020)
#define ICET_STRATEGY_BUFFER_END   (ICET_STATE_BUFFER_START | (IceTEnum)0x0030)
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
#define ICET_NUM_STRATEGY_BUFFERS  (ICET_STRATEGY_BUFFER_END - ICET_STRATEGY_BUFFER_START)
#define ICET_STRATEGY_BUFFER_0  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0000)
#define ICET_STRATEGY_BUFFER_1  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0001)
#define ICET_STRATEGY_BUFFER_2  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0002)
#define ICET_STRATEGY_BUFFER_3  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0003)
#define ICET_STRATEGY_BUFFER_4  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0004)
#define ICET_STRATEGY_BUFFER_5  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0005)
#define ICET_STRATEGY_BUFFER_6  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0006)
#define ICET_STRATEGY_BUFFER_7  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0007)
#define ICET_STRATEGY_BUFFER_8  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0008)
#define ICET_STRATEGY_BUFFER_9  (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x0009)
#define ICET_STRATEGY_BUFFER_10 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000A)
#define ICET_STRATEGY_BUFFER_11 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000B)
#define ICET_STRATEGY_BUFFER_12 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000C)
#define ICET_STRATEGY_BUFFER_13 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000D)
#define ICET_STRATEGY_BUFFER_14 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000E)
#define ICET_STRATEGY_BUFFER_15 (ICET_STRATEGY_BUFFER_START | (IceTEnum)0x000F)

413 414
#define ICET_SI_STRATEGY_BUFFER_START   (ICET_STATE_BUFFER_START | (IceTEnum)0x0030)
#define ICET_SI_STRATEGY_BUFFER_END     (ICET_STATE_BUFFER_START | (IceTEnum)0x0040)
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
#define ICET_NUM_SI_STRATEGY_BUFFERS    (SI_STRATEGY_BUFFER_END - SI_STRATEGY_BUFFER_START)
#define ICET_SI_STRATEGY_BUFFER_0  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0000)
#define ICET_SI_STRATEGY_BUFFER_1  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0001)
#define ICET_SI_STRATEGY_BUFFER_2  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0002)
#define ICET_SI_STRATEGY_BUFFER_3  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0003)
#define ICET_SI_STRATEGY_BUFFER_4  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0004)
#define ICET_SI_STRATEGY_BUFFER_5  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0005)
#define ICET_SI_STRATEGY_BUFFER_6  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0006)
#define ICET_SI_STRATEGY_BUFFER_7  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0007)
#define ICET_SI_STRATEGY_BUFFER_8  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0008)
#define ICET_SI_STRATEGY_BUFFER_9  (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x0009)
#define ICET_SI_STRATEGY_BUFFER_10 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000A)
#define ICET_SI_STRATEGY_BUFFER_11 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000B)
#define ICET_SI_STRATEGY_BUFFER_12 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000C)
#define ICET_SI_STRATEGY_BUFFER_13 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000D)
#define ICET_SI_STRATEGY_BUFFER_14 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000E)
#define ICET_SI_STRATEGY_BUFFER_15 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000F)

433 434 435
#define ICET_COMMUNICATION_LAYER_START (ICET_STATE_BUFFER_START | (IceTEnum)0x0040)
#define ICET_COMMUNICATION_LAYER_END  (ICET_STATE_BUFFER_START | (IceTEnum)0x0050)

436
#define ICET_STATE_SIZE         (IceTEnum)0x00000200
437
#define ICET_STATE_ENGINE_END   (ICET_STATE_ENGINE_START + ICET_STATE_SIZE)
438 439 440 441 442

ICET_EXPORT void icetGetDoublev(IceTEnum pname, IceTDouble *params);
ICET_EXPORT void icetGetFloatv(IceTEnum pname, IceTFloat *params);
ICET_EXPORT void icetGetIntegerv(IceTEnum pname, IceTInt *params);
ICET_EXPORT void icetGetBooleanv(IceTEnum pname, IceTBoolean *params);
443
ICET_EXPORT void icetGetEnumv(IceTEnum pname, IceTEnum *params);
444
ICET_EXPORT void icetGetBitFieldv(IceTEnum pname, IceTBitField *bitfield);
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464
ICET_EXPORT void icetGetPointerv(IceTEnum pname, IceTVoid **params);

ICET_EXPORT void icetEnable(IceTEnum pname);
ICET_EXPORT void icetDisable(IceTEnum pname);
ICET_EXPORT IceTBoolean icetIsEnabled(IceTEnum pname);

#define ICET_NO_ERROR           (IceTEnum)0x00000000
#define ICET_SANITY_CHECK_FAIL  (IceTEnum)0xFFFFFFFF
#define ICET_INVALID_ENUM       (IceTEnum)0xFFFFFFFE
#define ICET_BAD_CAST           (IceTEnum)0xFFFFFFFD
#define ICET_OUT_OF_MEMORY      (IceTEnum)0xFFFFFFFC
#define ICET_INVALID_OPERATION  (IceTEnum)0xFFFFFFFB
#define ICET_INVALID_VALUE      (IceTEnum)0xFFFFFFFA

ICET_EXPORT IceTEnum icetGetError(void);

#ifdef __cplusplus
}
#endif

Kenneth Moreland's avatar
Kenneth Moreland committed
465
#endif /* __IceT_h */