OptiX  3.9
NVIDIA OptiX Acceleration Engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
optix_d3d10_interop.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (c) 2010 NVIDIA Corporation. All rights reserved.
4  *
5  * NVIDIA Corporation and its licensors retain all intellectual property and proprietary
6  * rights in and to this software, related documentation and any modifications thereto.
7  * Any use, reproduction, disclosure or distribution of this software and related
8  * documentation without an express license agreement from NVIDIA Corporation is strictly
9  * prohibited.
10  *
11  * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
12  * AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
13  * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
14  * PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
15  * SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
16  * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
17  * BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
18  * INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
19  * SUCH DAMAGES
20  */
21 
30 #ifndef __optix_optix_dx10_interop_h__
31 #define __optix_optix_dx10_interop_h__
32 
33 /************************************
34  **
35  ** DX10 Interop functions
36  **
37  ***********************************/
38 
39 /*
40 
41 On Windows you will need to include windows.h before this file:
42 
43 #ifdef _WIN32
44 # ifndef WIN32_LEAN_AND_MEAN
45 # define WIN32_LEAN_AND_MEAN
46 # endif
47 # include<windows.h>
48 #endif
49 #include <optix_d3d10_interop.h>
50 
51 */
52 
53 #if defined( _WIN32 )
54 
55 #include "optix.h"
56 
57 typedef struct IDXGIAdapter IDXGIAdapter;
58 typedef struct ID3D10Device ID3D10Device;
59 typedef struct ID3D10Resource ID3D10Resource;
60 
61 #ifdef __cplusplus
62  extern "C"
63  {
64 #endif
65 
96  RTresult RTAPI rtContextSetD3D10Device ( RTcontext context, ID3D10Device* device );
97 
128  RTresult RTAPI rtDeviceGetD3D10Device ( int* device, IDXGIAdapter *pAdapter );
129 
184  RTresult RTAPI rtBufferCreateFromD3D10Resource ( RTcontext context, unsigned int bufferdesc, ID3D10Resource* resource, RTbuffer* buffer );
185 
236  RTresult RTAPI rtTextureSamplerCreateFromD3D10Resource( RTcontext context, ID3D10Resource* resource, RTtexturesampler* textureSampler );
237 
267  RTresult RTAPI rtBufferGetD3D10Resource ( RTbuffer buffer, ID3D10Resource** resource );
268 
298  RTresult RTAPI rtTextureSamplerGetD3D10Resource ( RTtexturesampler textureSampler, ID3D10Resource** resource );
299 
331  RTresult RTAPI rtBufferD3D10Register ( RTbuffer buffer );
332 
363  RTresult RTAPI rtBufferD3D10Unregister ( RTbuffer buffer );
364 
397 
429 
430 
431 #ifdef __cplusplus
432  }
433 
434 #endif
435 
436 #endif /* defined( _WIN32 ) */
437 
438 #endif /* __optix_optix_dx10_interop_h__ */
RTresult RTAPI rtTextureSamplerCreateFromD3D10Resource(RTcontext context, ID3D10Resource *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D10 resource.
RTresult
Definition: optix_declarations.h:236
RTresult RTAPI rtContextSetD3D10Device(RTcontext context, ID3D10Device *device)
Binds a D3D10 device to a context and enables interop.
RTresult RTAPI rtTextureSamplerD3D10Register(RTtexturesampler textureSampler)
Declares a D3D10 texture as immutable and accessible by OptiX.
struct RTtexturesampler_api * RTtexturesampler
Definition: optix_host.h:96
struct RTbuffer_api * RTbuffer
Definition: optix_host.h:69
RTresult RTAPI rtBufferGetD3D10Resource(RTbuffer buffer, ID3D10Resource **resource)
Gets the D3D10 resource associated with this buffer.
RTresult RTAPI rtBufferD3D10Unregister(RTbuffer buffer)
Declares a D3D10 buffer as mutable and inaccessible by OptiX.
RTresult RTAPI rtTextureSamplerGetD3D10Resource(RTtexturesampler textureSampler, ID3D10Resource **resource)
Gets the D3D10 resource associated with this texture sampler.
RTresult RTAPI rtBufferCreateFromD3D10Resource(RTcontext context, unsigned int bufferdesc, ID3D10Resource *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D10 resource.
RTresult RTAPI rtDeviceGetD3D10Device(int *device, IDXGIAdapter *pAdapter)
Returns the OptiX device number associated with the pointer to a D3D10 adapter.
struct RTcontext_api * RTcontext
Definition: optix_host.h:72
RTresult RTAPI rtBufferD3D10Register(RTbuffer buffer)
Declares a D3D10 buffer as immutable and accessible by OptiX.
OptiX public API header.
RTresult RTAPI rtTextureSamplerD3D10Unregister(RTtexturesampler textureSampler)
Declares a D3D10 texture as mutable and inaccessible by OptiX.