OptiX  3.9
NVIDIA OptiX Acceleration Engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
optix_d3d11_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_dx11_interop_h__
31 #define __optix_optix_dx11_interop_h__
32 
33 /************************************
34  **
35  ** DX11 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_d3d11_interop.h>
50 
51 */
52 
53 #if defined( _WIN32 )
54 
55 #include "optix.h"
56 
57 typedef struct IDXGIAdapter IDXGIAdapter;
58 typedef struct ID3D11Device ID3D11Device;
59 typedef struct ID3D11Resource ID3D11Resource;
60 
61 #ifdef __cplusplus
62  extern "C"
63  {
64 #endif
65 
96  RTresult RTAPI rtContextSetD3D11Device ( RTcontext context, ID3D11Device* device );
97 
128  RTresult RTAPI rtDeviceGetD3D11Device ( int* device, IDXGIAdapter *pAdapter );
129 
184  RTresult RTAPI rtBufferCreateFromD3D11Resource ( RTcontext context, unsigned int bufferdesc, ID3D11Resource* resource, RTbuffer* buffer );
185 
236  RTresult RTAPI rtTextureSamplerCreateFromD3D11Resource( RTcontext context, ID3D11Resource* resource, RTtexturesampler* textureSampler );
237 
267  RTresult RTAPI rtBufferGetD3D11Resource ( RTbuffer buffer, ID3D11Resource** resource );
268 
298  RTresult RTAPI rtTextureSamplerGetD3D11Resource ( RTtexturesampler textureSampler, ID3D11Resource** resource );
299 
331  RTresult RTAPI rtBufferD3D11Register ( RTbuffer buffer );
332 
363  RTresult RTAPI rtBufferD3D11Unregister ( RTbuffer buffer );
364 
397 
429 
430 #ifdef __cplusplus
431  }
432 
433 #endif
434 
435 #endif /* defined( _WIN32 ) */
436 
437 #endif /* __optix_optix_dx11_interop_h__ */
RTresult RTAPI rtTextureSamplerD3D11Unregister(RTtexturesampler textureSampler)
Declares a D3D11 texture as mutable and inaccessible by OptiX.
RTresult
Definition: optix_declarations.h:236
RTresult RTAPI rtBufferD3D11Register(RTbuffer buffer)
Declares a D3D11 buffer as immutable and accessible by OptiX.
RTresult RTAPI rtBufferD3D11Unregister(RTbuffer buffer)
Declares a D3D11 buffer as mutable and inaccessible by OptiX.
RTresult RTAPI rtTextureSamplerD3D11Register(RTtexturesampler textureSampler)
Declares a D3D11 texture as immutable and accessible by OptiX.
RTresult RTAPI rtTextureSamplerGetD3D11Resource(RTtexturesampler textureSampler, ID3D11Resource **resource)
Gets the D3D11 resource associated with this texture sampler.
RTresult RTAPI rtBufferCreateFromD3D11Resource(RTcontext context, unsigned int bufferdesc, ID3D11Resource *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D11 resource.
struct RTtexturesampler_api * RTtexturesampler
Definition: optix_host.h:96
struct RTbuffer_api * RTbuffer
Definition: optix_host.h:69
RTresult RTAPI rtDeviceGetD3D11Device(int *device, IDXGIAdapter *pAdapter)
Returns the OptiX device number associated with the pointer to a D3D11 adapter.
RTresult RTAPI rtContextSetD3D11Device(RTcontext context, ID3D11Device *device)
Binds a D3D11 device to a context and enables interop.
RTresult RTAPI rtTextureSamplerCreateFromD3D11Resource(RTcontext context, ID3D11Resource *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D11 resource.
struct RTcontext_api * RTcontext
Definition: optix_host.h:72
RTresult RTAPI rtBufferGetD3D11Resource(RTbuffer buffer, ID3D11Resource **resource)
Gets the D3D11 resource associated with this buffer.
OptiX public API header.