1 /*! @header QuesaRenderer.h 2 Declares the Quesa renderer objects. 3 */ 4 /* NAME: 5 QuesaRenderer.h 6 7 DESCRIPTION: 8 Quesa public header. 9 10 COPYRIGHT: 11 Copyright (c) 1999-2004, Quesa Developers. All rights reserved. 12 13 For the current release of Quesa, please see: 14 15 <http://www.quesa.org/> 16 17 Redistribution and use in source and binary forms, with or without 18 modification, are permitted provided that the following conditions 19 are met: 20 21 o Redistributions of source code must retain the above copyright 22 notice, this list of conditions and the following disclaimer. 23 24 o Redistributions in binary form must reproduce the above 25 copyright notice, this list of conditions and the following 26 disclaimer in the documentation and/or other materials provided 27 with the distribution. 28 29 o Neither the name of Quesa nor the names of its contributors 30 may be used to endorse or promote products derived from this 31 software without specific prior written permission. 32 33 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 39 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 40 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 41 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 42 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 43 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 ___________________________________________________________________________ 45 */ 46 #ifndef QUESA_RENDERER_HDR 47 #define QUESA_RENDERER_HDR 48 //============================================================================= 49 // Include files 50 //----------------------------------------------------------------------------- 51 #include "Quesa.h" 52 53 #include "QuesaSet.h" 54 #include "QuesaView.h" 55 56 // Disable QD3D header 57 #if defined(__QD3DRENDERER__) 58 #error 59 #endif 60 61 #define __QD3DRENDERER__ 62 63 64 65 66 67 //============================================================================= 68 // C++ preamble 69 //----------------------------------------------------------------------------- 70 #ifdef __cplusplus 71 extern "C" { 72 #endif 73 74 75 76 77 78 //============================================================================= 79 // Constants 80 //----------------------------------------------------------------------------- 81 #if QUESA_ALLOW_QD3D_EXTENSIONS 82 /*! 83 * @enum Renderer Element Types 84 * @discussion 85 * These elements may be attached to renderer objects to inform a renderer of 86 * preferences. 87 * 88 * <em>These elements are not available in QD3D.</em> 89 * 90 * Typical usage: 91 * 92 * <blockquote><pre><code> 93 * TQ3Uns32 depthBits = 32; 94 * Q3Object_AddElement( theRenderer, 95 * kQ3ElementTypeDepthBits, 96 * &depthBits ); 97 * </code></pre></blockquote> 98 * 99 * @constant kQ3ElementTypeDepthBits 100 * Depth bits element type, which may be used to inform a 101 * renderer of a preferred bit depth for a depth buffer. Renderers that 102 * are not based on OpenGL will probably ignore this preference. 103 */ 104 enum 105 { 106 kQ3ElementTypeDepthBits = Q3_OBJECT_TYPE(0xF0, 'd', 'b', 'i') 107 }; 108 #endif 109 110 111 /*! 112 * @enum 113 * kQ3AttributeTypeConstructiveSolidGeometryID 114 * @discussion 115 * CSG attribute. 116 * 117 * The data for the attribute is a single TQ3CSGObjectID. 118 */ 119 enum { 120 kQ3AttributeTypeConstructiveSolidGeometryID = Q3_METHOD_TYPE('c', 's', 'g', 'i') 121 }; 122 123 124 /*! 125 * @enum 126 * TQ3CSGObjectID 127 * @discussion 128 * CSG object IDs. 129 * 130 * @constant kQ3SolidGeometryObjNone Indicates no object. 131 * @constant kQ3SolidGeometryObjA Indicates the 'A' object. 132 * @constant kQ3SolidGeometryObjB Indicates the 'B' object. 133 * @constant kQ3SolidGeometryObjC Indicates the 'C' object. 134 * @constant kQ3SolidGeometryObjD Indicates the 'D' object. 135 * @constant kQ3SolidGeometryObjE Indicates the 'E' object. 136 */ 137 typedef enum TQ3CSGObjectID { 138 kQ3SolidGeometryObjNone = -1, 139 kQ3SolidGeometryObjA = 0, 140 kQ3SolidGeometryObjB = 1, 141 kQ3SolidGeometryObjC = 2, 142 kQ3SolidGeometryObjD = 3, 143 kQ3SolidGeometryObjE = 4, 144 kQ3SolidGeometrySize32 = 0xFFFFFFFF 145 } TQ3CSGObjectID; 146 147 148 /*! 149 * @enum 150 * TQ3CSGEquation 151 * @discussion 152 * CSG equations. 153 * 154 * @constant kQ3CSGEquationAandB Indicates A and B. 155 * @constant kQ3CSGEquationAandnotB Indicates A and not B. 156 * @constant kQ3CSGEquationAanBonCad Indicates A and B on C. 157 * @constant kQ3CSGEquationnotAandB Indicates not A and B. 158 * @constant kQ3CSGEquationnAaBorCanB Indicates not A and B or C and B. 159 */ 160 typedef enum TQ3CSGEquation { 161 kQ3CSGEquationAandB = 0x88888888, 162 kQ3CSGEquationAandnotB = 0x22222222, 163 kQ3CSGEquationAanBonCad = 0x2F222F22, 164 kQ3CSGEquationnotAandB = 0x44444444, 165 kQ3CSGEquationnAaBorCanB = 0x74747474, 166 kQ3CSGEquationSize32 = 0xFFFFFFFF 167 } TQ3CSGEquation; 168 169 170 171 /*! 172 * @enum 173 * TQ3XDrawContextValidationMasks 174 * @discussion 175 * Draw Context validation mask flags. 176 * 177 * @constant kQ3XDrawContextValidationClearFlags The draw context state is valid. 178 * @constant kQ3XDrawContextValidationDoubleBuffer The double buffer state is invalid. 179 * @constant kQ3XDrawContextValidationShader The shader state is invalid. 180 * @constant kQ3XDrawContextValidationClearFunction The clear method state is invalid. 181 * @constant kQ3XDrawContextValidationActiveBuffer The active buffer state is invalid. 182 * @constant kQ3XDrawContextValidationInternalOffScreen The internal off-screen state is invalid. 183 * @constant kQ3XDrawContextValidationPane The pane state is invalid. 184 * @constant kQ3XDrawContextValidationMask The mask state is invalid. 185 * @constant kQ3XDrawContextValidationDevice The device state is invalid. 186 * @constant kQ3XDrawContextValidationWindow The window state is invalid. 187 * @constant kQ3XDrawContextValidationWindowSize The window size state is invalid. 188 * @constant kQ3XDrawContextValidationWindowClip The window clip state is invalid. 189 * @constant kQ3XDrawContextValidationWindowPosition The window position state is invalid. 190 * @constant kQ3XDrawContextValidationPlatformAttributes The platform-specific state is invalid. 191 * @constant kQ3XDrawContextValidationForegroundShader The foreground shader state is invalid. 192 * @constant kQ3XDrawContextValidationBackgroundShader The background shader state is invalid. 193 * @constant kQ3XDrawContextValidationColorPalette The color palette state is invalid (unupported). 194 * @constant kQ3XDrawContextValidationRAVETextureFilter The RAVE texture filter state is invalid (unupported). 195 * @constant kQ3XDrawContextValidationDepthState The depth testing state (glDepthMask, glDepthFunc) is invalid. 196 * @constant kQ3XDrawContextValidationAll The draw context state is invalid. 197 */ 198 typedef enum TQ3XDrawContextValidationMasks { 199 kQ3XDrawContextValidationClearFlags = 0, 200 kQ3XDrawContextValidationDoubleBuffer = (1 << 0), 201 kQ3XDrawContextValidationShader = (1 << 1), 202 kQ3XDrawContextValidationClearFunction = (1 << 2), 203 kQ3XDrawContextValidationActiveBuffer = (1 << 3), 204 kQ3XDrawContextValidationInternalOffScreen = (1 << 4), 205 kQ3XDrawContextValidationPane = (1 << 5), 206 kQ3XDrawContextValidationMask = (1 << 6), 207 kQ3XDrawContextValidationDevice = (1 << 7), 208 kQ3XDrawContextValidationWindow = (1 << 8), 209 kQ3XDrawContextValidationWindowSize = (1 << 9), 210 kQ3XDrawContextValidationWindowClip = (1 << 10), 211 kQ3XDrawContextValidationWindowPosition = (1 << 11), 212 kQ3XDrawContextValidationPlatformAttributes = (1 << 12), 213 kQ3XDrawContextValidationForegroundShader = (1 << 13), 214 kQ3XDrawContextValidationBackgroundShader = (1 << 14), 215 kQ3XDrawContextValidationColorPalette = (1 << 15), 216 kQ3XDrawContextValidationRAVETextureFilter = (1 << 16), 217 kQ3XDrawContextValidationDepthState = (1 << 17), 218 kQ3XDrawContextValidationAll = 0xFFFFFFFF, 219 kQ3XDrawContextValidationSize32 = 0xFFFFFFFF 220 } TQ3XDrawContextValidationMasks; 221 222 223 /*! 224 * @enum 225 * TQ3XDevicePixelType 226 * @discussion 227 * Draw Context pixel type. 16/32-bit pixel types use the native 228 * byte order for integers of that size. 229 * 230 * @constant kQ3XDevicePixelTypeInvalid Invalid pixel format. 231 * @constant kQ3XDevicePixelTypeRGB32 X:8, R:8, G:8, B:8. 232 * @constant kQ3XDevicePixelTypeARGB32 A:8, R:8, G:8, B:8. 233 * @constant kQ3XDevicePixelTypeRGB24 R:8, G:8, B:8. 234 * @constant kQ3XDevicePixelTypeRGB16 X:1, R:5, G:5, B:5. 235 * @constant kQ3XDevicePixelTypeARGB16 A:1, R:5, G:5, B:5. 236 * @constant kQ3XDevicePixelTypeRGB16_565 R:5, G:6, B:5. 237 * @constant kQ3XDevicePixelTypeIndexed8 8 bit colour table index (unupported). 238 * @constant kQ3XDevicePixelTypeIndexed4 4 bit colour table index (unupported). 239 * @constant kQ3XDevicePixelTypeIndexed2 2 bit colour table index (unupported). 240 * @constant kQ3XDevicePixelTypeIndexed1 1 bit colour table index (unupported). 241 */ 242 typedef enum TQ3XDevicePixelType { 243 kQ3XDevicePixelTypeInvalid = 0, 244 kQ3XDevicePixelTypeRGB32 = 1, 245 kQ3XDevicePixelTypeARGB32 = 2, 246 kQ3XDevicePixelTypeRGB24 = 3, 247 kQ3XDevicePixelTypeRGB16 = 4, 248 kQ3XDevicePixelTypeARGB16 = 5, 249 kQ3XDevicePixelTypeRGB16_565 = 6, 250 kQ3XDevicePixelTypeIndexed8 = 7, 251 kQ3XDevicePixelTypeIndexed4 = 8, 252 kQ3XDevicePixelTypeIndexed2 = 9, 253 kQ3XDevicePixelTypeIndexed1 = 10, 254 kQ3XDevicePixelTypeSize32 = 0xFFFFFFFF 255 } TQ3XDevicePixelType; 256 257 258 /*! 259 * @enum 260 * TQ3XClipMaskState 261 * @discussion 262 * Draw Context clip mask state. 263 * 264 * @constant kQ3XClipMaskFullyExposed The draw context is not exposed. 265 * @constant kQ3XClipMaskPartiallyExposed The draw context is partially exposed. 266 * @constant kQ3XClipMaskNotExposed The draw context is fully exposed. 267 */ 268 typedef enum TQ3XClipMaskState { 269 kQ3XClipMaskFullyExposed = 0, 270 kQ3XClipMaskPartiallyExposed = 1, 271 kQ3XClipMaskNotExposed = 2, 272 kQ3XClipMaskSize32 = 0xFFFFFFFF 273 } TQ3XClipMaskState; 274 275 276 /*! 277 * @enum 278 * TQ3XDrawRegionServicesMasks 279 * @discussion 280 * Draw Context services mask flags. 281 * 282 * @constant kQ3XDrawRegionServicesNoneFlag No services are supported. 283 * @constant kQ3XDrawRegionServicesClearFlag Clearing is supported (unsupported). 284 * @constant kQ3XDrawRegionServicesDontLockDDSurfaceFlag DirectDraw locking is supported (unsupported). 285 */ 286 typedef enum TQ3XDrawRegionServicesMasks { 287 kQ3XDrawRegionServicesNoneFlag = 0, 288 kQ3XDrawRegionServicesClearFlag = (1 << 0), 289 kQ3XDrawRegionServicesDontLockDDSurfaceFlag = (1 << 1), 290 kQ3XDrawRegionServicesSize32 = 0xFFFFFFFF 291 } TQ3XDrawRegionServicesMasks; 292 293 294 /*! 295 * @enum 296 * TQ3XMethodTypeRenderer 297 * @discussion 298 * Renderer method types. 299 * 300 * @constant kQ3XMethodTypeRendererIsInteractive Is the renderer interactive? 301 * @constant kQ3XMethodTypeRendererModalConfigure Display a application-modal configure dialog. 302 * @constant kQ3XMethodTypeRendererGetNickNameString Get the user-level renderer name. 303 * @constant kQ3XMethodTypeRendererGetConfigurationData Get renderer configuration data. 304 * @constant kQ3XMethodTypeRendererSetConfigurationData Set renderer configuration data. 305 * @constant kQ3XMethodTypeRendererStartFrame Start a frame. 306 * @constant kQ3XMethodTypeRendererStartPass Start a pass within a frame. 307 * @constant kQ3XMethodTypeRendererFlushFrame Flush a frame. 308 * @constant kQ3XMethodTypeRendererEndPass End a pass within a frame. 309 * @constant kQ3XMethodTypeRendererEndFrame End a frame. 310 * @constant kQ3XMethodTypeRendererCancel Cancel rendering. 311 * @constant kQ3XMethodTypeRendererPush Push the renderer state. 312 * @constant kQ3XMethodTypeRendererPop Pop the renderer state. 313 * @constant kQ3XMethodTypeRendererIsBoundingBoxVisible Is a local-coordinate bounding box visible to the camera? 314 * @constant kQ3XMethodTypeRendererSubmitGeometryMetaHandler Meta-handler for geometry methods. 315 * @constant kQ3XMethodTypeRendererSubmitCameraMetaHandler Meta-handler for camera methods. 316 * @constant kQ3XMethodTypeRendererSubmitLightMetaHandler Meta-handler for light methods. 317 * @constant kQ3XMethodTypeRendererUpdateStyleMetaHandler Meta-handler for style methods. 318 * @constant kQ3XMethodTypeRendererUpdateAttributeMetaHandler Meta-handler for attribute methods. 319 * @constant kQ3XMethodTypeRendererUpdateShaderMetaHandler Meta-handler for shader methods. 320 * @constant kQ3XMethodTypeRendererUpdateMatrixMetaHandler Meta-handler for matrix methods. 321 * @constant kQ3XMethodTypeRendererUpdateMatrixLocalToWorld The local-to-world matrix state has changed. 322 * @constant kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverse The inverse-local-to-world matrix state has changed. 323 * @constant kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverseTranspose The inverse-transpose-local-to-world matrix state has changed. 324 * @constant kQ3XMethodTypeRendererUpdateMatrixLocalToCamera The local-to-camera matrix state has changed. 325 * @constant kQ3XMethodTypeRendererUpdateMatrixLocalToFrustum The local-to-frustum matrix state has changed. 326 * @constant kQ3XMethodTypeRendererUpdateMatrixWorldToCamera The world-to-camera matrix state has changed. Not available in QD3D. 327 * @constant kQ3XMethodTypeRendererUpdateMatrixWorldToFrustum The world-to-frustum matrix state has changed. 328 * @constant kQ3XMethodTypeRendererUpdateMatrixCameraToFrustum The camera-to-frustum matrix state has changed. Not available in QD3D. 329 330 */ 331 typedef enum TQ3XMethodTypeRenderer { 332 kQ3XMethodTypeRendererIsInteractive = Q3_METHOD_TYPE('i', 's', 'i', 'n'), 333 kQ3XMethodTypeRendererModalConfigure = Q3_METHOD_TYPE('r', 'd', 'm', 'c'), 334 kQ3XMethodTypeRendererGetNickNameString = Q3_METHOD_TYPE('r', 'd', 'n', 's'), 335 kQ3XMethodTypeRendererGetConfigurationData = Q3_METHOD_TYPE('r', 'd', 'g', 'p'), 336 kQ3XMethodTypeRendererSetConfigurationData = Q3_METHOD_TYPE('r', 'd', 's', 'p'), 337 kQ3XMethodTypeRendererStartFrame = Q3_METHOD_TYPE('r', 'd', 'c', 'l'), 338 kQ3XMethodTypeRendererStartPass = Q3_METHOD_TYPE('r', 'd', 's', 't'), 339 kQ3XMethodTypeRendererFlushFrame = Q3_METHOD_TYPE('r', 'd', 'f', 'l'), 340 kQ3XMethodTypeRendererEndPass = Q3_METHOD_TYPE('r', 'd', 'e', 'd'), 341 kQ3XMethodTypeRendererEndFrame = Q3_METHOD_TYPE('r', 'd', 's', 'y'), 342 kQ3XMethodTypeRendererCancel = Q3_METHOD_TYPE('r', 'd', 'a', 'b'), 343 kQ3XMethodTypeRendererPush = Q3_METHOD_TYPE('r', 'd', 'p', 's'), 344 kQ3XMethodTypeRendererPop = Q3_METHOD_TYPE('r', 'd', 'p', 'o'), 345 kQ3XMethodTypeRendererIsBoundingBoxVisible = Q3_METHOD_TYPE('r', 'd', 'b', 'x'), 346 kQ3XMethodTypeRendererSubmitGeometryMetaHandler = Q3_METHOD_TYPE('r', 'd', 'g', 'm'), 347 kQ3XMethodTypeRendererSubmitCameraMetaHandler = Q3_METHOD_TYPE('r', 'd', 'c', 'm'), 348 kQ3XMethodTypeRendererSubmitLightMetaHandler = Q3_METHOD_TYPE('r', 'd', 'l', 'g'), 349 kQ3XMethodTypeRendererUpdateStyleMetaHandler = Q3_METHOD_TYPE('r', 'd', 'y', 'u'), 350 kQ3XMethodTypeRendererUpdateAttributeMetaHandler = Q3_METHOD_TYPE('r', 'd', 'a', 'u'), 351 kQ3XMethodTypeRendererUpdateShaderMetaHandler = Q3_METHOD_TYPE('r', 'd', 's', 'u'), 352 kQ3XMethodTypeRendererUpdateMatrixMetaHandler = Q3_METHOD_TYPE('r', 'd', 'x', 'u'), 353 kQ3XMethodTypeRendererUpdateMatrixLocalToWorld = Q3_METHOD_TYPE('u', 'l', 'w', 'x'), 354 kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverse = Q3_METHOD_TYPE('u', 'l', 'w', 'i'), 355 kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverseTranspose = Q3_METHOD_TYPE('u', 'l', 'w', 't'), 356 kQ3XMethodTypeRendererUpdateMatrixLocalToCamera = Q3_METHOD_TYPE('u', 'l', 'c', 'x'), 357 kQ3XMethodTypeRendererUpdateMatrixLocalToFrustum = Q3_METHOD_TYPE('u', 'l', 'f', 'x'), 358 #if QUESA_ALLOW_QD3D_EXTENSIONS 359 kQ3XMethodTypeRendererUpdateMatrixWorldToCamera = Q3_METHOD_TYPE('u', 'w', 'c', 'x'), 360 #endif 361 kQ3XMethodTypeRendererUpdateMatrixWorldToFrustum = Q3_METHOD_TYPE('u', 'w', 'f', 'x'), 362 #if QUESA_ALLOW_QD3D_EXTENSIONS 363 kQ3XMethodTypeRendererUpdateMatrixCameraToFrustum = Q3_METHOD_TYPE('u', 'c', 'f', 'x'), 364 #endif 365 kQ3XMethodTypeRendererSize32 = 0xFFFFFFFF 366 } TQ3XMethodTypeRenderer; 367 368 369 /*! 370 * @enum 371 * TQ3TextureFilter 372 * @discussion 373 * Texture filter type. 374 * 375 * @constant kQATextureFilter_Fast Select nearest pixel. 376 * @constant kQATextureFilter_Mid Perform basic filtering. 377 * @constant kQATextureFilter_Best Perform high quality filtering. 378 */ 379 typedef enum TQ3TextureFilter { 380 kQATextureFilter_Fast = 0, 381 kQATextureFilter_Mid = 1, 382 kQATextureFilter_Best = 2, 383 kQATextureFilter_Size32 = 0xFFFFFFFF 384 } TQ3TextureFilter; 385 386 387 /*! 388 * @enum 389 * TQ3RaveVendorID 390 * @discussion 391 * RAVE vendor IDs. Obsolete, but preserved for source compatibility. 392 * 393 * @constant kQAVendor_BestChoice Selects the best choice for the target device. 394 * @constant kQAVendor_Apple Apple. 395 * @constant kQAVendor_ATI ATI. 396 * @constant kQAVendor_Radius Radius. 397 * @constant kQAVendor_DesignMark DesignMark. 398 * @constant kQAVendor_Matrix Matrox. 399 * @constant kQAVendor_Yarc Yarc. 400 * @constant kQAVendor_DiamondMM Diamond. 401 * @constant kQAVendor_3DLabs 3D Labs. 402 * @constant kQAVendor_D3DAdaptor D3D shim. 403 * @constant kQAVendor_IXMicro IXMicro. 404 * @constant kQAVendor_NumberNine Number Nine. 405 * @constant kQAVendor_MicroConversions MicroConversions. 406 * @constant kQAVendor_PurpleShark Purple Shark D3D shim. 407 * @constant kQAVendor_VillageTronic VillageTronic. 408 */ 409 typedef enum TQ3RaveVendorID { 410 kQAVendor_BestChoice = -1, 411 kQAVendor_Apple = 0, 412 kQAVendor_ATI = 1, 413 kQAVendor_Radius = 2, 414 kQAVendor_DesignMark = 3, 415 kQAVendor_Matrox = 4, 416 kQAVendor_Yarc = 5, 417 kQAVendor_DiamondMM = 6, 418 kQAVendor_3DLabs = 7, 419 kQAVendor_D3DAdaptor = 8, 420 kQAVendor_IXMicro = 9, 421 kQAVendor_NumberNine = 10, 422 kQAVendor_MicroConversions = 11, 423 kQAVendor_PurpleShark = 12, 424 kQAVendor_VillageTronic = 14, 425 kQAVendor_Size32 = 0xFFFFFFFF 426 } TQ3RaveVendorID; 427 428 429 /*! 430 * @enum 431 * TQ3RaveEngineID 432 * @discussion 433 * RAVE engine IDs. Obsolete, but preserved for source compatibility. 434 * 435 * @constant kQAEngine_AppleSW Default software rasterizer. 436 * @constant kQAEngine_AppleHW Apple accelerator. 437 * @constant kQAEngine_AppleHW2 Another Apple accelerator. 438 * @constant kQAEngine_AppleHW3 Yet another Apple accelerator. 439 */ 440 typedef enum TQ3RaveEngineID { 441 kQAEngine_AppleSW = 0, 442 kQAEngine_AppleHW = -1, 443 kQAEngine_AppleHW2 = 1, 444 kQAEngine_AppleHW3 = 2, 445 kQAEngine_Size32 = 0xFFFFFFFF 446 } TQ3RaveEngineID; 447 448 449 450 451 452 //============================================================================= 453 // Types 454 //----------------------------------------------------------------------------- 455 // Renderer types (deprecated) 456 typedef TQ3Uns32 TQ3XDrawContextValidation; 457 typedef TQ3Uns32 TQ3XDrawRegionServices; 458 typedef struct OpaqueTQ3XDrawRegion *TQ3XDrawRegion; 459 460 461 // RAVE types (deprecated) 462 typedef struct TQADrawContext TQADrawContext; 463 typedef struct TQAEngine TQAEngine; 464 465 466 /*! 467 * @struct 468 * TQ3XColorDescriptor 469 * @discussion 470 * Draw region color descriptor. 471 * 472 * @field redShift Shift for red bits. 473 * @field redMask Mask for red bits. 474 * @field greenShift Shift for green bits. 475 * @field greenMask Mask for green bits. 476 * @field blueShift Shift for blue bits. 477 * @field blueMask Mask for blue bits. 478 * @field alphaShift Shift for alpha bits. 479 * @field alphaMask Mask for alpha bits. 480 */ 481 typedef struct TQ3XColorDescriptor { 482 TQ3Uns32 redShift; 483 TQ3Uns32 redMask; 484 TQ3Uns32 greenShift; 485 TQ3Uns32 greenMask; 486 TQ3Uns32 blueShift; 487 TQ3Uns32 blueMask; 488 TQ3Uns32 alphaShift; 489 TQ3Uns32 alphaMask; 490 } TQ3XColorDescriptor; 491 492 493 /*! 494 * @struct 495 * TQ3XDrawRegionDescriptor 496 * @discussion 497 * Draw region descriptor. 498 * 499 * @field width Width of draw region. 500 * @field height Height of draw region. 501 * @field rowBytes Row stride of draw region. 502 * @field pixelSize Pixel size of draw region. 503 * @field pixelType Pixel type of draw region. 504 * @field colorDescriptor Color descriptor of draw region. 505 * @field bitOrder Bit order of draw region. 506 * @field byteOrder Byte order of draw region. 507 * @field clipMask Clipping mask for draw region (may be NULL). 508 */ 509 typedef struct TQ3XDrawRegionDescriptor { 510 TQ3Uns32 width; 511 TQ3Uns32 height; 512 TQ3Uns32 rowBytes; 513 TQ3Uns32 pixelSize; 514 TQ3XDevicePixelType pixelType; 515 TQ3XColorDescriptor colorDescriptor; 516 TQ3Endian bitOrder; 517 TQ3Endian byteOrder; 518 TQ3Bitmap *clipMask; 519 } TQ3XDrawRegionDescriptor; 520 521 522 /*! 523 * @typedef 524 * TQ3RaveDestroyCallback 525 * @discussion 526 * RAVE destroy callback. 527 * 528 * Not supported in Quesa. 529 * 530 * @param theRenderer The renderer being destroyed. 531 */ 532 typedef Q3_CALLBACK_API_C(void, TQ3RaveDestroyCallback)( 533 TQ3RendererObject theRenderer); 534 535 536 /*! 537 * @typedef 538 * TQ3XDrawRegionRendererPrivateDeleteMethod 539 * @discussion 540 * Draw region private delete callback. 541 * 542 * Not supported in Quesa. 543 * 544 * @param rendererPrivate The private data to delete. 545 */ 546 typedef Q3_CALLBACK_API_C(void, TQ3XDrawRegionRendererPrivateDeleteMethod)( 547 void *rendererPrivate); 548 549 550 /*! 551 * @typedef 552 * TQ3XRendererGetNickNameStringMethod 553 * @discussion 554 * Get the renderer "nick name". 555 * 556 * The "nick name" is the user-visible name for the renderer, and should be 557 * suitable for display in a menu or window (e.g., it may need to be localised 558 * for the current language). 559 * 560 * If dataBuffer is NULL, actualDataSize returns the size in bytes of a buffer 561 * which could receive the entire renderer nick name. 562 * 563 * This method is optional. 564 * 565 * @param dataBuffer Buffer to receive the renderer nick name. 566 * @param bufferSize The number of bytes pointed to by dataBuffer. 567 * @param actualDataSize Receives the number of bytes written to dataBuffer. 568 * @result Success or failure of the callback. 569 */ 570 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererGetNickNameStringMethod)( 571 unsigned char *dataBuffer, 572 TQ3Uns32 bufferSize, 573 TQ3Uns32 *actualDataSize); 574 575 576 /*! 577 * @typedef 578 * TQ3XRendererGetConfigurationDataMethod 579 * @discussion 580 * Get the renderer configuration data. 581 * 582 * If dataBuffer is NULL, actualDataSize returns the size in bytes of a buffer 583 * which could receive the renderer data. 584 * 585 * This method is optional. 586 * 587 * @param theRenderer The renderer object. 588 * @param dataBuffer Buffer to receive the renderer configuration data. 589 * @param bufferSize The number of bytes pointed to by dataBuffer. 590 * @param actualDataSize Receives the number of bytes written to dataBuffer. 591 * @param rendererPrivate Renderer-specific instance data. 592 * @result Success or failure of the callback. 593 */ 594 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererGetConfigurationDataMethod)( 595 TQ3RendererObject theRenderer, 596 unsigned char *dataBuffer, 597 TQ3Uns32 bufferSize, 598 TQ3Uns32 *actualDataSize, 599 void *rendererPrivate); 600 601 602 /*! 603 * @typedef 604 * TQ3XRendererSetConfigurationDataMethod 605 * @discussion 606 * Set the renderer configuration data. 607 * 608 * This method is optional. 609 * 610 * @param theRenderer The renderer object. 611 * @param dataBuffer Buffer containing the renderer configuration data. 612 * @param bufferSize The number of bytes pointed to by dataBuffer. 613 * @param rendererPrivate Renderer-specific instance data. 614 * @result Success or failure of the callback. 615 */ 616 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererSetConfigurationDataMethod)( 617 TQ3RendererObject theRenderer, 618 unsigned char *dataBuffer, 619 TQ3Uns32 bufferSize, 620 void *rendererPrivate); 621 622 623 /*! 624 * @typedef 625 * TQ3XRendererStartFrameMethod 626 * @discussion 627 * Invoked by Q3View_StartRendering to start a new frame. 628 * 629 * The renderer should prepare to render another frame. This may require 630 * the initialisation of per-frame state, and the clearing of the draw 631 * context (depending on the draw context's clear method). 632 * 633 * This method is required. 634 * 635 * @param theView The view being rendered to. 636 * @param rendererPrivate Renderer-specific instance data. 637 * @param theDrawContext The draw context associated with the view. 638 * @result Success or failure of the callback. 639 */ 640 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererStartFrameMethod)( 641 TQ3ViewObject theView, 642 void *rendererPrivate, 643 TQ3DrawContextObject theDrawContext); 644 645 646 /*! 647 * @typedef 648 * TQ3XRendererStartPassMethod 649 * @discussion 650 * Invoked by Q3View_StartRendering to start a new pass. 651 * 652 * The renderer should prepare to render another pass of the current frame. 653 * This may require the initialisation of per-pass state, and setting up 654 * the renderer's camera and light representations for rendering. 655 * 656 * This method is required. 657 * 658 * @param theView The view being rendered to. 659 * @param rendererPrivate Renderer-specific instance data. 660 * @param theCamera The camera associated with the view. 661 * @param theLights The light group associated with the view. 662 * @result Success or failure of the callback. 663 */ 664 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererStartPassMethod)( 665 TQ3ViewObject theView, 666 void *rendererPrivate, 667 TQ3CameraObject theCamera, 668 TQ3GroupObject theLights); 669 670 671 /*! 672 * @typedef 673 * TQ3XRendererFlushFrameMethod 674 * @discussion 675 * Invoked by Q3View_Flush to flush rendering. 676 * 677 * The renderer should flush the rendering of objects which have been submitted 678 * so far, and produce an image from the currently accumulated drawing state. 679 * 680 * This method is optional and should only be implemented by asynchronous renderers. 681 * 682 * @param theView The view being rendered to. 683 * @param rendererPrivate Renderer-specific instance data. 684 * @param theDrawContext The draw context associated with the view. 685 * @result Success or failure of the callback. 686 */ 687 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererFlushFrameMethod)( 688 TQ3ViewObject theView, 689 void *rendererPrivate, 690 TQ3DrawContextObject theDrawContext); 691 692 693 /*! 694 * @typedef 695 * TQ3XRendererEndPassMethod 696 * @discussion 697 * Invoked by Q3View_EndRendering to end the current pass. 698 * 699 * The renderer should return kQ3ViewStatusRetraverse if the view should 700 * loop and submit another pass for the current frame, or kQ3ViewStatusDone 701 * if the scene has been rendered successfully. 702 * 703 * If rendering was cancelled, this method will not be called and the view 704 * will return kQ3ViewStatusCancelled to the application. 705 * 706 * This method is required. 707 * 708 * @param theView The view being rendered to. 709 * @param rendererPrivate Renderer-specific instance data. 710 * @result The result for the view submit loop. 711 */ 712 typedef Q3_CALLBACK_API_C(TQ3ViewStatus, TQ3XRendererEndPassMethod)( 713 TQ3ViewObject theView, 714 void *rendererPrivate); 715 716 717 /*! 718 * @typedef 719 * TQ3XRendererEndFrameMethod 720 * @discussion 721 * Invoked by Q3View_Sync via Q3View_EndRendering to end the current frame. 722 * 723 * This method is optional and should only be implemented by asynchronous renderers. 724 * 725 * @param theView The view being rendered to. 726 * @param rendererPrivate Renderer-specific instance data. 727 * @param theDrawContext The draw context associated with the view. 728 * @result Success or failure of the callback. 729 */ 730 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererEndFrameMethod)( 731 TQ3ViewObject theView, 732 void *rendererPrivate, 733 TQ3DrawContextObject theDrawContext); 734 735 736 /*! 737 * @typedef 738 * TQ3XRendererCancelMethod 739 * @discussion 740 * Cancel the current rendering frame. 741 * 742 * This method is invoked if a frame is cancelled within a rendering loop, 743 * and allows renderers to clean up as the current render is terminated. 744 * 745 * This method is required. 746 * 747 * @param theView The view being rendered to. 748 * @param rendererPrivate Renderer-specific instance data. 749 */ 750 typedef Q3_CALLBACK_API_C(void, TQ3XRendererCancelMethod)( 751 TQ3ViewObject theView, 752 void *rendererPrivate); 753 754 755 /*! 756 * @typedef 757 * TQ3XRendererPushMethod 758 * @discussion 759 * Push the current renderer state. 760 * 761 * Renderers which implement the RendererPush/RendererPop methods must 762 * maintain their own view state stack while rendering. If a renderer 763 * does not supply these methods, Quesa will automatically send the 764 * required state changes to implement a push/pop operation. 765 * 766 * This method is optional. 767 * 768 * @param theView The view being rendered to. 769 * @param rendererPrivate Renderer-specific instance data. 770 * @result Success or failure of the callback. 771 */ 772 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererPushMethod)( 773 TQ3ViewObject theView, 774 void *rendererPrivate); 775 776 777 /*! 778 * @typedef 779 * TQ3XRendererPopMethod 780 * @discussion 781 * Pop the current renderer state. 782 * 783 * Renderers which implement the RendererPush/RendererPop methods must 784 * maintain their own view state stack while rendering. If a renderer 785 * does not supply these methods, Quesa will automatically send the 786 * required state changes to implement a push/pop operation. 787 * 788 * This method is optional. 789 * 790 * @param theView The view being rendered to. 791 * @param rendererPrivate Renderer-specific instance data. 792 * @result Success or failure of the callback. 793 */ 794 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererPopMethod)( 795 TQ3ViewObject theView, 796 void *rendererPrivate); 797 798 799 /*! 800 * @typedef 801 * TQ3XRendererIsBoundingBoxVisibleMethod 802 * @discussion 803 * Test a local-coordinate bounding box for visibility. 804 * 805 * Renderers should return a TQ3Boolean indicating if the bounding box 806 * would be partially or wholly contained within the viewing frustum 807 * for this frame. 808 * 809 * This may simply require testing against the viewing frustum volume, 810 * or more complex tests may be required if objects outside the frustum 811 * are able to contribute to the scene (e.g., via reflections). 812 * 813 * This method is optional. 814 * 815 * @param theView The view being rendered to. 816 * @param rendererPrivate Renderer-specific instance data. 817 * @param theBounds The bounding box to test. 818 * @result The visibility of the bounding box. 819 */ 820 typedef Q3_CALLBACK_API_C(TQ3Boolean, TQ3XRendererIsBoundingBoxVisibleMethod)( 821 TQ3ViewObject theView, 822 void *rendererPrivate, 823 const TQ3BoundingBox *theBounds); 824 825 826 /*! 827 * @typedef 828 * TQ3XRendererSubmitGeometryMetaHandlerMethod 829 * @discussion 830 * Return the submit method for a geometry type. 831 * 832 * Renderers should return a TQ3XRendererSubmitGeometryMetaHandlerMethod to 833 * be invoked when a geometry of the supplied type is submitted for rendering. 834 * If a particular geometry type is not supported, return NULL. 835 * 836 * Geometries which do not have their own submit method will be decomposed to 837 * more primitive geometry types, which will then be submitted as one of the 838 * following types (which all renderers must support): 839 * 840 * kQ3GeometryTypeTriangle 841 * kQ3GeometryTypeLine 842 * kQ3GeometryTypePoint 843 * kQ3GeometryTypeMarker 844 * kQ3GeometryTypePixmapMarker 845 * 846 * This method is required. 847 * 848 * @param geometryType The geometry type whose submit method is requested. 849 * @result The submit method for geometries of type geometryType. 850 */ 851 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererSubmitGeometryMetaHandlerMethod)( 852 TQ3ObjectType geometryType); 853 854 855 /*! 856 * @typedef 857 * TQ3XRendererSubmitGeometryMethod 858 * @discussion 859 * Submits a geometry object for rendering. 860 * 861 * If a geometry object is submitted in retained mode, theGeometry will be 862 * a valid geometry object and publicData will point to the public data 863 * structure describing that object. 864 * 865 * If a geometry is submitted in immediate mode, theGeometry will be NULL 866 * and publicData will point to the data structure submitted for rendering. 867 * 868 * Renderers should therefore try and render from the data contained in the 869 * publicData structure, however a reference to the geometry object may be 870 * useful (and can be retained if necessary, provided it is later released) 871 * in some circumstances. 872 * 873 * This method is required. 874 * 875 * @param theView The view being rendered to. 876 * @param rendererPrivate Renderer-specific instance data. 877 * @param theGeometry The geometry object being submitted, or NULL. 878 * @param publicData The public data for the geometry being submitted. 879 * @result Success or failure of the callback. 880 */ 881 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererSubmitGeometryMethod)( 882 TQ3ViewObject theView, 883 void *rendererPrivate, 884 TQ3GeometryObject theGeometry, 885 const void *publicData); 886 887 888 /*! 889 * @typedef 890 * TQ3XRendererSubmitCameraMetaHandlerMethod 891 * @discussion 892 * Return the submit method for a camera type. 893 * 894 * Renderers should return a TQ3XRendererSubmitCameraMethod to be invoked when 895 * a camera of the supplied type is used for rendering. 896 * 897 * This method is optional. 898 * 899 * @param cameraType The camera type whose submit method is requested. 900 * @result The submit method for cameras of type cameraType. 901 */ 902 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererSubmitCameraMetaHandlerMethod)( 903 TQ3ObjectType cameraType); 904 905 906 /*! 907 * @typedef 908 * TQ3XRendererSubmitCameraMethod 909 * @discussion 910 * Submits a camera object for rendering. 911 * 912 * Note that the camera used for rendering is also passed to the 913 * StartPass method. 914 * 915 * This method is required. 916 * 917 * @param theView The view being rendered to. 918 * @param rendererPrivate Renderer-specific instance data. 919 * @param theCamera The camera object being submitted, or NULL. 920 * @param publicData The public data for the camera being submitted. 921 * @result Success or failure of the callback. 922 */ 923 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererSubmitCameraMethod)( 924 TQ3ViewObject theView, 925 void *rendererPrivate, 926 TQ3CameraObject theCamera, 927 const void *publicData); 928 929 930 /*! 931 * @typedef 932 * TQ3XRendererSubmitLightMetaHandlerMethod 933 * @discussion 934 * Return the submit method for a light type. 935 * 936 * Renderers should return a TQ3XRendererSubmitLightMethod to be invoked when 937 * a light of the supplied type is used for rendering. 938 * 939 * This method is optional. 940 * 941 * @param cameraType The camera type whose submit method is requested. 942 * @result The submit method for cameras of type cameraType. 943 */ 944 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererSubmitLightMetaHandlerMethod)( 945 TQ3ObjectType lightType); 946 947 948 /*! 949 * @typedef 950 * TQ3XRendererSubmitLightMethod 951 * @discussion 952 * Submits a light object for rendering. 953 * 954 * Note that the light group used for rendering is also passed to the 955 * StartPass method. 956 * 957 * This method is required. 958 * 959 * @param theView The view being rendered to. 960 * @param rendererPrivate Renderer-specific instance data. 961 * @param theLight The light object being submitted, or NULL. 962 * @param publicData The public data for the light being submitted. 963 * @result Success or failure of the callback. 964 */ 965 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererSubmitLightMethod)( 966 TQ3ViewObject theView, 967 void *rendererPrivate, 968 TQ3LightObject theLight, 969 const void *publicData); 970 971 972 /*! 973 * @typedef 974 * TQ3XRendererUpdateStyleMetaHandlerMethod 975 * @discussion 976 * Return the update method for a style type. 977 * 978 * Renderers should return a TQ3XRendererUpdateStyleMethod to be invoked when 979 * the state of the supplied style type is changed while rendering. 980 * 981 * This method is optional. 982 * 983 * @param styleType The style type whose update method is requested. 984 * @result The update method for styles of type styleType. 985 */ 986 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererUpdateStyleMetaHandlerMethod)( 987 TQ3ObjectType styleType); 988 989 990 /*! 991 * @typedef 992 * TQ3XRendererUpdateStyleMethod 993 * @discussion 994 * Update the the state of a style while rendering. 995 * 996 * This method is optional. 997 * 998 * @param theView The view being rendered to. 999 * @param rendererPrivate Renderer-specific instance data. 1000 * @param publicData The public data for the style being submitted. 1001 * @result Success or failure of the callback. 1002 */ 1003 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererUpdateStyleMethod)( 1004 TQ3ViewObject theView, 1005 void *rendererPrivate, 1006 const void *publicData); 1007 1008 1009 /*! 1010 * @typedef 1011 * TQ3XRendererUpdateAttributeMetaHandlerMethod 1012 * @discussion 1013 * Return the update method for an attribute type. 1014 * 1015 * Renderers should return a TQ3XRendererUpdateAttributeMethod to be invoked when 1016 * the state of the supplied attribute type is changed while rendering. 1017 * 1018 * This method is optional. 1019 * 1020 * @param attributeType The attribute type whose update method is requested. 1021 * @result The update method for attributes of type attributeType. 1022 */ 1023 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererUpdateAttributeMetaHandlerMethod)( 1024 TQ3AttributeType attributeType); 1025 1026 1027 /*! 1028 * @typedef 1029 * TQ3XRendererUpdateAttributeMethod 1030 * @discussion 1031 * Update the the state of an attribute while rendering. 1032 * 1033 * This method is optional. 1034 * 1035 * @param theView The view being rendered to. 1036 * @param rendererPrivate Renderer-specific instance data. 1037 * @param publicData The public data for the attribute being submitted. 1038 * @result Success or failure of the callback. 1039 */ 1040 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererUpdateAttributeMethod)( 1041 TQ3ViewObject theView, 1042 void *rendererPrivate, 1043 const void *publicData); 1044 1045 1046 /*! 1047 * @typedef 1048 * TQ3XRendererUpdateShaderMetaHandlerMethod 1049 * @discussion 1050 * Return the update method for a shader type. 1051 * 1052 * Renderers should return a TQ3XRendererUpdateShaderMethod to be invoked when 1053 * the state of the supplied shader type is changed while rendering. 1054 * 1055 * This method is optional. 1056 * 1057 * @param shaderType The shader type whose update method is requested. 1058 * @result The update method for shaders of type shaderType. 1059 */ 1060 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererUpdateShaderMetaHandlerMethod)( 1061 TQ3ObjectType shaderType); 1062 1063 1064 /*! 1065 * @typedef 1066 * TQ3XRendererUpdateShaderMethod 1067 * @discussion 1068 * Update the the state of a shader while rendering. 1069 * 1070 * This method is optional. 1071 * 1072 * @param theView The view being rendered to. 1073 * @param rendererPrivate Renderer-specific instance data. 1074 * @param publicData The public data for the shader being submitted. 1075 * @result Success or failure of the callback. 1076 */ 1077 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererUpdateShaderMethod)( 1078 TQ3ViewObject theView, 1079 void *rendererPrivate, 1080 TQ3Object *theShader); 1081 1082 1083 /*! 1084 * @typedef 1085 * TQ3XRendererUpdateMatrixMetaHandlerMethod 1086 * @discussion 1087 * Return the update method for a matrix type. 1088 * 1089 * Renderers should return a TQ3XRendererUpdateMatrixMethod to be invoked when 1090 * the state of the supplied matrix type is changed while rendering. 1091 * 1092 * This method is optional. 1093 * 1094 * @param matrixType The matrix type whose update method is requested. 1095 * @result The update method for matrices of type matrixType. 1096 */ 1097 typedef Q3_CALLBACK_API_C(TQ3XFunctionPointer, TQ3XRendererUpdateMatrixMetaHandlerMethod)( 1098 TQ3ObjectType matrixType); 1099 1100 1101 /*! 1102 * @typedef 1103 * TQ3XRendererUpdateMatrixMethod 1104 * @discussion 1105 * Update the the state of a matrix while rendering. 1106 * 1107 * This method is optional. 1108 * 1109 * @param theView The view being rendered to. 1110 * @param rendererPrivate Renderer-specific instance data. 1111 * @param publicData The public data for the matrix being submitted. 1112 * @result Success or failure of the callback. 1113 */ 1114 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererUpdateMatrixMethod)( 1115 TQ3ViewObject theView, 1116 void *rendererPrivate, 1117 const TQ3Matrix4x4 *theMatrix); 1118 1119 1120 1121 1122 1123 //============================================================================= 1124 // Mac OS types 1125 //----------------------------------------------------------------------------- 1126 #if QUESA_OS_MACINTOSH && ! QUESA_OS_COCOA 1127 1128 /*! 1129 * @typedef 1130 * TQ3MacOSDialogEventHandler 1131 * @discussion 1132 * Mac OS application event callback. 1133 * 1134 * Modal renderer configure dialogs invoke this callback with events 1135 * which are not handled by the dialog. If the application handles 1136 * the event it should return kQ3True, or kQ3False to have the dialog 1137 * pass the event to the system unhandled. 1138 * 1139 * @param theEvent The event to process. 1140 * @result Did the application handle the event. 1141 */ 1142 typedef Q3_CALLBACK_API_C(TQ3Boolean, TQ3MacOSDialogEventHandler)( 1143 const EventRecord *theEvent); 1144 1145 1146 /*! 1147 * @struct 1148 * TQ3DialogAnchor 1149 * @discussion 1150 * Mac OS dialog anchor. 1151 * 1152 * Supplied to Q3Renderer_ModalConfigure to pass platform-specific 1153 * dialog state to the renderer. 1154 * 1155 * @field clientEventHandler The application event handler. 1156 */ 1157 typedef struct TQ3DialogAnchor { 1158 TQ3MacOSDialogEventHandler clientEventHandler; 1159 } TQ3DialogAnchor; 1160 1161 #endif // QUESA_OS_MACINTOSH 1162 1163 1164 1165 1166 1167 //============================================================================= 1168 // Windows types 1169 //----------------------------------------------------------------------------- 1170 #if QUESA_OS_WIN32 1171 1172 /*! 1173 * @struct 1174 * TQ3DialogAnchor 1175 * @discussion 1176 * Windows dialog anchor. 1177 * 1178 * Supplied to Q3Renderer_ModalConfigure to pass platform-specific 1179 * dialog state to the renderer. 1180 * 1181 * @field ownerWindow The parent window of the configure dialog. 1182 */ 1183 typedef struct TQ3DialogAnchor { 1184 HWND ownerWindow; 1185 } TQ3DialogAnchor; 1186 1187 #endif // QUESA_OS_WIN32 1188 1189 1190 1191 1192 1193 //============================================================================= 1194 // Unix types 1195 //----------------------------------------------------------------------------- 1196 #if QUESA_OS_UNIX 1197 1198 /*! 1199 * @struct 1200 * TQ3DialogAnchor 1201 * @discussion 1202 * Unix dialog anchor. 1203 * 1204 * Supplied to Q3Renderer_ModalConfigure to pass platform-specific 1205 * dialog state to the renderer. 1206 * 1207 * @field notUsed Not used. 1208 */ 1209 typedef struct TQ3DialogAnchor { 1210 void *notUsed; 1211 } TQ3DialogAnchor; 1212 1213 #endif // QUESA_OS_UNIX 1214 1215 1216 1217 1218 1219 //============================================================================= 1220 // Be OS types 1221 //----------------------------------------------------------------------------- 1222 #if QUESA_OS_BE 1223 1224 /*! 1225 * @struct 1226 * TQ3DialogAnchor 1227 * @discussion 1228 * Be dialog anchor. 1229 * 1230 * Supplied to Q3Renderer_ModalConfigure to pass platform-specific 1231 * dialog state to the renderer. 1232 * 1233 * @field ownerWindow The parent window of the configure dialog. 1234 */ 1235 typedef struct TQ3DialogAnchor { 1236 BWindow *ownerWindow; 1237 } TQ3DialogAnchor; 1238 1239 #endif // QUESA_OS_BE 1240 1241 1242 1243 1244 1245 //============================================================================= 1246 // Cocoa types 1247 //----------------------------------------------------------------------------- 1248 #if QUESA_OS_COCOA 1249 1250 /*! 1251 * @struct 1252 * TQ3DialogAnchor 1253 * @discussion 1254 * Cocoa dialog anchor. 1255 * 1256 * Supplied to Q3Renderer_ModalConfigure to pass platform-specific 1257 * dialog state to the renderer. 1258 * 1259 * @field notUsed Not used. 1260 */ 1261 typedef struct TQ3DialogAnchor { 1262 void *notUsed; 1263 } TQ3DialogAnchor; 1264 1265 #endif // QUESA_OS_COCOA 1266 1267 1268 1269 1270 1271 //============================================================================= 1272 // Types 1273 //----------------------------------------------------------------------------- 1274 /*! 1275 * @typedef 1276 * TQ3XRendererModalConfigureMethod 1277 * @discussion 1278 * Display a modal configure dialog for the renderer. 1279 * 1280 * If the renderer provides a user interface for adjusting its preferences, 1281 * a modal configure dialog can be displayed by this method. 1282 * 1283 * The dialog should contain OK and Cancel buttons, and return the selected 1284 * button through the wasCancelled parameter. 1285 * 1286 * This method is optional. 1287 * 1288 * @param theRenderer The renderer whose configure dialog is to be displayed. 1289 * @param dialogAnchor Platform-specific dialog data. 1290 * @param wasCancelled Receives the OK/Cancel state of the dialog. 1291 * @param rendererPrivate Renderer-specific instance data. 1292 * @result Success or failure of the callback. 1293 */ 1294 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XRendererModalConfigureMethod)( 1295 TQ3RendererObject theRenderer, 1296 TQ3DialogAnchor dialogAnchor, 1297 TQ3Boolean *wasCancelled, 1298 void *rendererPrivate); 1299 1300 1301 1302 1303 1304 //============================================================================= 1305 // Function prototypes 1306 //----------------------------------------------------------------------------- 1307 /*! 1308 * @function 1309 * Q3Renderer_NewFromType 1310 * @discussion 1311 * Instantiate a new renderer by type. 1312 * 1313 * Built-in renderer types include kQ3RendererTypeInteractive for a shaded 1314 * renderer, and kQ3RendererTypeWireFrame for a wire-frame renderer. 1315 * 1316 * @param rendererObjectType The class type of the renderer to create. 1317 * @result The new renderer object. 1318 */ 1319 Q3_EXTERN_API_C ( TQ3RendererObject ) 1320 Q3Renderer_NewFromType ( 1321 TQ3ObjectType rendererObjectType 1322 ); 1323 1324 1325 1326 /*! 1327 * @function 1328 * Q3Renderer_GetType 1329 * @discussion 1330 * Get the class type of a renderer object. 1331 * 1332 * @param renderer The renderer to query. 1333 * @result The type of the renderer. 1334 */ 1335 Q3_EXTERN_API_C ( TQ3ObjectType ) 1336 Q3Renderer_GetType ( 1337 TQ3RendererObject renderer 1338 ); 1339 1340 1341 1342 /*! 1343 * @function 1344 * Q3Renderer_IsInteractive 1345 * @discussion 1346 * Is a renderer "interactive"? 1347 * 1348 * An interactive renderer should be able to render frames at a more or less 1349 * interactive rate, allowing the user to manipulate the renderer in real-time. 1350 * 1351 * Typically, renderers using hardware-acceleration would report as interactive 1352 * while software-based renderers (e.g., ray-tracers) would not. 1353 * 1354 * @param renderer The renderer to query. 1355 * @result Is the renderer interactive? 1356 */ 1357 Q3_EXTERN_API_C ( TQ3Boolean ) 1358 Q3Renderer_IsInteractive ( 1359 TQ3RendererObject renderer 1360 ); 1361 1362 1363 1364 /*! 1365 * @function 1366 * Q3Renderer_HasModalConfigure 1367 * @discussion 1368 * Does a renderer have a modal configure dialog? 1369 * 1370 * @param renderer The renderer to query. 1371 * @result Does the renderer have a modal configure dialog? 1372 */ 1373 Q3_EXTERN_API_C ( TQ3Boolean ) 1374 Q3Renderer_HasModalConfigure ( 1375 TQ3RendererObject renderer 1376 ); 1377 1378 1379 1380 /*! 1381 * @function 1382 * Q3Renderer_ModalConfigure 1383 * @discussion 1384 * Invoke a renderer's modal configure dialog. 1385 * 1386 * If the renderer provides a user interface for adjusting its preferences, 1387 * a modal configure dialog can be displayed by this function. 1388 * 1389 * The cancel/accept state of the dialog is returned through the cancelled 1390 * parameter. 1391 * 1392 * After a configure dialog has been accepted, the current preferences 1393 * should be retrieved with Q3Renderer_GetConfigurationData and stored by 1394 * the application for later recall. 1395 1396 * @param theRenderer The renderer whose configure dialog is to be displayed. 1397 * @param dialogAnchor Platform-specific dialog data. 1398 * @param cancelled Receives the OK/Cancel state of the dialog. 1399 * @result Success or failure of the operation. 1400 */ 1401 Q3_EXTERN_API_C ( TQ3Status ) 1402 Q3Renderer_ModalConfigure ( 1403 TQ3RendererObject renderer, 1404 TQ3DialogAnchor dialogAnchor, 1405 TQ3Boolean *cancelled 1406 ); 1407 1408 1409 1410 /*! 1411 * @function 1412 * Q3RendererClass_GetNickNameString 1413 * @discussion 1414 * Get the "nick name" of a renderer class. 1415 * 1416 * The "nick name" is the user-visible name for the renderer, and is 1417 * suitable for display in a menu or window. 1418 * 1419 * @param rendererClassType The class type of the renderer to query. 1420 * @param rendererClassString Receives the nick name of the renderer. 1421 * @result Success or failure of the operation. 1422 */ 1423 Q3_EXTERN_API_C ( TQ3Status ) 1424 Q3RendererClass_GetNickNameString ( 1425 TQ3ObjectType rendererClassType, 1426 TQ3ObjectClassNameString rendererClassString 1427 ); 1428 1429 1430 1431 /*! 1432 * @function 1433 * Q3Renderer_GetConfigurationData 1434 * @discussion 1435 * Get the configuration data for a renderer. 1436 * 1437 * Configuration data should be saved by the application in a manner appropriate 1438 * for the current platform (e.g., the Registry on Windows or a .plist file on 1439 * the Mac), tagging it with the renderer's type for later identification. 1440 * 1441 * If dataBuffer is NULL, the size of data required to store the configuration 1442 * data will be returned in actualDataSize. 1443 * 1444 * Otherwise bufferSize should be set to the number of bytes pointed to by 1445 * dataBuffer, and actualDataSize will receive the number of bytes written to 1446 * dataBuffer. 1447 * 1448 * @param renderer The renderer to query. 1449 * @param dataBuffer Receives the renderer configuration data. May be NULL. 1450 * @param bufferSize The number of bytes pointed to by dataBuffer. May be 0. 1451 * @param actualDataSize Receives the number of bytes required for, or written to, dataBuffer. 1452 * @result Success or failure of the operation. 1453 */ 1454 Q3_EXTERN_API_C ( TQ3Status ) 1455 Q3Renderer_GetConfigurationData ( 1456 TQ3RendererObject renderer, 1457 unsigned char *dataBuffer, 1458 TQ3Uns32 bufferSize, 1459 TQ3Uns32 *actualDataSize 1460 ); 1461 1462 1463 1464 /*! 1465 * @function 1466 * Q3Renderer_SetConfigurationData 1467 * @discussion 1468 * Set the configuration data for a renderer. 1469 * 1470 * The configuration must have been obtained with a previous call to 1471 * Q3Renderer_GetConfigurationData. 1472 * 1473 * @param renderer The renderer to update. 1474 * @param dataBuffer The configuration data for the renderer. 1475 * @param bufferSize The number of bytes pointed to by dataBuffer. 1476 * @result Success or failure of the operation. 1477 */ 1478 Q3_EXTERN_API_C ( TQ3Status ) 1479 Q3Renderer_SetConfigurationData ( 1480 TQ3RendererObject renderer, 1481 unsigned char *dataBuffer, 1482 TQ3Uns32 bufferSize 1483 ); 1484 1485 1486 1487 /*! 1488 * @function 1489 * Q3InteractiveRenderer_SetCSGEquation 1490 * @discussion 1491 * Set the CSG equation for the interactive renderer. 1492 * 1493 * Note - this function is deprecated, and is not fully supported in Quesa. 1494 * 1495 * @param renderer The renderer to update. 1496 * @param equation The new CSG equation. 1497 * @result Success or failure of the operation. 1498 */ 1499 Q3_EXTERN_API_C ( TQ3Status ) 1500 Q3InteractiveRenderer_SetCSGEquation ( 1501 TQ3RendererObject renderer, 1502 TQ3CSGEquation equation 1503 ); 1504 1505 1506 1507 /*! 1508 * @function 1509 * Q3InteractiveRenderer_GetCSGEquation 1510 * @discussion 1511 * Get the CSG equation from the interactive renderer. 1512 * 1513 * Note - this function is deprecated, and is not fully supported in Quesa. 1514 * 1515 * @param renderer The renderer to query. 1516 * @param equation Receives the CSG equation. 1517 * @result Success or failure of the operation. 1518 */ 1519 Q3_EXTERN_API_C ( TQ3Status ) 1520 Q3InteractiveRenderer_GetCSGEquation ( 1521 TQ3RendererObject renderer, 1522 TQ3CSGEquation *equation 1523 ); 1524 1525 1526 1527 /*! 1528 * @function 1529 * Q3InteractiveRenderer_SetPreferences 1530 * @discussion 1531 * Set the RAVE preferences for the interactive renderer. 1532 * 1533 * Note - this function is deprecated, and is not fully supported in Quesa. 1534 * 1535 * @param renderer The renderer to update. 1536 * @param vendorID The new RAVE vendor ID. 1537 * @param engineID The new RAVE engine ID. 1538 * @result Success or failure of the operation. 1539 */ 1540 Q3_EXTERN_API_C ( TQ3Status ) 1541 Q3InteractiveRenderer_SetPreferences ( 1542 TQ3RendererObject renderer, 1543 TQ3RaveVendorID vendorID, 1544 TQ3RaveEngineID engineID 1545 ); 1546 1547 1548 1549 /*! 1550 * @function 1551 * Q3InteractiveRenderer_GetPreferences 1552 * @discussion 1553 * Get the RAVE preferences from the interactive renderer. 1554 * 1555 * Note - this function is deprecated, and is not fully supported in Quesa. 1556 * 1557 * @param renderer The renderer to query. 1558 * @param vendorID Receives the RAVE vendor ID. 1559 * @param engineID Receives the RAVE engine ID. 1560 * @result Success or failure of the operation. 1561 */ 1562 Q3_EXTERN_API_C ( TQ3Status ) 1563 Q3InteractiveRenderer_GetPreferences ( 1564 TQ3RendererObject renderer, 1565 TQ3RaveVendorID *vendorID, 1566 TQ3RaveEngineID *engineID 1567 ); 1568 1569 1570 1571 /*! 1572 * @function 1573 * Q3InteractiveRenderer_SetDoubleBufferBypass 1574 * @discussion 1575 * Set the double-buffer bypass hint for the interactive renderer. 1576 * 1577 * Note - this function is deprecated, and is not fully supported in Quesa. 1578 * 1579 * @param renderer The renderer to update. 1580 * @param bypass The double-buffer bypass hint. 1581 * @result Success or failure of the operation. 1582 */ 1583 Q3_EXTERN_API_C ( TQ3Status ) 1584 Q3InteractiveRenderer_SetDoubleBufferBypass ( 1585 TQ3RendererObject renderer, 1586 TQ3Boolean bypass 1587 ); 1588 1589 1590 1591 /*! 1592 * @function 1593 * Q3InteractiveRenderer_GetDoubleBufferBypass 1594 * @discussion 1595 * Get the double-buffer bypass hint from the interactive renderer. 1596 * 1597 * Note - this function is deprecated, and is not fully supported in Quesa. 1598 * 1599 * @param renderer The renderer to query. 1600 * @param bypass Receives the double-buffer bypass hint. 1601 * @result Success or failure of the operation. 1602 */ 1603 Q3_EXTERN_API_C ( TQ3Status ) 1604 Q3InteractiveRenderer_GetDoubleBufferBypass ( 1605 TQ3RendererObject renderer, 1606 TQ3Boolean *bypass 1607 ); 1608 1609 1610 1611 /*! 1612 * @function 1613 * Q3InteractiveRenderer_SetRAVEContextHints 1614 * @discussion 1615 * Set the RAVE context hints for the interactive renderer. 1616 * 1617 * Note - this function is deprecated, and is not fully supported in Quesa. 1618 * 1619 * @param renderer The renderer to update. 1620 * @param RAVEContextHints The RAVE context hints. 1621 * @result Success or failure of the operation. 1622 */ 1623 Q3_EXTERN_API_C ( TQ3Status ) 1624 Q3InteractiveRenderer_SetRAVEContextHints ( 1625 TQ3RendererObject renderer, 1626 TQ3Uns32 RAVEContextHints 1627 ); 1628 1629 1630 1631 /*! 1632 * @function 1633 * Q3InteractiveRenderer_GetRAVEContextHints 1634 * @discussion 1635 * Get the RAVE context hints from the interactive renderer. 1636 * 1637 * Note - this function is deprecated, and is not fully supported in Quesa. 1638 * 1639 * @param renderer The renderer to query. 1640 * @param RAVEContextHints Receives the RAVE context hints. 1641 * @result Success or failure of the operation. 1642 */ 1643 Q3_EXTERN_API_C ( TQ3Status ) 1644 Q3InteractiveRenderer_GetRAVEContextHints ( 1645 TQ3RendererObject renderer, 1646 TQ3Uns32 *RAVEContextHints 1647 ); 1648 1649 1650 1651 /*! 1652 * @function 1653 * Q3InteractiveRenderer_SetRAVETextureFilter 1654 * @discussion 1655 * Set the RAVE texture filter for the interactive renderer. 1656 * 1657 * Note - this function is deprecated, and is not fully supported in Quesa. 1658 * 1659 * @param renderer The renderer to update. 1660 * @param raveTextureFilterValue The RAVE texture filter. 1661 * @result Success or failure of the operation. 1662 */ 1663 Q3_EXTERN_API_C ( TQ3Status ) 1664 Q3InteractiveRenderer_SetRAVETextureFilter ( 1665 TQ3RendererObject renderer, 1666 TQ3TextureFilter raveTextureFilterValue 1667 ); 1668 1669 1670 1671 /*! 1672 * @function 1673 * Q3InteractiveRenderer_GetRAVETextureFilter 1674 * @discussion 1675 * Get the RAVE texture filter from the interactive renderer. 1676 * 1677 * Note - this function is deprecated, and is not fully supported in Quesa. 1678 * 1679 * @param renderer The renderer to query. 1680 * @param raveTextureFilterValue Receives the RAVE texture filter. 1681 * @result Success or failure of the operation. 1682 */ 1683 Q3_EXTERN_API_C ( TQ3Status ) 1684 Q3InteractiveRenderer_GetRAVETextureFilter ( 1685 TQ3RendererObject renderer, 1686 TQ3TextureFilter *raveTextureFilterValue 1687 ); 1688 1689 1690 1691 /*! 1692 * @function 1693 * Q3InteractiveRenderer_CountRAVEDrawContexts 1694 * @discussion 1695 * Count the RAVE contexts for the interactive renderer. 1696 * 1697 * Note - this function is deprecated, and is not fully supported in Quesa. 1698 * 1699 * @param renderer The renderer to query. 1700 * @param numRAVEContexts Receives the number of RAVE contexts. 1701 * @result Success or failure of the operation. 1702 */ 1703 Q3_EXTERN_API_C ( TQ3Status ) 1704 Q3InteractiveRenderer_CountRAVEDrawContexts ( 1705 TQ3RendererObject renderer, 1706 TQ3Uns32 *numRAVEContexts 1707 ); 1708 1709 1710 1711 /*! 1712 * @function 1713 * Q3InteractiveRenderer_GetRAVEDrawContexts 1714 * @discussion 1715 * Get the RAVE contexts for the interactive renderer. 1716 * 1717 * Note - this function is deprecated, and is not fully supported in Quesa. 1718 * 1719 * @param renderer The renderer to query. 1720 * @param raveDrawContextList Receives the RAVE context list. 1721 * @param raveDrawingEnginesList Receives the RAVE engine list. 1722 * @param numRAVEContexts Receives the number of RAVE contexts. 1723 * @param raveDestroyCallback The RAVE destroy callback. 1724 * @result Success or failure of the operation. 1725 */ 1726 Q3_EXTERN_API_C ( TQ3Status ) 1727 Q3InteractiveRenderer_GetRAVEDrawContexts ( 1728 TQ3RendererObject renderer, 1729 TQADrawContext **raveDrawContextList, 1730 TQAEngine **raveDrawingEnginesList, 1731 TQ3Uns32 *numRAVEContexts, 1732 TQ3RaveDestroyCallback raveDestroyCallback 1733 ); 1734 1735 1736 1737 /*! 1738 * @function 1739 * Q3XView_IdleProgress 1740 * @discussion 1741 * Update the view's idle state while rendering. 1742 * 1743 * Allows non-interactive renderers to update the view with their progress. 1744 * Progress should be passed as: 1745 * 1746 * 0% (theView, 0, maxValue); 1747 * ..% (theView, 1 to maxValue-1, maxValue); 1748 * 100% (theView, maxValue, maxValue); 1749 * 1750 * Progress will be passed to the application callbacks registered with 1751 * Q3View_SetIdleMethod or Q3View_SetIdleProgressMethod. 1752 * 1753 * This function should only be called from renderer plug-ins. 1754 * 1755 * @param view The view to notify. 1756 * @param current The amount of work performed so far. 1757 * @param completed The total amount of work which will be performed. 1758 * @result Success or failure of the operation. 1759 */ 1760 Q3_EXTERN_API_C ( TQ3Status ) 1761 Q3XView_IdleProgress ( 1762 TQ3ViewObject view, 1763 TQ3Uns32 current, 1764 TQ3Uns32 completed 1765 ); 1766 1767 1768 1769 /*! 1770 * @function 1771 * Q3XView_EndFrame 1772 * @discussion 1773 * Indicate to a view that a frame has completed. 1774 * 1775 * This function should only be called from asynchronou renderer plug-ins. 1776 * 1777 * @param view The view to notify. 1778 * @result Success or failure of the operation. 1779 */ 1780 Q3_EXTERN_API_C ( TQ3Status ) 1781 Q3XView_EndFrame ( 1782 TQ3ViewObject view 1783 ); 1784 1785 1786 1787 /*! 1788 * @function 1789 * Q3XDrawContext_GetDrawRegion 1790 * @discussion 1791 * Get the draw region for a draw context object. 1792 * 1793 * Note - this function is deprecated, and is not fully supported in Quesa. 1794 * 1795 * @param drawContext The draw context to query. 1796 * @param drawRegion Receives the draw region for the draw context. 1797 * @result Success or failure of the operation. 1798 */ 1799 Q3_EXTERN_API_C ( TQ3Status ) 1800 Q3XDrawContext_GetDrawRegion ( 1801 TQ3DrawContextObject drawContext, 1802 TQ3XDrawRegion *drawRegion 1803 ); 1804 1805 1806 1807 /*! 1808 * @function 1809 * Q3XDrawContext_ClearValidationFlags 1810 * @discussion 1811 * Clear the validation flags for a draw context. 1812 * 1813 * This function should only be called from renderer plug-ins. 1814 * 1815 * @param drawContext The draw context to update. 1816 * @result Success or failure of the operation. 1817 */ 1818 Q3_EXTERN_API_C ( TQ3Status ) 1819 Q3XDrawContext_ClearValidationFlags ( 1820 TQ3DrawContextObject drawContext 1821 ); 1822 1823 1824 1825 /*! 1826 * @function 1827 * Q3XDrawContext_GetValidationFlags 1828 * @discussion 1829 * Get the validation flags for a draw context. 1830 * 1831 * This function should only be called from renderer plug-ins. 1832 * 1833 * @param drawContext The draw context to query. 1834 * @param validationFlags Receives the validation flags for a draw context. 1835 * @result Success or failure of the operation. 1836 */ 1837 Q3_EXTERN_API_C ( TQ3Status ) 1838 Q3XDrawContext_GetValidationFlags ( 1839 TQ3DrawContextObject drawContext, 1840 TQ3XDrawContextValidation *validationFlags 1841 ); 1842 1843 1844 1845 /*! 1846 * @function 1847 * Q3XDrawRegion_GetDeviceScaleX 1848 * @discussion 1849 * Get the horizontal device size of a draw region. 1850 * 1851 * Note - this function is deprecated, and is not fully supported in Quesa. 1852 * 1853 * @param drawRegion The draw region to query. 1854 * @param deviceScaleX Receives the horizontal device size. 1855 * @result Success or failure of the operation. 1856 */ 1857 Q3_EXTERN_API_C ( TQ3Status ) 1858 Q3XDrawRegion_GetDeviceScaleX ( 1859 TQ3XDrawRegion drawRegion, 1860 float *deviceScaleX 1861 ); 1862 1863 1864 1865 /*! 1866 * @function 1867 * Q3XDrawRegion_GetDeviceScaleY 1868 * @discussion 1869 * Get the vertical device size of a draw region. 1870 * 1871 * Note - this function is deprecated, and is not fully supported in Quesa. 1872 * 1873 * @param drawRegion The draw region to query. 1874 * @param deviceScaleY Receives the vertical device size. 1875 * @result Success or failure of the operation. 1876 */ 1877 Q3_EXTERN_API_C ( TQ3Status ) 1878 Q3XDrawRegion_GetDeviceScaleY ( 1879 TQ3XDrawRegion drawRegion, 1880 float *deviceScaleY 1881 ); 1882 1883 1884 1885 /*! 1886 * @function 1887 * Q3XDrawRegion_GetDeviceOffsetX 1888 * @discussion 1889 * Get the horizontal device offset of a draw region. 1890 * 1891 * Note - this function is deprecated, and is not fully supported in Quesa. 1892 * 1893 * @param drawRegion The draw region to query. 1894 * @param deviceOffsetX Receives the horizontal device offset. 1895 * @result Success or failure of the operation. 1896 */ 1897 Q3_EXTERN_API_C ( TQ3Status ) 1898 Q3XDrawRegion_GetDeviceOffsetX ( 1899 TQ3XDrawRegion drawRegion, 1900 float *deviceOffsetX 1901 ); 1902 1903 1904 1905 /*! 1906 * @function 1907 * Q3XDrawRegion_GetDeviceOffsetY 1908 * @discussion 1909 * Get the vertical device offset of a draw region. 1910 * 1911 * Note - this function is deprecated, and is not fully supported in Quesa. 1912 * 1913 * @param drawRegion The draw region to query. 1914 * @param deviceOffsetX Receives the vertical device offset. 1915 * @result Success or failure of the operation. 1916 */ 1917 Q3_EXTERN_API_C ( TQ3Status ) 1918 Q3XDrawRegion_GetDeviceOffsetY ( 1919 TQ3XDrawRegion drawRegion, 1920 float *deviceOffsetX 1921 ); 1922 1923 1924 1925 /*! 1926 * @function 1927 * Q3XDrawRegion_GetWindowScaleX 1928 * @discussion 1929 * Get the horizontal window size of a draw region. 1930 * 1931 * Note - this function is deprecated, and is not fully supported in Quesa. 1932 * 1933 * @param drawRegion The draw region to query. 1934 * @param windowScaleX Receives the horizontal window size. 1935 * @result Success or failure of the operation. 1936 */ 1937 Q3_EXTERN_API_C ( TQ3Status ) 1938 Q3XDrawRegion_GetWindowScaleX ( 1939 TQ3XDrawRegion drawRegion, 1940 float *windowScaleX 1941 ); 1942 1943 1944 1945 /*! 1946 * @function 1947 * Q3XDrawRegion_GetWindowScaleY 1948 * @discussion 1949 * Get the vertical window size of a draw region. 1950 * 1951 * Note - this function is deprecated, and is not fully supported in Quesa. 1952 * 1953 * @param drawRegion The draw region to query. 1954 * @param windowScaleY Receives the vertical window size. 1955 * @result Success or failure of the operation. 1956 */ 1957 Q3_EXTERN_API_C ( TQ3Status ) 1958 Q3XDrawRegion_GetWindowScaleY ( 1959 TQ3XDrawRegion drawRegion, 1960 float *windowScaleY 1961 ); 1962 1963 1964 1965 /*! 1966 * @function 1967 * Q3XDrawRegion_GetWindowOffsetX 1968 * @discussion 1969 * Get the horizontal window offset of a draw region. 1970 * 1971 * Note - this function is deprecated, and is not fully supported in Quesa. 1972 * 1973 * @param drawRegion The draw region to query. 1974 * @param windowOffsetX Receives the horizontal window offset. 1975 * @result Success or failure of the operation. 1976 */ 1977 Q3_EXTERN_API_C ( TQ3Status ) 1978 Q3XDrawRegion_GetWindowOffsetX ( 1979 TQ3XDrawRegion drawRegion, 1980 float *windowOffsetX 1981 ); 1982 1983 1984 1985 /*! 1986 * @function 1987 * Q3XDrawRegion_GetWindowOffsetY 1988 * @discussion 1989 * Get the vertical window offset of a draw region. 1990 * 1991 * Note - this function is deprecated, and is not fully supported in Quesa. 1992 * 1993 * @param drawRegion The draw region to query. 1994 * @param windowOffsetY Receives the vertical window offset. 1995 * @result Success or failure of the operation. 1996 */ 1997 Q3_EXTERN_API_C ( TQ3Status ) 1998 Q3XDrawRegion_GetWindowOffsetY ( 1999 TQ3XDrawRegion drawRegion, 2000 float *windowOffsetY 2001 ); 2002 2003 2004 2005 /*! 2006 * @function 2007 * Q3XDrawRegion_IsActive 2008 * @discussion 2009 * Is a draw region active? 2010 * 2011 * Note - this function is deprecated, and is not fully supported in Quesa. 2012 * 2013 * @param drawRegion The draw region to query. 2014 * @param isActive Receives the active status. 2015 * @result Success or failure of the operation. 2016 */ 2017 Q3_EXTERN_API_C ( TQ3Status ) 2018 Q3XDrawRegion_IsActive ( 2019 TQ3XDrawRegion drawRegion, 2020 TQ3Boolean *isActive 2021 ); 2022 2023 2024 2025 /*! 2026 * @function 2027 * Q3XDrawRegion_GetNextRegion 2028 * @discussion 2029 * Get the next draw region from a draw region. 2030 * 2031 * Note - this function is deprecated, and is not fully supported in Quesa. 2032 * 2033 * @param drawRegion The draw region to query. 2034 * @param nextDrawRegion Receives the next draw region. 2035 * @result Success or failure of the operation. 2036 */ 2037 Q3_EXTERN_API_C ( TQ3Status ) 2038 Q3XDrawRegion_GetNextRegion ( 2039 TQ3XDrawRegion drawRegion, 2040 TQ3XDrawRegion *nextDrawRegion 2041 ); 2042 2043 2044 2045 /*! 2046 * @function 2047 * Q3XDrawRegion_Start 2048 * @discussion 2049 * Start access to a draw region. 2050 * 2051 * Note - this function is deprecated, and is not fully supported in Quesa. 2052 * 2053 * @param drawRegion The draw region to lock for access. 2054 * @param services The draw region services. 2055 * @param descriptor Receives the draw region descriptor. 2056 * @result Success or failure of the operation. 2057 */ 2058 Q3_EXTERN_API_C ( TQ3Status ) 2059 Q3XDrawRegion_Start ( 2060 TQ3XDrawRegion drawRegion, 2061 TQ3XDrawRegionServices services, 2062 TQ3XDrawRegionDescriptor **descriptor 2063 ); 2064 2065 2066 2067 /*! 2068 * @function 2069 * Q3XDrawRegion_StartAccessToImageBuffer 2070 * @discussion 2071 * Start access to a draw region image buffer. 2072 * 2073 * Note - this function is deprecated, and is not fully supported in Quesa. 2074 * 2075 * @param drawRegion The draw region to lock for access. 2076 * @param services The draw region services. 2077 * @param descriptor Receives the draw region descriptor. 2078 * @param image Receives the draw region image buffer. 2079 * @result Success or failure of the operation. 2080 */ 2081 Q3_EXTERN_API_C ( TQ3Status ) 2082 Q3XDrawRegion_StartAccessToImageBuffer ( 2083 TQ3XDrawRegion drawRegion, 2084 TQ3XDrawRegionServices services, 2085 TQ3XDrawRegionDescriptor **descriptor, 2086 void **image 2087 ); 2088 2089 2090 2091 /*! 2092 * @function 2093 * Q3XDrawRegion_End 2094 * @discussion 2095 * End access to a draw region. 2096 * 2097 * Note - this function is deprecated, and is not fully supported in Quesa. 2098 * 2099 * @param drawRegion The draw region to unlock. 2100 * @result Success or failure of the operation. 2101 */ 2102 Q3_EXTERN_API_C ( TQ3Status ) 2103 Q3XDrawRegion_End ( 2104 TQ3XDrawRegion drawRegion 2105 ); 2106 2107 2108 2109 /*! 2110 * @function 2111 * Q3XDrawRegion_GetDeviceTransform 2112 * @discussion 2113 * Get the device transform for a draw region. 2114 * 2115 * Note - this function is deprecated, and is not fully supported in Quesa. 2116 * 2117 * @param drawRegion The draw region to query. 2118 * @param deviceTransform Receives the device transform for the draw region. 2119 * @result Success or failure of the operation. 2120 */ 2121 Q3_EXTERN_API_C ( TQ3Status ) 2122 Q3XDrawRegion_GetDeviceTransform ( 2123 TQ3XDrawRegion drawRegion, 2124 TQ3Matrix4x4 **deviceTransform 2125 ); 2126 2127 2128 2129 /*! 2130 * @function 2131 * Q3XDrawRegion_GetClipFlags 2132 * @discussion 2133 * Get the clip flags for a draw region. 2134 * 2135 * Note - this function is deprecated, and is not fully supported in Quesa. 2136 * 2137 * @param drawRegion The draw region to query. 2138 * @param clipMaskState Receives the clip flags for the draw region. 2139 * @result Success or failure of the operation. 2140 */ 2141 Q3_EXTERN_API_C ( TQ3Status ) 2142 Q3XDrawRegion_GetClipFlags ( 2143 TQ3XDrawRegion drawRegion, 2144 TQ3XClipMaskState *clipMaskState 2145 ); 2146 2147 2148 2149 /*! 2150 * @function 2151 * Q3XDrawRegion_GetClipMask 2152 * @discussion 2153 * Get the clip mask for a draw region. 2154 * 2155 * Note - this function is deprecated, and is not fully supported in Quesa. 2156 * 2157 * @param drawRegion The draw region to query. 2158 * @param clipMask Receives the clip mask for the draw region. 2159 * @result Success or failure of the operation. 2160 */ 2161 Q3_EXTERN_API_C ( TQ3Status ) 2162 Q3XDrawRegion_GetClipMask ( 2163 TQ3XDrawRegion drawRegion, 2164 TQ3Bitmap **clipMask 2165 ); 2166 2167 2168 2169 /*! 2170 * @function 2171 * Q3XDrawRegion_GetRendererPrivate 2172 * @discussion 2173 * Get the private renderer data for a draw region. 2174 * 2175 * Note - this function is deprecated, and is not fully supported in Quesa. 2176 * 2177 * @param drawRegion The draw region to query. 2178 * @param rendererPrivate Receives the renderer private data. 2179 * @result Success or failure of the operation. 2180 */ 2181 Q3_EXTERN_API_C ( TQ3Status ) 2182 Q3XDrawRegion_GetRendererPrivate ( 2183 TQ3XDrawRegion drawRegion, 2184 void **rendererPrivate 2185 ); 2186 2187 2188 2189 /*! 2190 * @function 2191 * Q3XDrawRegion_SetRendererPrivate 2192 * @discussion 2193 * Set the private renderer data for a draw region. 2194 * 2195 * Note - this function is deprecated, and is not fully supported in Quesa. 2196 * 2197 * @param drawRegion The draw region to update. 2198 * @param rendererPrivate The private renderer data for the draw region. 2199 * @param deleteMethod The delete method to dispose of the renderer data. 2200 * @result Success or failure of the operation. 2201 */ 2202 Q3_EXTERN_API_C ( TQ3Status ) 2203 Q3XDrawRegion_SetRendererPrivate ( 2204 TQ3XDrawRegion drawRegion, 2205 const void *rendererPrivate, 2206 TQ3XDrawRegionRendererPrivateDeleteMethod deleteMethod 2207 ); 2208 2209 2210 2211 /*! 2212 * @function 2213 * Q3XDrawRegion_SetUseDefaultRendererFlag 2214 * @discussion 2215 * Set the use-default-renderer flag for a draw region. 2216 * 2217 * Note - this function is deprecated, and is not fully supported in Quesa. 2218 * 2219 * @param drawRegion The draw region to update. 2220 * @param flag The use-default-renderer state. 2221 * @result Success or failure of the operation. 2222 */ 2223 Q3_EXTERN_API_C ( TQ3Status ) 2224 Q3XDrawRegion_SetUseDefaultRendererFlag ( 2225 TQ3XDrawRegion drawRegion, 2226 TQ3Boolean flag 2227 ); 2228 2229 2230 2231 /*! 2232 * @function 2233 * Q3XDrawRegion_GetUseDefaultRendererFlag 2234 * @discussion 2235 * Get the use-default-renderer flag for a draw region. 2236 * 2237 * Note - this function is deprecated, and is not fully supported in Quesa. 2238 * 2239 * @param drawRegion The draw region to query. 2240 * @param useDefaultRenderingFlag Receives the use-default-renderer state. 2241 * @result Success or failure of the operation. 2242 */ 2243 Q3_EXTERN_API_C ( TQ3Status ) 2244 Q3XDrawRegion_GetUseDefaultRendererFlag ( 2245 TQ3XDrawRegion drawRegion, 2246 TQ3Boolean *useDefaultRenderingFlag 2247 ); 2248 2249 2250 2251 2252 2253 //============================================================================= 2254 // Mac OS function prototypes 2255 //----------------------------------------------------------------------------- 2256 #if QUESA_OS_MACINTOSH 2257 2258 /*! 2259 * @function 2260 * Q3XDrawRegion_GetClipRegion 2261 * @discussion 2262 * Get the clip region for a draw region on Mac OS. 2263 * 2264 * Note - this function is deprecated, and is not fully supported in Quesa. 2265 * 2266 * @param drawRegion The draw region to query. 2267 * @param rgnHandle Receives the clip region for the draw region. 2268 * @result Success or failure of the operation. 2269 */ 2270 Q3_EXTERN_API_C ( TQ3Status ) 2271 Q3XDrawRegion_GetClipRegion ( 2272 TQ3XDrawRegion drawRegion, 2273 RgnHandle *rgnHandle 2274 ); 2275 2276 2277 2278 /*! 2279 * @function 2280 * Q3XDrawRegion_GetGDHandle 2281 * @discussion 2282 * Get the GDHandle for a draw region on Mac OS. 2283 * 2284 * Note - this function is deprecated, and is not fully supported in Quesa. 2285 * 2286 * @param drawRegion The draw region to query. 2287 * @param gdHandle Receives the GDHandle for the draw region. 2288 * @result Success or failure of the operation. 2289 */ 2290 Q3_EXTERN_API_C ( TQ3Status ) 2291 Q3XDrawRegion_GetGDHandle ( 2292 TQ3XDrawRegion drawRegion, 2293 GDHandle *gdHandle 2294 ); 2295 2296 #endif // QUESA_OS_MACINTOSH 2297 2298 2299 2300 2301 2302 //============================================================================= 2303 // C++ postamble 2304 //----------------------------------------------------------------------------- 2305 #ifdef __cplusplus 2306 } 2307 #endif 2308 2309 #endif 2310 2311 2312