OptiX  3.9
NVIDIA OptiX Acceleration Engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
optix_d3d9_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_dx9_interop_h__
31 #define __optix_optix_dx9_interop_h__
32 
33 /************************************
34  **
35  ** DX9 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_d3d9_interop.h>
50 
51 */
52 
53 #if defined( _WIN32 )
54 
55 #include "optix.h"
56 
61 
62 #ifdef __cplusplus
63  extern "C"
64  {
65 #endif
66 
97  RTresult RTAPI rtContextSetD3D9Device ( RTcontext context, IDirect3DDevice9* device );
98 
129  RTresult RTAPI rtDeviceGetD3D9Device ( int* device, const char* pszAdapterName );
130 
186  RTresult RTAPI rtBufferCreateFromD3D9Resource ( RTcontext context, unsigned int bufferdesc, IDirect3DResource9* resource, RTbuffer* buffer );
187 
239 
269  RTresult RTAPI rtBufferGetD3D9Resource ( RTbuffer buffer, IDirect3DResource9** resource );
270 
300  RTresult RTAPI rtTextureSamplerGetD3D9Resource ( RTtexturesampler textureSampler, IDirect3DResource9** pResource );
301 
333  RTresult RTAPI rtBufferD3D9Register ( RTbuffer buffer );
334 
365  RTresult RTAPI rtBufferD3D9Unregister ( RTbuffer buffer );
366 
398  RTresult RTAPI rtTextureSamplerD3D9Register ( RTtexturesampler textureSampler );
399 
431 
432 #ifdef __cplusplus
433  }
434 #endif
435 
436 #endif /* defined( _WIN32 ) */
437 
438 #endif /* __optix_optix_dx9_interop_h__ */
RTresult
Definition: optix_declarations.h:236
RTresult RTAPI rtBufferD3D9Unregister(RTbuffer buffer)
Declares a D3D9 buffer as mutable and inaccessible by OptiX.
RTresult RTAPI rtBufferCreateFromD3D9Resource(RTcontext context, unsigned int bufferdesc, IDirect3DResource9 *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D9 resource.
RTresult RTAPI rtTextureSamplerGetD3D9Resource(RTtexturesampler textureSampler, IDirect3DResource9 **pResource)
Gets the D3D9 resource associated with this texture sampler.
RTresult RTAPI rtTextureSamplerCreateFromD3D9Resource(RTcontext context, IDirect3DResource9 *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D9 resource.
struct IDirect3DDevice9 IDirect3DDevice9
Definition: optix_d3d9_interop.h:58
RTresult RTAPI rtTextureSamplerD3D9Register(RTtexturesampler textureSampler)
Declares a D3D9 texture as immutable and accessible by OptiX.
struct IDirect3DResource9 IDirect3DResource9
Definition: optix_d3d9_interop.h:60
struct RTtexturesampler_api * RTtexturesampler
Definition: optix_host.h:96
struct RTbuffer_api * RTbuffer
Definition: optix_host.h:69
RTresult RTAPI rtBufferGetD3D9Resource(RTbuffer buffer, IDirect3DResource9 **resource)
Gets the D3D9 resource associated with this buffer.
RTresult RTAPI rtTextureSamplerD3D9Unregister(RTtexturesampler textureSampler)
Declares a D3D9 texture as mutable and inaccessible by OptiX.
RTresult RTAPI rtBufferD3D9Register(RTbuffer buffer)
Declares a D3D9 buffer as immutable and accessible by OptiX.
RTresult RTAPI rtDeviceGetD3D9Device(int *device, const char *pszAdapterName)
Returns the OptiX device number associated with the specified name of a D3D9 adapter.
struct RTcontext_api * RTcontext
Definition: optix_host.h:72
OptiX public API header.
RTresult RTAPI rtContextSetD3D9Device(RTcontext context, IDirect3DDevice9 *device)
Binds a D3D9 device to a context and enables interop.