28 #ifndef __optixu_optixpp_namespace_h__
29 #define __optixu_optixpp_namespace_h__
34 # ifndef WIN32_LEAN_AND_MEAN
35 # define WIN32_LEAN_AND_MEAN
38 # include "../optix_d3d9_interop.h"
39 # include "../optix_d3d10_interop.h"
40 # include "../optix_d3d11_interop.h"
42 #include "../optix_gl_interop.h"
43 #include "../optix_cuda_interop.h"
48 #include "optixu_vector_types.h"
64 class AccelerationObj;
68 class GeometryGroupObj;
69 class GeometryInstanceObj;
73 class RemoteDeviceObj;
75 class TextureSamplerObj;
113 {
if(ptr != copy.ptr) { unref(); ptr = copy.ptr; ref(); }
return *
this; }
118 {
if(ptr != copy.ptr) { unref(); ptr = copy.ptr; ref(); }
return *
this; }
134 T*
get() {
return ptr; }
135 const T*
get()
const {
return ptr; }
138 operator bool()
const {
return ptr != 0; }
169 static Handle<T> create(
const std::string& a,
const std::string& b,
const std::string& c) {
return T::create(a,b,c); }
175 inline void ref() {
if(ptr) ptr->addReference(); }
176 inline void unref() {
if(ptr && ptr->removeReference() == 0)
delete ptr; }
185 typedef Handle<AccelerationObj> Acceleration;
186 typedef Handle<BufferObj> Buffer;
187 typedef Handle<ContextObj> Context;
188 typedef Handle<GeometryObj> Geometry;
189 typedef Handle<GeometryGroupObj> GeometryGroup;
190 typedef Handle<GeometryInstanceObj> GeometryInstance;
191 typedef Handle<GroupObj> Group;
192 typedef Handle<MaterialObj> Material;
193 typedef Handle<ProgramObj> Program;
194 typedef Handle<RemoteDeviceObj> RemoteDevice;
195 typedef Handle<SelectorObj> Selector;
196 typedef Handle<TextureSamplerObj> TextureSampler;
197 typedef Handle<TransformObj> Transform;
198 typedef Handle<VariableObj> Variable;
216 : m_message(message), m_error_code( error_code ) {}
235 std::string m_message;
243 return Exception( std::string(str), code );
271 APIObj() : ref_count(0) {}
287 void checkErrorNoGetContext(
RTresult code)
const;
404 void setFloat(
float f1,
float f2,
float f3);
408 void setFloat(
float f1,
float f2,
float f3,
float f4);
410 void set1fv(
const float* f);
412 void set2fv(
const float* f);
414 void set3fv(
const float* f);
416 void set4fv(
const float* f);
423 void setInt(
int i1,
int i2);
424 void setInt(optix::int2 i);
425 void setInt(
int i1,
int i2,
int i3);
426 void setInt(optix::int3 i);
427 void setInt(
int i1,
int i2,
int i3,
int i4);
428 void setInt(optix::int4 i);
429 void set1iv(
const int* i);
430 void set2iv(
const int* i);
431 void set3iv(
const int* i);
432 void set4iv(
const int* i);
438 void setUint(
unsigned int u1);
439 void setUint(
unsigned int u1,
unsigned int u2);
440 void setUint(
unsigned int u1,
unsigned int u2,
unsigned int u3);
441 void setUint(
unsigned int u1,
unsigned int u2,
unsigned int u3,
unsigned int u4);
442 void setUint(optix::uint2 u);
443 void setUint(optix::uint3 u);
444 void setUint(optix::uint4 u);
445 void set1uiv(
const unsigned int* u);
446 void set2uiv(
const unsigned int* u);
447 void set3uiv(
const unsigned int* u);
448 void set4uiv(
const unsigned int* u);
454 void setMatrix2x2fv(
bool transpose,
const float* m);
455 void setMatrix2x3fv(
bool transpose,
const float* m);
456 void setMatrix2x4fv(
bool transpose,
const float* m);
457 void setMatrix3x2fv(
bool transpose,
const float* m);
458 void setMatrix3x3fv(
bool transpose,
const float* m);
459 void setMatrix3x4fv(
bool transpose,
const float* m);
460 void setMatrix4x2fv(
bool transpose,
const float* m);
461 void setMatrix4x3fv(
bool transpose,
const float* m);
462 void setMatrix4x4fv(
bool transpose,
const float* m);
469 float getFloat()
const;
470 optix::float2 getFloat2()
const;
471 optix::float3 getFloat3()
const;
472 optix::float4 getFloat4()
const;
473 void getFloat(
float& f1)
const;
474 void getFloat(
float& f1,
float& f2)
const;
475 void getFloat(
float& f1,
float& f2,
float& f3)
const;
476 void getFloat(
float& f1,
float& f2,
float& f3,
float& f4)
const;
478 unsigned getUint()
const;
479 optix::uint2 getUint2()
const;
480 optix::uint3 getUint3()
const;
481 optix::uint4 getUint4()
const;
482 void getUint(
unsigned& u1)
const;
483 void getUint(
unsigned& u1,
unsigned& u2)
const;
484 void getUint(
unsigned& u1,
unsigned& u2,
unsigned& u3)
const;
485 void getUint(
unsigned& u1,
unsigned& u2,
unsigned& u3,
489 optix::int2 getInt2()
const;
490 optix::int3 getInt3()
const;
491 optix::int4 getInt4()
const;
492 void getInt(
int& i1)
const;
493 void getInt(
int& i1,
int& i2)
const;
494 void getInt(
int& i1,
int& i2,
int& i3)
const;
495 void getInt(
int& i1,
int& i2,
int& i3,
int& i4)
const;
497 void getMatrix2x2(
bool transpose,
float* m)
const;
498 void getMatrix2x3(
bool transpose,
float* m)
const;
499 void getMatrix2x4(
bool transpose,
float* m)
const;
500 void getMatrix3x2(
bool transpose,
float* m)
const;
501 void getMatrix3x3(
bool transpose,
float* m)
const;
502 void getMatrix3x4(
bool transpose,
float* m)
const;
503 void getMatrix4x2(
bool transpose,
float* m)
const;
504 void getMatrix4x3(
bool transpose,
float* m)
const;
505 void getMatrix4x4(
bool transpose,
float* m)
const;
518 void set(
Group group);
520 void setProgramId(
Program program);
531 Group getGroup()
const;
566 friend class Handle<VariableObj>;
573 Variable v = ptr->queryVariable( varname );
574 if( v.operator->() == 0)
575 v = ptr->declareVariable( varname );
582 return (*
this)[ std::string( varname ) ];
720 template<
class Iterator>
727 template<
class Iterator>
734 template<
class Iterator>
757 template<
class Iterator>
758 void setDevices(Iterator begin, Iterator end);
857 void launch(
unsigned int entry_point_index, RTsize image_width);
859 void launch(
unsigned int entry_point_index, RTsize image_width, RTsize image_height);
861 void launch(
unsigned int entry_point_index, RTsize image_width, RTsize image_height, RTsize image_depth);
866 void launchProgressive(
unsigned int entry_point_index, RTsize image_width, RTsize image_height,
unsigned int max_subframes);
909 friend class Handle<ContextObj>;
943 friend class Handle<ProgramObj>;
975 template<
typename T >
void setChild(
unsigned int index, T child);
977 template<
typename T > T
getChild(
unsigned int index)
const;
982 template<
typename T >
unsigned int addChild(T child);
986 template<
typename T >
unsigned int removeChild(T child);
994 template<
typename T >
unsigned int getChildIndex(T child)
const;
1005 friend class Handle<GroupObj>;
1064 friend class Handle<GeometryGroupObj>;
1083 template<
typename T >
void setChild(T child);
1085 template<
typename T > T
getChild()
const;
1092 void setMatrix(
bool transpose,
const float* matrix,
const float* inverse_matrix);
1094 void getMatrix(
bool transpose,
float* matrix,
float* inverse_matrix)
const;
1105 friend class Handle<TransformObj>;
1136 template<
typename T >
void setChild(
unsigned int index, T child);
1138 template<
typename T > T
getChild(
unsigned int index)
const;
1143 template<
typename T >
unsigned int addChild(T child);
1147 template<
typename T >
unsigned int removeChild(T child);
1157 template<
typename T >
unsigned int getChildIndex(T child)
const;
1161 Variable declareVariable (
const std::string& name);
1162 Variable queryVariable (
const std::string& name)
const;
1164 unsigned int getVariableCount()
const;
1165 Variable getVariable (
unsigned int index)
const;
1176 friend class Handle<SelectorObj>;
1203 void setProperty(
const std::string& name,
const std::string& value );
1206 std::string
getProperty(
const std::string& name )
const;
1222 void getData(
void* data )
const;
1224 void setData(
const void* data, RTsize size );
1235 friend class Handle<AccelerationObj>;
1289 friend class Handle<GeometryInstanceObj>;
1359 friend class Handle<GeometryObj>;
1403 friend class Handle<MaterialObj>;
1476 Buffer getBuffer(
unsigned int texture_array_idx,
unsigned int mip_level)
const;
1518 friend class Handle<TextureSamplerObj>;
1547 void getDevicePointer(
unsigned int optix_device_number, CUdeviceptr *device_pointer );
1551 void setDevicePointer(
unsigned int optix_device_number, CUdeviceptr device_pointer );
1559 void getSize(RTsize& width)
const;
1563 void setSize(RTsize width, RTsize height);
1565 void getSize(RTsize& width, RTsize& height)
const;
1567 void getMipLevelSize(
unsigned int level, RTsize& width, RTsize& height)
const;
1570 void setSize(RTsize width, RTsize height, RTsize depth);
1572 void getSize(RTsize& width, RTsize& height, RTsize& depth)
const;
1574 void getMipLevelSize(
unsigned int level, RTsize& width, RTsize& height, RTsize& depth)
const;
1577 void setSize(
unsigned int dimensionality,
const RTsize* dims);
1579 void getSize(
unsigned int dimensionality, RTsize* dims)
const;
1646 void*
map(
unsigned int level);
1648 void unmap(
unsigned int level);
1667 friend class Handle<BufferObj>;
1670 #if !defined(__CUDACC__)
1671 template<
typename T,
int Dim=1>
1718 bufferId(
int id) : m_id(id) {}
1719 int getId()
const {
return m_id; }
1723 #define rtBufferId optix::bufferId
1770 #define RT_INTERNAL_CALLABLE_PROGRAM_DEFS() \
1773 callableProgramId() {} \
1774 callableProgramId(int id) : m_id(id) {} \
1775 int getId() const { return m_id; } \
1781 template<
typename T>
1782 class callableProgramId;
1783 template<
typename ReturnT>
1785 template<
typename ReturnT,
typename Arg0T>
1787 template<
typename ReturnT,
typename Arg0T,
typename Arg1T>
1789 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T>
1791 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T>
1793 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1796 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1797 typename Arg4T,
typename Arg5T>
1799 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1800 typename Arg4T,
typename Arg5T,
typename Arg6T>
1802 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1803 typename Arg4T,
typename Arg5T,
typename Arg6T,
typename Arg7T>
1805 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1806 typename Arg4T,
typename Arg5T,
typename Arg6T,
typename Arg7T,
typename Arg8T>
1808 template<
typename ReturnT,
typename Arg0T,
typename Arg1T,
typename Arg2T,
typename Arg3T,
1809 typename Arg4T,
typename Arg5T,
typename Arg6T,
typename Arg7T,
typename Arg8T,
typename Arg9T>
1831 #define rtCallableProgramId optix::callableProgramId
1843 static RemoteDevice create(
const std::string& url,
const std::string& username,
const std::string& password );
1847 void reserve(
unsigned int num_nodes,
unsigned int configuration_idx );
1853 std::string getConfiguration(
unsigned int index);
1864 friend class Handle<RemoteDeviceObj>;
1887 inline void APIObj::checkErrorNoGetContext(
RTresult code )
const
1916 const RTsize max_string_size = 256;
1917 char name[max_string_size];
1919 max_string_size, name) )
1921 return std::string(name);
2224 template<
class Iterator>
2228 result->setGeometry( geometry );
2229 unsigned int count = 0;
2230 for( Iterator iter = matlbegin; iter != matlend; ++iter )
2232 result->setMaterialCount( count );
2233 unsigned int index = 0;
2234 for(Iterator iter = matlbegin; iter != matlend; ++iter, ++index )
2235 result->setMaterial( index, *iter );
2246 template<
class Iterator>
2250 unsigned int count = 0;
2251 for(Iterator iter = childbegin; iter != childend; ++iter )
2253 result->setChildCount( count );
2254 unsigned int index = 0;
2255 for(Iterator iter = childbegin; iter != childend; ++iter, ++index )
2256 result->setChild( index, *iter );
2267 template<
class Iterator>
2271 unsigned int count = 0;
2272 for(Iterator iter = childbegin; iter != childend; ++iter )
2274 result->setChildCount( count );
2275 unsigned int index = 0;
2276 for(Iterator iter = childbegin; iter != childend; ++iter, ++index )
2277 result->setChild( index, *iter );
2327 return std::string(str);
2330 template<
class Iterator>
inline
2333 std::vector<int> devices;
2334 std::copy( begin, end, std::insert_iterator<std::vector<int> >( devices, devices.begin() ) );
2362 int cpu_num_threads;
2364 return cpu_num_threads;
2376 int gpu_paging_active;
2378 return gpu_paging_active;
2383 int gpu_paging_forced_off;
2385 return gpu_paging_forced_off;
2393 sizeof(free_mem), &free_mem) );
2437 unsigned int result;
2478 return enabled != 0;
2489 unsigned int result;
2521 inline void ContextObj::launch(
unsigned int entry_point_index, RTsize image_width, RTsize image_height, RTsize image_depth)
2559 return enabled != 0;
2607 unsigned int result;
2665 unsigned int result;
2746 unsigned int result;
2751 template<
typename T >
2757 template<
typename T >
2762 return T::take( result );
2772 template<
typename T >
2782 template<
typename T >
2801 if(index >= count) {
2805 for(
unsigned int i=index+1; i<count; i++) {
2812 template<
typename T >
2818 for(
unsigned int index = 0; index < count; index++ ) {
2820 if( child->get() == temp )
return index;
2826 inline Variable SelectorObj::declareVariable(
const std::string& name)
2833 inline Variable SelectorObj::queryVariable(
const std::string& name)
const
2840 inline void SelectorObj::removeVariable(Variable v)
2845 inline unsigned int SelectorObj::getVariableCount()
const
2847 unsigned int result;
2852 inline Variable SelectorObj::getVariable(
unsigned int index)
const
2883 unsigned int result;
2888 template<
typename T >
2894 template<
typename T >
2899 return T::take( result );
2909 template<
typename T >
2919 template<
typename T >
2936 if(index >= count) {
2948 template<
typename T >
2954 for(
unsigned int index = 0; index < count; index++ ) {
2956 if( child->get() == temp )
return index;
2971 m_geometrygroup = 0;
3005 unsigned int result;
3047 if(index >= count) {
3064 for(
unsigned int index = 0; index < count; index++ ) {
3066 if( child->
get() == temp )
return index;
3074 return m_geometrygroup;
3096 template<
typename T >
3102 template<
typename T >
3107 return T::take( result );
3173 return std::string( s );
3185 return std::string( s );
3197 return std::string( s );
3219 return m_acceleration;
3226 m_geometryinstance = 0;
3260 unsigned int result;
3307 unsigned int result;
3321 return m_geometryinstance;
3350 unsigned int result;
3362 unsigned int result;
3412 unsigned int result;
3505 unsigned int result;
3526 m_texturesampler = 0;
3548 unsigned int result;
3560 unsigned int result;
3678 return m_texturesampler;
3847 unsigned int result;
3859 unsigned int result;
3873 unsigned int result;
3929 ID3D10Resource* result = NULL;
3936 ID3D11Resource* result = NULL;
3992 inline RemoteDevice RemoteDeviceObj::create(
const std::string& url,
const std::string& username,
const std::string& password )
4002 inline Context RemoteDeviceObj::getContext()
const
4008 inline void RemoteDeviceObj::destroy()
4014 inline void RemoteDeviceObj::reserve(
unsigned int num_nodes,
unsigned int configuration_idx )
4019 inline void RemoteDeviceObj::release()
4029 inline std::string RemoteDeviceObj::getConfiguration(
unsigned int config_index )
4033 return std::string( tmp );
4048 inline void VariableObj::setUint(
unsigned int u1)
4053 inline void VariableObj::setUint(
unsigned int u1,
unsigned int u2)
4058 inline void VariableObj::setUint(
unsigned int u1,
unsigned int u2,
unsigned int u3)
4063 inline void VariableObj::setUint(
unsigned int u1,
unsigned int u2,
unsigned int u3,
unsigned int u4)
4068 inline void VariableObj::setUint(optix::uint2 u)
4073 inline void VariableObj::setUint(optix::uint3 u)
4078 inline void VariableObj::setUint(optix::uint4 u)
4083 inline void VariableObj::set1uiv(
const unsigned int* u)
4088 inline void VariableObj::set2uiv(
const unsigned int* u)
4093 inline void VariableObj::set3uiv(
const unsigned int* u)
4098 inline void VariableObj::set4uiv(
const unsigned int* u)
4103 inline void VariableObj::setMatrix2x2fv(
bool transpose,
const float* m)
4108 inline void VariableObj::setMatrix2x3fv(
bool transpose,
const float* m)
4113 inline void VariableObj::setMatrix2x4fv(
bool transpose,
const float* m)
4118 inline void VariableObj::setMatrix3x2fv(
bool transpose,
const float* m)
4123 inline void VariableObj::setMatrix3x3fv(
bool transpose,
const float* m)
4128 inline void VariableObj::setMatrix3x4fv(
bool transpose,
const float* m)
4133 inline void VariableObj::setMatrix4x2fv(
bool transpose,
const float* m)
4138 inline void VariableObj::setMatrix4x3fv(
bool transpose,
const float* m)
4143 inline void VariableObj::setMatrix4x4fv(
bool transpose,
const float* m)
4204 inline void VariableObj::setInt(
int i1)
4209 inline void VariableObj::setInt(optix::int2 i)
4214 inline void VariableObj::setInt(
int i1,
int i2)
4219 inline void VariableObj::setInt(optix::int3 i)
4224 inline void VariableObj::setInt(
int i1,
int i2,
int i3)
4229 inline void VariableObj::setInt(optix::int4 i)
4234 inline void VariableObj::setInt(
int i1,
int i2,
int i3,
int i4)
4239 inline void VariableObj::set1iv(
const int* i )
4244 inline void VariableObj::set2iv(
const int* i )
4249 inline void VariableObj::set3iv(
const int* i )
4254 inline void VariableObj::set4iv(
const int* i )
4259 inline void VariableObj::setBuffer(Buffer buffer)
4264 inline void VariableObj::set(Buffer buffer)
4279 inline void VariableObj::setTextureSampler(
TextureSampler texturesampler)
4284 inline void VariableObj::set(TextureSampler texturesampler)
4289 inline void VariableObj::set(GeometryGroup group)
4294 inline void VariableObj::set(Group group)
4299 inline void VariableObj::set(Program program)
4304 inline void VariableObj::setProgramId(Program program)
4306 int id = program->getId();
4310 inline void VariableObj::set(Selector sel)
4315 inline void VariableObj::set(Transform tran)
4320 inline Buffer VariableObj::getBuffer()
const
4332 return std::string(name);
4337 const char* annotation;
4339 return std::string(annotation);
4418 inline float VariableObj::getFloat()
const
4425 inline optix::float2 VariableObj::getFloat2()
const
4433 inline optix::float3 VariableObj::getFloat3()
const
4440 inline optix::float4 VariableObj::getFloat4()
const
4447 inline void VariableObj::getFloat(
float& f1)
const
4452 inline void VariableObj::getFloat(
float& f1,
float& f2)
const
4457 inline void VariableObj::getFloat(
float& f1,
float& f2,
float& f3)
const
4462 inline void VariableObj::getFloat(
float& f1,
float& f2,
float& f3,
4469 inline unsigned VariableObj::getUint()
const
4476 inline optix::uint2 VariableObj::getUint2()
const
4483 inline optix::uint3 VariableObj::getUint3()
const
4490 inline optix::uint4 VariableObj::getUint4()
const
4497 inline void VariableObj::getUint(
unsigned& u1)
const
4502 inline void VariableObj::getUint(
unsigned& u1,
unsigned& u2)
const
4507 inline void VariableObj::getUint(
unsigned& u1,
unsigned& u2,
unsigned& u3)
const
4512 inline void VariableObj::getUint(
unsigned& u1,
unsigned& u2,
unsigned& u3,
4518 inline int VariableObj::getInt()
const
4525 inline optix::int2 VariableObj::getInt2()
const
4532 inline optix::int3 VariableObj::getInt3()
const
4539 inline optix::int4 VariableObj::getInt4()
const
4546 inline void VariableObj::getInt(
int& i1)
const
4551 inline void VariableObj::getInt(
int& i1,
int& i2)
const
4556 inline void VariableObj::getInt(
int& i1,
int& i2,
int& i3)
const
4561 inline void VariableObj::getInt(
int& i1,
int& i2,
int& i3,
int& i4)
const
4566 inline void VariableObj::getMatrix2x2(
bool transpose,
float* m)
const
4571 inline void VariableObj::getMatrix2x3(
bool transpose,
float* m)
const
4576 inline void VariableObj::getMatrix2x4(
bool transpose,
float* m)
const
4581 inline void VariableObj::getMatrix3x2(
bool transpose,
float* m)
const
4586 inline void VariableObj::getMatrix3x3(
bool transpose,
float* m)
const
4591 inline void VariableObj::getMatrix3x4(
bool transpose,
float* m)
const
4596 inline void VariableObj::getMatrix4x2(
bool transpose,
float* m)
const
4601 inline void VariableObj::getMatrix4x3(
bool transpose,
float* m)
const
4606 inline void VariableObj::getMatrix4x4(
bool transpose,
float* m)
const
RTresult RTAPI rtVariableGetMatrix2x2fv(RTvariable v, int transpose, float *m)
RTresult RTAPI rtGeometryGroupGetChild(RTgeometrygroup geometrygroup, unsigned int index, RTgeometryinstance *geometryinstance)
Returns a child node of a geometry group.
RTexception
Definition: optix_declarations.h:220
unsigned int addChild(GeometryInstance child)
Set a new child in this group and return its new index. See rtGeometryGroupSetChild.
Definition: optixpp_namespace.h:3022
RTresult RTAPI rtSelectorSetChild(RTselector selector, unsigned int index, RTobject child)
Attaches a child node to a Selector node.
void setData(const void *data, RTsize size)
Specify the acceleration structure via marshalled acceleration data. See rtAccelerationSetData.
Definition: optixpp_namespace.h:3212
RTresult RTAPI rtContextLaunch3D(RTcontext context, unsigned int entry_point_index, RTsize image_width, RTsize image_height, RTsize image_depth)
RTresult RTAPI rtContextGetDevices(RTcontext context, int *devices)
Retrieve a list of hardware devices being used by the kernel.
RTresult RTAPI rtTransformGetChildType(RTtransform transform, RTobjecttype *type)
Returns type information about a Transform child node.
RTtextureindexmode
Definition: optix_declarations.h:186
Program createProgramFromPTXFile(const std::string &ptx, const std::string &program_name)
See rtProgramCreateFromPTXFile.
Definition: optixpp_namespace.h:2295
RTresult RTAPI rtVariableSet3ui(RTvariable v, unsigned int u1, unsigned int u2, unsigned int u3)
struct RTvariable_api * RTvariable
Definition: optix_host.h:102
RTresult RTAPI rtSelectorGetVariable(RTselector selector, unsigned int index, RTvariable *v)
Returns a variable associated with a Selector node.
Variable declareVariable(const std::string &name)
Definition: optixpp_namespace.h:3286
RTresult RTAPI rtSelectorGetVariableCount(RTselector selector, unsigned int *count)
Returns the number of variables attached to a Selector node.
Definition: optix_declarations.h:206
IDirect3DResource9 * getD3D9Resource()
Queries the D3D9 resource associated with this buffer. See rtBufferGetD3D9Resource.
Definition: optixpp_namespace.h:3920
RTresult RTAPI rtContextGetPrintLaunchIndex(RTcontext context, int *x, int *y, int *z)
Gets the active print launch index.
void setStackSize(RTsize stack_size_bytes)
Definition: optixpp_namespace.h:2413
RTresult RTAPI rtVariableGet2i(RTvariable v, int *i1, int *i2)
RTresult RTAPI rtTextureSamplerCreateFromD3D10Resource(RTcontext context, ID3D10Resource *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D10 resource.
unsigned int removeChild(GeometryInstance child)
Definition: optixpp_namespace.h:3031
RTresult RTAPI rtContextGetBufferFromId(RTcontext context, int buffer_id, RTbuffer *buffer)
Gets an RTbuffer corresponding to the buffer id.
RTresult RTAPI rtVariableGetMatrix3x2fv(RTvariable v, int transpose, float *m)
RTresult RTAPI rtGeometryInstanceCreate(RTcontext context, RTgeometryinstance *geometryinstance)
Creates a new geometry instance node.
RTresult RTAPI rtTextureSamplerD3D11Unregister(RTtexturesampler textureSampler)
Declares a D3D11 texture as mutable and inaccessible by OptiX.
RTresult RTAPI rtGroupGetContext(RTgroup group, RTcontext *context)
Returns the context associated with a group.
RTresult RTAPI rtDeviceGetAttribute(int ordinal, RTdeviceattribute attrib, RTsize size, void *p)
Returns an attribute specific to an OptiX device.
RTresult
Definition: optix_declarations.h:236
RTresult RTAPI rtGeometryInstanceSetMaterial(RTgeometryinstance geometryinstance, unsigned int index, RTmaterial material)
Sets a material.
RTresult RTAPI rtVariableSetUserData(RTvariable v, RTsize size, const void *ptr)
Defined.
RTsize getElementSize() const
Query the data element size for user format buffers. See rtBufferGetElementSize.
Definition: optixpp_namespace.h:3761
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:2708
Handle(T *ptr)
Takes a raw pointer to an API object and creates a handle.
Definition: optixpp_namespace.h:98
void markDirty()
Definition: optixpp_namespace.h:3424
RTresult RTAPI rtMaterialGetClosestHitProgram(RTmaterial material, unsigned int ray_type_index, RTprogram *program)
Returns the closest hit program associated with a (material, ray type) tuple.
void getDevicePointer(unsigned int optix_device_number, CUdeviceptr *device_pointer)
Get the pointer to buffer memory on a specific device. See rtBufferGetDevicePointer.
Definition: optixpp_namespace.h:3768
RTresult RTAPI rtBufferD3D9Unregister(RTbuffer buffer)
Declares a D3D9 buffer as mutable and inaccessible by OptiX.
void removeVariable(Variable v)
Remove a variable associated with this object.
Definition: optixpp_namespace.h:3405
Definition: optix_device.h:417
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:4041
unsigned int getArraySize() const
Deprecated in OptiX 4.0 Query the texture array size for this sampler. See rtTextureSamplerGetArraySi...
Definition: optixpp_namespace.h:3558
void setDevices(Iterator begin, Iterator end)
Definition: optixpp_namespace.h:2331
TextureSampler wraps the OptiX C API RTtexturesampler opaque type and its associated function set...
Definition: optixpp_namespace.h:1414
void registerD3D10Texture()
Declare the texture's buffer as immutable and accessible by OptiX. See rtTextureSamplerD3D10Register...
Definition: optixpp_namespace.h:3698
RTresult RTAPI rtBufferSetSize1D(RTbuffer buffer, RTsize width)
Sets the width and dimensionality of this buffer.
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:2625
Buffer createCubeBuffer(unsigned int type, RTformat format, RTsize width, RTsize height, unsigned int levels)
Definition: optixpp_namespace.h:2052
RTresult RTAPI rtGroupGetChild(RTgroup group, unsigned int index, RTobject *child)
Returns a child node of a group.
RTresult RTAPI rtProgramGetId(RTprogram program, int *program_id)
Returns the ID for the Program object.
void setMaterialCount(unsigned int count)
Set the number of materials associated with this instance. See rtGeometryInstanceSetMaterialCount.
Definition: optixpp_namespace.h:3253
int getMaxTextureCount() const
Definition: optixpp_namespace.h:2353
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3229
RTresult RTAPI rtVariableGetContext(RTvariable v, RTcontext *context)
Returns the context associated with a program variable.
void setRayTypeCount(unsigned int num_ray_types)
See rtContextSetRayTypeCount.
Definition: optixpp_namespace.h:2482
Variable getVariable(unsigned int index) const
Query variable by index. See rt[ObjectType]GetVariable.
Definition: optixpp_namespace.h:3312
Variable getVariable(unsigned int index) const
Query variable by index. See rt[ObjectType]GetVariable.
Definition: optixpp_namespace.h:2670
RTresult RTAPI rtVariableGet4i(RTvariable v, int *i1, int *i2, int *i3, int *i4)
RTresult RTAPI rtGeometryGroupGetAcceleration(RTgeometrygroup geometrygroup, RTacceleration *acceleration)
Returns the acceleration structure attached to a geometry group.
RTresult RTAPI rtVariableSet2f(RTvariable v, float f1, float f2)
void set4fv(const float *f)
Set variable value to a float4.
Definition: optixpp_namespace.h:4198
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3529
unsigned int getChildIndex(T child) const
Query a child in this group for its index. See rtSelectorGetChild.
Definition: optixpp_namespace.h:2813
void unmap()
Unmaps a buffer object. See rtBufferUnmap.
Definition: optixpp_namespace.h:3950
void stopProgressive()
See rtContextStopProgressive.
Definition: optixpp_namespace.h:2533
void setTimeoutCallback(RTtimeoutcallback callback, double min_polling_seconds)
Definition: optixpp_namespace.h:2425
void bindProgressiveStream(Buffer source)
Definition: optixpp_namespace.h:3967
RTresult RTAPI rtVariableSetMatrix3x3fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtBufferGLRegister(RTbuffer buffer)
Declares an OpenGL buffer as immutable and accessible by OptiX.
Base class for all objects which are OptiX variable containers.
Definition: optixpp_namespace.h:347
RTsize getUsedHostMemory() const
See rtContextGetAttribute.
Definition: optixpp_namespace.h:2367
RTresult RTAPI rtGeometrySetIntersectionProgram(RTgeometry geometry, RTprogram program)
Sets the intersection program.
struct RTgroup_api * RTgroup
Definition: optix_host.h:84
RTresult RTAPI rtGeometryInstanceGetMaterial(RTgeometryinstance geometryinstance, unsigned int index, RTmaterial *material)
Returns a material handle.
void removeVariable(Variable v)
Remove a variable associated with this object.
Definition: optixpp_namespace.h:3300
RTresult RTAPI rtContextSetD3D10Device(RTcontext context, ID3D10Device *device)
Binds a D3D10 device to a context and enables interop.
TextureSampler createTextureSamplerFromD3D10Resource(ID3D10Resource *pResource)
Create TextureSampler from D3D10 image. Windows only. See rtTextureSamplerCreateFromD3D10Resource.
Definition: optixpp_namespace.h:2151
RTresult RTAPI rtVariableGet3ui(RTvariable v, unsigned int *u1, unsigned int *u2, unsigned int *u3)
RTresult RTAPI rtSelectorGetChildCount(RTselector selector, unsigned int *count)
Returns the number of child node slots of a Selector node.
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:2689
Buffer create1DLayeredBuffer(unsigned int type, RTformat format, RTsize width, RTsize layers, unsigned int levels)
Definition: optixpp_namespace.h:2032
RTresult RTAPI rtVariableGetMatrix4x4fv(RTvariable v, int transpose, float *m)
RTresult RTAPI rtProgramGetVariableCount(RTprogram program, unsigned int *count)
Returns the number of variables attached to a program.
RTresult RTAPI rtContextGetExceptionEnabled(RTcontext context, RTexception exception, int *enabled)
Query whether a specified exception is enabled.
RTresult RTAPI rtBufferCreateFromD3D9Resource(RTcontext context, unsigned int bufferdesc, IDirect3DResource9 *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D9 resource.
RTresult RTAPI rtGroupDestroy(RTgroup group)
Destroys a group node.
RTresult RTAPI rtGeometryCreate(RTcontext context, RTgeometry *geometry)
Creates a new geometry node.
void setCPUNumThreads(int cpu_num_threads)
Definition: optixpp_namespace.h:2397
RTresult RTAPI rtGeometryInstanceValidate(RTgeometryinstance geometryinstance)
Checks a GeometryInstance node for internal consistency.
unsigned int removeChild(T child)
Definition: optixpp_namespace.h:2783
bool isDirty() const
Query whether this geometry has been marked dirty. See rtGeometryIsDirty.
Definition: optixpp_namespace.h:3429
~Handle()
Decrements reference count on the handled object.
Definition: optixpp_namespace.h:121
TextureSampler createTextureSamplerFromD3D9Resource(IDirect3DResource9 *pResource)
Create TextureSampler from D3D9 image. Windows only. See rtTextureSamplerCreateFromD3D9Resource.
Definition: optixpp_namespace.h:2144
RTresult RTAPI rtGeometryInstanceGetGeometry(RTgeometryinstance geometryinstance, RTgeometry *geometry)
Returns the attached Geometry node.
RTresult RTAPI rtMaterialGetAnyHitProgram(RTmaterial material, unsigned int ray_type_index, RTprogram *program)
Returns the any hit program associated with a (material, ray type) tuple.
RTresult RTAPI rtProgramQueryVariable(RTprogram program, const char *name, RTvariable *v)
Returns a handle to the named variable attached to a program.
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3336
Exception class for error reporting from the OptiXpp API.
Definition: optixpp_namespace.h:212
RTresult RTAPI rtTextureSamplerGLUnregister(RTtexturesampler textureSampler)
Declares an OpenGL texture as mutable and inaccessible by OptiX.
void set3fv(const float *f)
Set variable value to a float3.
Definition: optixpp_namespace.h:4193
RTresult RTAPI rtBufferCreateForCUDA(RTcontext context, unsigned int bufferdesc, RTbuffer *buffer)
Creates a new buffer object that will later rely on user-side CUDA allocation.
Handle(const Handle< U > ©)
Takes a handle of some other type and creates a handle.
Definition: optixpp_namespace.h:109
Variable queryVariable(const std::string &name) const
Definition: optixpp_namespace.h:3398
virtual void destroy()=0
call rt[ObjectType]Destroy on the underlying OptiX C object
RTresult RTAPI rtGeometryMarkDirty(RTgeometry geometry)
Sets the dirty flag.
Variable declareVariable(const std::string &name)
Definition: optixpp_namespace.h:2644
void setGPUPagingForcedOff(int gpu_paging_forced_off)
See rtContextSetAttribute.
Definition: optixpp_namespace.h:2402
void getData(void *data) const
Get the marshalled acceleration data. See rtAccelerationGetData.
Definition: optixpp_namespace.h:3207
virtual void validate()=0
call rt[ObjectType]Validate on the underlying OptiX C object
RTresult RTAPI rtVariableSet3fv(RTvariable v, const float *f)
ID3D10Resource * getD3D10Resource()
Queries the D3D10 resource associated with this buffer. See rtBufferGetD3D10Resource.
Definition: optixpp_namespace.h:3927
RTresult RTAPI rtGeometryGetPrimitiveCount(RTgeometry geometry, unsigned int *num_primitives)
Returns the number of primitives.
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3732
RTresult RTAPI rtBufferDestroy(RTbuffer buffer)
Destroys a buffer object.
RTresult RTAPI rtBufferBindProgressiveStream(RTbuffer stream, RTbuffer source)
Bind a stream buffer to an output buffer source.
void setVisitProgram(Program program)
Definition: optixpp_namespace.h:2727
RTresult RTAPI rtTextureSamplerValidate(RTtexturesampler texturesampler)
Validates the state of a texture sampler.
Definition: optix_declarations.h:325
Buffer getBufferFromId(int buffer_id)
Definition: optixpp_namespace.h:2189
RTresult RTAPI rtContextLaunch1D(RTcontext context, unsigned int entry_point_index, RTsize image_width)
Executes the computation kernel for a given context.
static Handle< T > create()
Static object creation. Only valid for contexts.
Definition: optixpp_namespace.h:166
RTresult RTAPI rtGeometryGroupValidate(RTgeometrygroup geometrygroup)
Validates the state of the geometry group.
RTformat getFormat() const
Query the data format for the buffer. See rtBufferGetFormat.
Definition: optixpp_namespace.h:3749
RTresult RTAPI rtGeometryIsDirty(RTgeometry geometry, int *dirty)
Returns the dirty flag.
RTresult RTAPI rtBufferCreate(RTcontext context, unsigned int bufferdesc, RTbuffer *buffer)
Creates a new buffer object.
RTresult RTAPI rtBufferSetSizev(RTbuffer buffer, unsigned int dimensionality, const RTsize *dims)
Sets the dimensionality and dimensions of a buffer.
static unsigned int getDeviceCount()
Query the machine device count. Only valid for contexts.
Definition: optixpp_namespace.h:172
GeometryInstance createGeometryInstance()
See rtGeometryInstanceCreate.
Definition: optixpp_namespace.h:2217
RTresult RTAPI rtTextureSamplerGetId(RTtexturesampler texturesampler, int *texture_id)
Returns the texture ID of this texture sampler.
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3145
bool isDirty() const
Query if the acceleration needs a rebuild. See rtAccelerationIsDirty.
Definition: optixpp_namespace.h:3157
RTresult RTAPI rtTransformGetMatrix(RTtransform transform, int transpose, float *matrix, float *inverse_matrix)
Returns the affine matrix and its inverse associated with a Transform node.
RTresult RTAPI rtTextureSamplerDestroy(RTtexturesampler texturesampler)
Destroys a texture sampler object.
RTresult RTAPI rtContextGetEntryPointCount(RTcontext context, unsigned int *num_entry_points)
Query the number of entry points for this context.
void setChild(unsigned int index, T child)
Set an indexed child within this group. See rtGroupSetChild.
Definition: optixpp_namespace.h:2889
RTresult RTAPI rtContextStopProgressive(RTcontext context)
Stops a Progressive Launch.
RTresult RTAPI rtTextureSamplerSetMipLevelClamp(RTtexturesampler texturesampler, float minLevel, float maxLevel)
Sets the minimum and the maximum MIP level access range of a texture sampler.
RTresult RTAPI rtMaterialCreate(RTcontext context, RTmaterial *material)
Creates a new material.
RTresult RTAPI rtContextDeclareVariable(RTcontext context, const char *name, RTvariable *v)
Declares a new named variable associated with this context.
void set2fv(const float *f)
Set variable value to a float2.
Definition: optixpp_namespace.h:4188
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:2701
RTresult RTAPI rtTransformSetMatrix(RTtransform transform, int transpose, const float *matrix, const float *inverse_matrix)
Associates an affine transformation matrix with a Transform node.
Base class for all wrapper objects which can be destroyed and validated.
Definition: optixpp_namespace.h:320
static void getDeviceAttribute(int ordinal, RTdeviceattribute attrib, RTsize size, void *p)
Call rtDeviceGetAttribute and return the desired attribute value.
Definition: optixpp_namespace.h:1924
unsigned int getVariableCount() const
Definition: optixpp_namespace.h:2663
RTresult RTAPI rtProgramGetVariable(RTprogram program, unsigned int index, RTvariable *v)
Returns a handle to a variable attached to a program by index.
RTresult RTAPI rtMaterialSetAnyHitProgram(RTmaterial material, unsigned int ray_type_index, RTprogram program)
Sets the any hit program associated with a (material, ray type) tuple.
Selector wraps the OptiX C API RTselector opaque type and its associated function set...
Definition: optixpp_namespace.h:1116
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3441
Buffer createBufferFromGLBO(unsigned int type, unsigned int vbo)
Create buffer from GL buffer object. See rtBufferCreateFromGLBO.
Definition: optixpp_namespace.h:2114
unsigned int getDimensionality() const
Query dimensionality of buffer. See rtBufferGetDimensionality.
Definition: optixpp_namespace.h:3845
RTresult RTAPI rtGeometryInstanceSetMaterialCount(RTgeometryinstance geometryinstance, unsigned int count)
Sets the number of materials.
void setExceptionProgram(unsigned int entry_point_index, Program program)
See rtContextSetExceptionProgram.
Definition: optixpp_namespace.h:2456
unsigned int getChildCount() const
Query the number of children for this group. See rtGroupGetChildCount.
Definition: optixpp_namespace.h:2881
RTresult RTAPI rtBufferGetProgressiveUpdateReady(RTbuffer buffer, int *ready, unsigned int *subframe_count, unsigned int *max_subframes)
Check whether stream buffer content has been updated by a Progressive Launch.
RTresult RTAPI rtContextSetAttribute(RTcontext context, RTcontextattribute attrib, RTsize size, void *p)
Set an attribute specific to an OptiX context.
Group wraps the OptiX C API RTgroup opaque type and its associated function set.
Definition: optixpp_namespace.h:954
static std::string getDeviceName(int ordinal)
Call rtDeviceGetAttribute and return the name of the device.
Definition: optixpp_namespace.h:1914
void setPrimitiveIndexOffset(unsigned int index_offset)
Definition: optixpp_namespace.h:3355
RTresult RTAPI rtBufferGetContext(RTbuffer buffer, RTcontext *context)
Returns the context object that created this buffer.
Buffer createBufferForCUDA(unsigned int type)
Create a buffer for CUDA with given RTbuffertype. See rtBufferCreate.
Definition: optixpp_namespace.h:2072
RTresult RTAPI rtContextSetRayGenerationProgram(RTcontext context, unsigned int entry_point_index, RTprogram program)
Specifies the ray generation program for a given context entry point.
RTresult RTAPI rtAccelerationGetBuilder(RTacceleration acceleration, const char **return_string)
Query the current builder from an acceleration structure.
RTresult RTAPI rtProgramDeclareVariable(RTprogram program, const char *name, RTvariable *v)
Declares a new named variable associated with a program.
virtual ~Exception()
Definition: optixpp_namespace.h:220
Definition: optix_declarations.h:207
void destroy()
Destroy Context and all of its associated objects. See rtContextDestroy.
Definition: optixpp_namespace.h:1939
RTtextureindexmode getIndexingMode() const
Query texture indexing mode for this sampler. See rtTextureSamplerGetIndexingMode.
Definition: optixpp_namespace.h:3645
RTresult RTAPI rtBufferD3D11Register(RTbuffer buffer)
Declares a D3D11 buffer as immutable and accessible by OptiX.
Program getIntersectionProgram() const
Get the intersection program for this geometry. See rtGeometryGetIntersectionProgram.
Definition: optixpp_namespace.h:3384
RTcontext get()
Return the OptiX C API RTcontext object.
Definition: optixpp_namespace.h:2620
RTresult RTAPI rtVariableGetMatrix2x3fv(RTvariable v, int transpose, float *m)
Material getMaterial(unsigned int idx) const
Get the material at given index. See rtGeometryInstanceGetMaterial.
Definition: optixpp_namespace.h:3270
RTresult RTAPI rtBufferSetSize3D(RTbuffer buffer, RTsize width, RTsize height, RTsize depth)
Sets the width, height, depth and dimensionality of a buffer.
RTresult RTAPI rtTransformGetChild(RTtransform transform, RTobject *child)
Returns the child node that is attached to a Transform node.
Group createGroup()
See rtGroupCreate.
Definition: optixpp_namespace.h:2239
float getMaxAnisotropy() const
Query maximum anisotropy for this sampler. See rtTextureSamplerGetMaxAnisotropy.
Definition: optixpp_namespace.h:3592
bufferId is a host version of the device side bufferId.
Definition: optix_device.h:415
Variable queryVariable(const std::string &name) const
Definition: optixpp_namespace.h:2651
RTresult RTAPI rtContextGetMissProgram(RTcontext context, unsigned int ray_type_index, RTprogram *program)
Queries the miss program associated with the given context and ray type.
RTresult RTAPI rtContextGetVariable(RTcontext context, unsigned int index, RTvariable *v)
Queries an indexed variable associated with this context.
RTresult RTAPI rtAccelerationCreate(RTcontext context, RTacceleration *acceleration)
Creates a new acceleration structure.
RTresult RTAPI rtBufferGetDevicePointer(RTbuffer buffer, unsigned int optix_device_number, void **device_pointer)
Gets the pointer to the buffer's data on the given device.
RTresult RTAPI rtGeometryRemoveVariable(RTgeometry geometry, RTvariable v)
Removes a named variable from a geometry node.
void setFloat(float f1)
Set variable value to a scalar float.
Definition: optixpp_namespace.h:4148
void unregisterD3D10Buffer()
Unregister the buffer, re-enabling OptiX operations. See rtTextureSamplerD3D10Unregister.
Definition: optixpp_namespace.h:3910
RTresult RTAPI rtGeometryGroupDestroy(RTgeometrygroup geometrygroup)
Destroys a geometry group node.
unsigned int getMipLevelCount() const
Deprecated in OptiX 4.0 Query the number of mip levels for this sampler. See rtTextureSamplerGetMipLe...
Definition: optixpp_namespace.h:3546
unsigned int addMaterial(Material material)
Adds the provided material and returns the index to newly added material; increases material count by...
Definition: optixpp_namespace.h:3278
RTresult RTAPI rtAccelerationSetData(RTacceleration acceleration, const void *data, RTsize size)
Sets the state of an acceleration structure.
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3448
RTresult RTAPI rtGeometryGetVariable(RTgeometry geometry, unsigned int index, RTvariable *v)
Returns a handle to an indexed variable of a geometry node.
RTresult RTAPI rtGroupGetChildCount(RTgroup group, unsigned int *count)
Returns the number of child slots for a group.
RTresult RTAPI rtGeometryDeclareVariable(RTgeometry geometry, const char *name, RTvariable *v)
Declares a new named variable associated with a geometry instance.
RTresult RTAPI rtBufferD3D11Unregister(RTbuffer buffer)
Declares a D3D11 buffer as mutable and inaccessible by OptiX.
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:2720
RTresult RTAPI rtAccelerationSetTraverser(RTacceleration acceleration, const char *traverser)
Specifies the traverser to be used for an acceleration structure.
ID3D11Resource * getD3D11Resource()
Queries the D3D11 resource associated with this buffer. See rtBufferGetD3D11Resource.
Definition: optixpp_namespace.h:3934
unsigned int getPrimitiveCount() const
Definition: optixpp_namespace.h:3348
void setAnyHitProgram(unsigned int ray_type_index, Program program)
Set any hit program for this material at the given ray_type index. See rtMaterialSetAnyHitProgram.
Definition: optixpp_namespace.h:3472
struct RTacceleration_api * RTacceleration
Definition: optix_host.h:66
RTresult RTAPI rtVariableGetObject(RTvariable v, RTobject *object)
Returns the value of a OptiX object program variable.
RTresult RTAPI rtMaterialGetVariable(RTmaterial material, unsigned int index, RTvariable *v)
Returns a handle to an indexed variable of a material.
void getProgressiveUpdateReady(int *ready, unsigned int *subframe_count, unsigned int *max_subframes)
Query updates from a progressive stream. See rtBufferGetProgressiveUpdateReady.
Definition: optixpp_namespace.h:3972
RTresult RTAPI rtTransformCreate(RTcontext context, RTtransform *transform)
Creates a new Transform node.
void markDirty()
Definition: optixpp_namespace.h:3152
RTresult RTAPI rtBufferSetFormat(RTbuffer buffer, RTformat format)
Sets the format of this buffer.
RTwrapmode getWrapMode(unsigned int dim) const
Query the texture wrap mode for this sampler. See rtTextureSamplerGetWrapMode.
Definition: optixpp_namespace.h:3570
RTresult RTAPI rtContextGetProgramFromId(RTcontext context, int program_id, RTprogram *program)
Gets an RTprogram corresponding to the program id.
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:2632
void setIntersectionProgram(Program program)
Set the intersection program for this geometry. See rtGeometrySetIntersectionProgram.
Definition: optixpp_namespace.h:3379
void setReadMode(RTtexturereadmode readmode)
Set texture read mode for this sampler. See rtTextureSamplerSetReadMode.
Definition: optixpp_namespace.h:3628
std::string getName() const
Retrieve the name of the variable.
Definition: optixpp_namespace.h:4328
void setChildCount(unsigned int count)
Definition: optixpp_namespace.h:2876
Program getRayGenerationProgram(unsigned int entry_point_index) const
See rtContextGetRayGenerationProgram.
Definition: optixpp_namespace.h:2448
RTresult RTAPI rtTextureSamplerCreateFromD3D9Resource(RTcontext context, IDirect3DResource9 *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D9 resource.
RTresult RTAPI rtContextSetPrintBufferSize(RTcontext context, RTsize buffer_size_bytes)
Set the size of the print buffer.
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3725
RTresult RTAPI rtAccelerationGetContext(RTacceleration acceleration, RTcontext *context)
Returns the context associated with an acceleration structure.
RTtexturereadmode
Definition: optix_declarations.h:163
RTresult RTAPI rtVariableSet3i(RTvariable v, int i1, int i2, int i3)
Variable getVariable(unsigned int index) const
Query variable by index. See rt[ObjectType]GetVariable.
Definition: optixpp_namespace.h:3510
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:2967
Selector createSelector()
See rtSelectorCreate.
Definition: optixpp_namespace.h:2309
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:2979
RTresult RTAPI rtGeometryGroupSetChildCount(RTgeometrygroup geometrygroup, unsigned int count)
Sets the number of child nodes to be attached to the group.
void setElementSize(RTsize size_of_element)
Set the data element size for user format buffers. See rtBufferSetElementSize.
Definition: optixpp_namespace.h:3756
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3234
Definition: optix_declarations.h:277
RTresult RTAPI rtGeometryQueryVariable(RTgeometry geometry, const char *name, RTvariable *v)
Returns a handle to a named variable of a geometry node.
struct IDirect3DDevice9 IDirect3DDevice9
Definition: optix_d3d9_interop.h:58
RTresult RTAPI rtContextGetExceptionProgram(RTcontext context, unsigned int entry_point_index, RTprogram *program)
Queries the exception program associated with the given context and entry point.
void setTraverser(const std::string &traverser)
Specify the acceleration structure traverser. See rtAccelerationSetTraverser.
Definition: optixpp_namespace.h:3188
virtual Variable queryVariable(const std::string &name) const =0
void setD3D9Device(IDirect3DDevice9 *device)
Set the D3D device assocaiated with this context (Windows only). See rtContextSetD3D9Device.
Definition: optixpp_namespace.h:2165
void setArraySize(unsigned int num_textures_in_array)
Deprecated in OptiX 4.0 Set the texture array size for this sampler. See rtTextureSamplerSetArraySize...
Definition: optixpp_namespace.h:3553
RTresult RTAPI rtVariableGet4f(RTvariable v, float *f1, float *f2, float *f3, float *f4)
RTresult RTAPI rtTextureSamplerGetContext(RTtexturesampler texturesampler, RTcontext *context)
Gets the context object that created this texture sampler.
RTresult RTAPI rtSelectorValidate(RTselector selector)
Checks a Selector node for internal consistency.
Acceleration getAcceleration() const
Query the Acceleration structure for this group. See rtGroupGetAcceleration.
Definition: optixpp_namespace.h:2869
Exception(const std::string &message, RTresult error_code=RT_ERROR_UNKNOWN)
Create exception.
Definition: optixpp_namespace.h:215
RTresult getErrorCode() const
Retrieve the error code.
Definition: optixpp_namespace.h:226
void getFilteringModes(RTfiltermode &minification, RTfiltermode &magnification, RTfiltermode &mipmapping) const
Query filtering modes for this sampler. See rtTextureSamplerGetFilteringModes.
Definition: optixpp_namespace.h:3582
RTresult RTAPI rtContextGetVariableCount(RTcontext context, unsigned int *count)
Returns the number of variables associated with this context.
RTresult RTAPI rtMaterialRemoveVariable(RTmaterial material, RTvariable v)
Removes a variable from a material.
Context getContext() const
Definition: optixpp_namespace.h:1894
static Handle< T > take(RTobject p)
Definition: optixpp_namespace.h:127
RTresult RTAPI rtTextureSamplerD3D11Register(RTtexturesampler textureSampler)
Declares a D3D11 texture as immutable and accessible by OptiX.
RTbufferattribute
Definition: optix_declarations.h:332
virtual void removeVariable(Variable v)=0
Remove a variable associated with this object.
Acceleration createAcceleration(const char *builder, const char *traverser)
Definition: optixpp_namespace.h:1950
void setAcceleration(Acceleration acceleration)
Definition: optixpp_namespace.h:2864
unsigned int getChildIndex(T child) const
Query a child in this group for its index. See rtGroupGetChild.
Definition: optixpp_namespace.h:2949
RTresult RTAPI rtContextCompile(RTcontext context)
Compiles a context object.
bool getExceptionEnabled(RTexception exception) const
See rtContextGetExceptionEnabled.
Definition: optixpp_namespace.h:2474
RTresult RTAPI rtTextureSamplerD3D10Register(RTtexturesampler textureSampler)
Declares a D3D10 texture as immutable and accessible by OptiX.
Buffer createCubeLayeredBuffer(unsigned int type, RTformat format, RTsize width, RTsize height, RTsize faces, unsigned int levels)
Definition: optixpp_namespace.h:2062
RTresult RTAPI rtVariableGetSize(RTvariable v, RTsize *size)
Queries the size, in bytes, of a variable.
Definition: optix_declarations.h:328
RTresult RTAPI rtTextureSamplerSetMipLevelBias(RTtexturesampler texturesampler, float value)
Sets the mipmap offset of a texture sampler.
RTresult RTAPI rtVariableGetMatrix3x3fv(RTvariable v, int transpose, float *m)
struct RTmaterial_api * RTmaterial
Definition: optix_host.h:87
RTresult RTAPI rtVariableSet1iv(RTvariable v, const int *i)
RTresult RTAPI rtGeometryInstanceRemoveVariable(RTgeometryinstance geometryinstance, RTvariable v)
Removes a named variable from a geometry instance node.
RTresult RTAPI rtMaterialGetVariableCount(RTmaterial material, unsigned int *count)
Returns the number of variables attached to a material.
GeometryInstance getChild(unsigned int index) const
Query an indexed GeometryInstance within this group. See rtGeometryGroupGetChild. ...
Definition: optixpp_namespace.h:3015
unsigned int getEntryPointCount() const
See rtContextGetEntryPointCount.
Definition: optixpp_namespace.h:2435
RTresult RTAPI rtGeometryInstanceGetVariableCount(RTgeometryinstance geometryinstance, unsigned int *count)
Returns the number of attached variables.
void unregisterD3D11Texture()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtTextureSamplerD3D10Unregiste...
Definition: optixpp_namespace.h:3718
Acceleration wraps the OptiX C API RTacceleration opaque type and its associated function set...
Definition: optixpp_namespace.h:1187
RTresult RTAPI rtVariableSet2fv(RTvariable v, const float *f)
RTresult RTAPI rtVariableSet4ui(RTvariable v, unsigned int u1, unsigned int u2, unsigned int u3, unsigned int u4)
void registerD3D9Buffer()
Definition: optixpp_namespace.h:3890
RTresult RTAPI rtMaterialSetClosestHitProgram(RTmaterial material, unsigned int ray_type_index, RTprogram program)
Sets the closest hit program associated with a (material, ray type) tuple.
Definition: optix_declarations.h:327
RTresult RTAPI rtVariableGet1f(RTvariable v, float *f1)
Functions designed to modify the value of a program variable.
RTresult RTAPI rtTextureSamplerGetMaxAnisotropy(RTtexturesampler texturesampler, float *value)
Gets the maximum anisotropy level for a texture sampler.
void registerGLBuffer()
Declare the buffer as mutable and inaccessible by OptiX. See rtTextureSamplerGLRegister.
Definition: optixpp_namespace.h:3878
RTresult RTAPI rtVariableSet4f(RTvariable v, float f1, float f2, float f3, float f4)
RTresult RTAPI rtBufferGetMipLevelCount(RTbuffer buffer, unsigned int *level)
Gets the number of mipmap levels of this buffer object.
RTresult RTAPI rtSelectorDestroy(RTselector selector)
Destroys a selector node.
int getId() const
Definition: optixpp_namespace.h:3621
RTresult RTAPI rtAccelerationSetBuilder(RTacceleration acceleration, const char *builder)
Specifies the builder to be used for an acceleration structure.
RTresult RTAPI rtContextSetExceptionEnabled(RTcontext context, RTexception exception, int enabled)
Enable or disable an exception.
RTresult RTAPI rtGeometryGetIntersectionProgram(RTgeometry geometry, RTprogram *program)
Returns the attached intersection program.
T getChild(unsigned int index) const
Query an indexed child within this group. See rtGroupGetChild.
Definition: optixpp_namespace.h:2895
unsigned int getGLBOId() const
Definition: optixpp_namespace.h:3871
RTresult RTAPI rtTextureSamplerSetFilteringModes(RTtexturesampler texturesampler, RTfiltermode minification, RTfiltermode magnification, RTfiltermode mipmapping)
Sets the filtering modes of a texture sampler.
Definition: optix_declarations.h:240
Geometry getGeometry() const
Get the geometry object associated with this instance. See rtGeometryInstanceGetGeometry.
Definition: optixpp_namespace.h:3246
RTresult RTAPI rtContextGetRunningState(RTcontext context, int *running)
Query whether the given context is currently running.
RTresult RTAPI rtVariableGetMatrix4x2fv(RTvariable v, int transpose, float *m)
RTobjecttype getChildType(unsigned int index) const
Query indexed child's type. See rtGroupGetChildType.
Definition: optixpp_namespace.h:2902
RTresult RTAPI rtBufferGLUnregister(RTbuffer buffer)
Declares an OpenGL buffer as mutable and inaccessible by OptiX.
void setMipLevelBias(float value)
Set mipmap offset for this sampler. See rtTextureSamplerSetMipLevelBias.
Definition: optixpp_namespace.h:3609
RTresult RTAPI rtTransformValidate(RTtransform transform)
Checks a Transform node for internal consistency.
void setPrintLaunchIndex(int x, int y=-1, int z=-1)
See rtContextSetPrintLaunchIndex.
Definition: optixpp_namespace.h:2574
RTresult RTAPI rtGeometryGetBoundingBoxProgram(RTgeometry geometry, RTprogram *program)
Returns the attached bounding box program.
Definition: optix_declarations.h:326
void setAcceleration(Acceleration acceleration)
Definition: optixpp_namespace.h:2986
RTresult RTAPI rtVariableGet4ui(RTvariable v, unsigned int *u1, unsigned int *u2, unsigned int *u3, unsigned int *u4)
void setRemoteDevice(RemoteDevice remote_device)
See rtContextSetRemoteDevice.
Definition: optixpp_namespace.h:2538
RTresult RTAPI rtGeometryInstanceGetVariable(RTgeometryinstance geometryinstance, unsigned int index, RTvariable *v)
Returns a handle to an indexed variable of a geometry instance node.
RTresult RTAPI rtBufferCreateFromD3D11Resource(RTcontext context, unsigned int bufferdesc, ID3D11Resource *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D11 resource.
RTresult RTAPI rtSelectorCreate(RTcontext context, RTselector *selector)
Creates a Selector node.
Variable declareVariable(const std::string &name)
Definition: optixpp_namespace.h:3391
RTresult RTAPI rtVariableSet1i(RTvariable v, int i1)
RTresult RTAPI rtGeometryGroupGetContext(RTgeometrygroup geometrygroup, RTcontext *context)
Returns the context associated with a geometry group.
RTresult RTAPI rtBufferGetSize3D(RTbuffer buffer, RTsize *width, RTsize *height, RTsize *depth)
Gets the width, height and depth of this buffer.
RTresult RTAPI rtGeometryValidate(RTgeometry geometry)
Validates the geometry nodes integrity.
void getUserData(RTsize size, void *ptr) const
Retrieve a user defined type given the sizeof the user object.
Definition: optixpp_namespace.h:4274
RTresult RTAPI rtContextCreate(RTcontext *context)
Creates a new context object.
RTresult RTAPI rtAccelerationGetProperty(RTacceleration acceleration, const char *name, const char **return_string)
Queries an acceleration structure property.
unsigned int getEnabledDeviceCount() const
Definition: optixpp_namespace.h:2346
RTresult RTAPI rtGeometryGroupGetChildCount(RTgeometrygroup geometrygroup, unsigned int *count)
Returns the number of child slots for a group.
Program getMissProgram(unsigned int ray_type_index) const
See rtContextGetMissProgram.
Definition: optixpp_namespace.h:2499
unsigned int getVariableCount() const
Definition: optixpp_namespace.h:2605
RTgltarget
Definition: optix_declarations.h:172
RTresult RTAPI rtBufferGetAttribute(RTbuffer buffer, RTbufferattribute attrib, RTsize size, void *p)
Query a buffer attribute.
RemoteDevice wraps the OptiX C API RTremotedevice opaque type and its associated function set...
Definition: optixpp_namespace.h:1841
unsigned int addChild(T child)
Set a new child in this group and returns its new index. See rtGroupSetChild.
Definition: optixpp_namespace.h:2910
RTmaterial get()
Get the underlying OptiX C API RTmaterial opaque pointer.
Definition: optixpp_namespace.h:3517
RTresult RTAPI rtGeometryGetPrimitiveIndexOffset(RTgeometry geometry, unsigned int *index_offset)
Returns the current primitive index offset.
RTresult RTAPI rtGeometryInstanceDeclareVariable(RTgeometryinstance geometryinstance, const char *name, RTvariable *v)
Declares a new named variable associated with a geometry node.
RTresult RTAPI rtBufferSetSize2D(RTbuffer buffer, RTsize width, RTsize height)
Sets the width, height and dimensionality of this buffer.
RTtexturesampler get()
Get the underlying OptiX C API RTtexturesampler opaque pointer.
Definition: optixpp_namespace.h:3676
void registerGLTexture()
Definition: optixpp_namespace.h:3681
unsigned int getChildCount() const
Query the number of children for this group. See rtSelectorGetChildCount.
Definition: optixpp_namespace.h:2744
TextureSampler getTextureSamplerFromId(int sampler_id)
Definition: optixpp_namespace.h:2203
void registerD3D11Buffer()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtBufferD3D11Register.
Definition: optixpp_namespace.h:3900
RTresult RTAPI rtBufferUnmapEx(RTbuffer buffer, unsigned int level)
Unmaps mipmap level storage from the host.
void unregisterD3D9Texture()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtTextureSamplerD3D9Unregister...
Definition: optixpp_namespace.h:3708
RTresult RTAPI rtGeometrySetPrimitiveIndexOffset(RTgeometry geometry, unsigned int index_offset)
Sets the primitive index offset.
int removeReference()
Decrement the reference count for this object.
Definition: optixpp_namespace.h:277
RTresult RTAPI rtSelectorSetVisitProgram(RTselector selector, RTprogram program)
Assigns a visit program to a Selector node.
RTresult RTAPI rtVariableSet2i(RTvariable v, int i1, int i2)
void setProperty(const std::string &name, const std::string &value)
Definition: optixpp_namespace.h:3164
void setWrapMode(unsigned int dim, RTwrapmode wrapmode)
Set the texture wrap mode for this sampler. See rtTextureSamplerSetWrapMode.
Definition: optixpp_namespace.h:3565
void setMipLevelCount(unsigned int num_mip_levels)
Definition: optixpp_namespace.h:3541
void setClosestHitProgram(unsigned int ray_type_index, Program program)
Definition: optixpp_namespace.h:3460
int getRunningState() const
See rtContextGetRunningState.
Definition: optixpp_namespace.h:2543
RTgroup get()
Get the underlying OptiX C API RTgroup opaque pointer.
Definition: optixpp_namespace.h:2962
RTresult RTAPI rtBufferGetFormat(RTbuffer buffer, RTformat *format)
Gets the format of this buffer.
Buffer createBuffer(unsigned int type)
Create a buffer with given RTbuffertype. See rtBufferCreate.
Definition: optixpp_namespace.h:1960
RTresult RTAPI rtBufferGetSizev(RTbuffer buffer, unsigned int dimensionality, RTsize *dims)
Gets the dimensions of this buffer.
RTresult RTAPI rtTextureSamplerD3D9Register(RTtexturesampler textureSampler)
Declares a D3D9 texture as immutable and accessible by OptiX.
unsigned int getMaterialCount() const
Query the number of materials associated with this instance. See rtGeometryInstanceGetMaterialCount.
Definition: optixpp_namespace.h:3258
RTresult RTAPI rtTextureSamplerGetIndexingMode(RTtexturesampler texturesampler, RTtextureindexmode *indexmode)
Gets the indexing mode of a texture sampler.
RTresult RTAPI rtSelectorQueryVariable(RTselector selector, const char *name, RTvariable *v)
Returns a variable associated with a Selector node.
std::vector< int > getEnabledDevices() const
See rtContextGetDevices. This returns the list of currently enabled devices.
Definition: optixpp_namespace.h:2338
RTresult RTAPI rtAccelerationGetDataSize(RTacceleration acceleration, RTsize *size)
Returns the size of the data to be retrieved from an acceleration structure.
RTsize getDataSize() const
Definition: optixpp_namespace.h:3200
RTresult RTAPI rtTransformSetChild(RTtransform transform, RTobject child)
Attaches a child node to a Transform node.
Context object wraps the OptiX C API RTcontext opaque type and its associated function set...
Definition: optixpp_namespace.h:593
void setMaterial(unsigned int idx, Material material)
Set the material at given index. See rtGeometryInstanceSetMaterial.
Definition: optixpp_namespace.h:3265
#define RT_INTERNAL_CALLABLE_PROGRAM_DEFS()
callableProgramId is a host version of the device side callableProgramId.
Definition: optixpp_namespace.h:1770
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3133
Buffer create2DLayeredBuffer(unsigned int type, RTformat format, RTsize width, RTsize height, RTsize layers, unsigned int levels)
Definition: optixpp_namespace.h:2042
Material createMaterial()
See rtMaterialCreate.
Definition: optixpp_namespace.h:2288
RTresult RTAPI rtBufferGetSize2D(RTbuffer buffer, RTsize *width, RTsize *height)
Gets the width and height of this buffer.
std::string getBuilder() const
Query the acceleration structure builder. See rtAccelerationGetBuilder.
Definition: optixpp_namespace.h:3181
struct IDirect3DResource9 IDirect3DResource9
Definition: optix_d3d9_interop.h:60
Variable queryVariable(const std::string &name) const
Definition: optixpp_namespace.h:3491
unsigned int removeChild(T child)
Definition: optixpp_namespace.h:2920
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:2715
struct RTtexturesampler_api * RTtexturesampler
Definition: optix_host.h:96
Transform createTransform()
See rtTransformCreate.
Definition: optixpp_namespace.h:2281
void validate()
See rtContextValidate.
Definition: optixpp_namespace.h:1945
struct RTbuffer_api * RTbuffer
Definition: optix_host.h:69
RTresult RTAPI rtAccelerationGetData(RTacceleration acceleration, void *data)
Retrieves acceleration structure data.
RTresult RTAPI rtVariableGetAnnotation(RTvariable v, const char **annotation_return)
Queries the annotation string of a program variable.
RTacceleration get()
Get the underlying OptiX C API RTacceleration opaque pointer.
Definition: optixpp_namespace.h:3217
void setMipLevelCount(unsigned int levels)
Set buffer number of MIP levels. See rtBufferSetMipLevelCount.
Definition: optixpp_namespace.h:3852
Buffer createBufferFromD3D9Resource(unsigned int type, IDirect3DResource9 *pResource)
Create buffer from D3D9 buffer object. Windows only. See rtBufferCreateFromD3D9Resource.
Definition: optixpp_namespace.h:2123
void setBoundingBoxProgram(Program program)
Definition: optixpp_namespace.h:3367
RTresult RTAPI rtGroupSetChild(RTgroup group, unsigned int index, RTobject child)
Attaches a child node to a group.
RTresult RTAPI rtContextSetDevices(RTcontext context, unsigned int count, const int *devices)
Specify a list of hardware devices to be used by the kernel.
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3522
void setAttribute(RTbufferattribute attrib, RTsize size, void *p)
Definition: optixpp_namespace.h:3982
unsigned int getChildIndex(GeometryInstance child) const
Query a child in this group for its index. See rtGeometryGroupGetChild.
Definition: optixpp_namespace.h:3059
int(* RTtimeoutcallback)(void)
Definition: optix_host.h:118
RTresult RTAPI rtVariableGet2ui(RTvariable v, unsigned int *u1, unsigned int *u2)
RTremotedevice get()
Return the OptiX C API RTremotedevice object.
Definition: optixpp_namespace.h:4036
void setSize(RTsize width)
Set buffer dimensionality to one and buffer width to specified width. See rtBufferSetSize1D.
Definition: optixpp_namespace.h:3790
const std::string & getErrorString() const
Retrieve the error message.
Definition: optixpp_namespace.h:223
RTresult RTAPI rtContextGetTextureSamplerFromId(RTcontext context, int sampler_id, RTtexturesampler *sampler)
Gets an RTtexturesampler corresponding to the texture id.
void getAttribute(RTbufferattribute attrib, RTsize size, void *p)
Get a Buffer Attribute. See rtBufferGetAttribute.
Definition: optixpp_namespace.h:3987
Definition: optix_declarations.h:308
RTresult RTAPI rtMaterialGetContext(RTmaterial material, RTcontext *context)
Returns the context associated with a material.
Program getProgramFromId(int program_id)
Definition: optixpp_namespace.h:2196
struct RTprogram_api * RTprogram
Definition: optix_host.h:90
Definition: optix_declarations.h:215
RTresult RTAPI rtVariableGet3f(RTvariable v, float *f1, float *f2, float *f3)
RTresult RTAPI rtProgramGetContext(RTprogram program, RTcontext *context)
Gets the context object that created a program.
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3534
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3140
RTresult RTAPI rtContextSetTimeoutCallback(RTcontext context, RTtimeoutcallback callback, double min_polling_seconds)
Side timeout callback function.
static Exception makeException(RTresult code, RTcontext context)
For backwards compatability. Use Exception::makeException instead.
Definition: optixpp_namespace.h:295
void setChild(unsigned int index, GeometryInstance geometryinstance)
Set an indexed GeometryInstance child of this group. See rtGeometryGroupSetChild. ...
Definition: optixpp_namespace.h:3010
void launch(unsigned int entry_point_index, RTsize image_width)
Definition: optixpp_namespace.h:2511
Variable queryVariable(const std::string &name) const
Definition: optixpp_namespace.h:2593
Material wraps the OptiX C API RTmaterial opaque type and its associated function set...
Definition: optixpp_namespace.h:1370
unsigned int getChildCount() const
Query the number of children for this group. See rtGeometryGroupGetChildCount.
Definition: optixpp_namespace.h:3003
RTresult RTAPI rtAccelerationMarkDirty(RTacceleration acceleration)
Marks an acceleration structure as dirty.
RTresult RTAPI rtTextureSamplerSetMipLevelCount(RTtexturesampler texturesampler, unsigned int num_mip_levels)
Sets the number of MIP levels in a texture sampler.
T * get()
Retrieve the handled object.
Definition: optixpp_namespace.h:134
RTresult RTAPI rtTextureSamplerGetReadMode(RTtexturesampler texturesampler, RTtexturereadmode *readmode)
Gets the read mode of a texture sampler.
RTresult RTAPI rtVariableSet4fv(RTvariable v, const float *f)
RTresult RTAPI rtBufferSetElementSize(RTbuffer buffer, RTsize size_of_element)
Modifies the size in bytes of a buffer's individual elements.
RTdeviceattribute
Definition: optix_declarations.h:281
RTresult RTAPI rtVariableGetType(RTvariable v, RTobjecttype *type_return)
Returns type information about a program variable.
RTresult RTAPI rtContextSetD3D11Device(RTcontext context, ID3D11Device *device)
Binds a D3D11 device to a context and enables interop.
RTresult RTAPI rtRemoteDeviceDestroy(RTremotedevice remote_dev)
Destroys a remote device.
Buffer createBufferFromD3D10Resource(unsigned int type, ID3D10Resource *pResource)
Create buffer from D3D10 buffer object. Windows only. See rtBufferCreateFromD3D10Resource.
Definition: optixpp_namespace.h:2130
void addReference()
Increment the reference count for this object.
Definition: optixpp_namespace.h:275
RTgeometrygroup get()
Get the underlying OptiX C API RTgeometrygroup opaque pointer.
Definition: optixpp_namespace.h:3072
RTresult RTAPI rtTextureSamplerGetBuffer(RTtexturesampler texturesampler, unsigned int deprecated0, unsigned int deprecated1, RTbuffer *buffer)
Gets a buffer object handle from a texture sampler.
int getId() const
Definition: optixpp_namespace.h:3864
RTresult RTAPI rtContextGetRayGenerationProgram(RTcontext context, unsigned int entry_point_index, RTprogram *program)
Queries the ray generation program associated with the given context and entry point.
RTgeometry get()
Get the underlying OptiX C API RTgeometry opaque pointer.
Definition: optixpp_namespace.h:3436
GeometryGroup wraps the OptiX C API RTgeometrygroup opaque type and its associated function set...
Definition: optixpp_namespace.h:1016
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3324
void getMipLevelClamp(float &minLevel, float &maxLevel) const
Query minimum and maxnimum mipmap levels for this sampler. See rtTextureSamplerGetMipLevelClamp.
Definition: optixpp_namespace.h:3604
RTresult RTAPI rtVariableSetMatrix4x2fv(RTvariable v, int transpose, const float *m)
void setPrimitiveCount(unsigned int num_primitives)
Definition: optixpp_namespace.h:3343
RTgeometryinstance get()
Get the underlying OptiX C API RTgeometryinstance opaque pointer.
Definition: optixpp_namespace.h:3319
void setFilteringModes(RTfiltermode minification, RTfiltermode magnification, RTfiltermode mipmapping)
Set filtering modes for this sampler. See rtTextureSamplerSetFilteringModes.
Definition: optixpp_namespace.h:3577
RTresult RTAPI rtVariableSet3f(RTvariable v, float f1, float f2, float f3)
GeometryInstance wraps the OptiX C API RTgeometryinstance acceleration opaque type and its associated...
Definition: optixpp_namespace.h:1247
RTresult RTAPI rtContextValidate(RTcontext context)
Checks the given context for valid internal state.
RTresult RTAPI rtContextGetDeviceCount(RTcontext context, unsigned int *count)
Query the number of devices currently being used.
RTresult RTAPI rtVariableSet2uiv(RTvariable v, const unsigned int *u)
RTresult RTAPI rtVariableSetMatrix2x2fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtDeviceGetDeviceCount(unsigned int *count)
Returns the number of OptiX capable devices.
RTresult RTAPI rtVariableSetMatrix4x3fv(RTvariable v, int transpose, const float *m)
Variable declareVariable(const std::string &name)
Definition: optixpp_namespace.h:2586
struct RTgeometryinstance_api * RTgeometryinstance
Definition: optix_host.h:78
void setDevicePointer(unsigned int optix_device_number, CUdeviceptr device_pointer)
Set the pointer to buffer memory on a specific device. See rtBufferSetDevicePointer.
Definition: optixpp_namespace.h:3780
Program getClosestHitProgram(unsigned int ray_type_index) const
Get closest hit program for this material at the given ray_type index. See rtMaterialGetClosestHitPro...
Definition: optixpp_namespace.h:3465
RTresult RTAPI rtTransformDestroy(RTtransform transform)
Destroys a transform node.
Handle< T > & operator=(const Handle< U > ©)
Assignment of handle with different underlying object type.
Definition: optixpp_namespace.h:117
RTresult RTAPI rtGroupGetAcceleration(RTgroup group, RTacceleration *acceleration)
Returns the acceleration structure attached to a group.
RTvariable get()
Get the OptiX C API object wrapped by this instance.
Definition: optixpp_namespace.h:4349
RTobjecttype
Definition: optix_declarations.h:104
RTresult RTAPI rtBufferGetD3D10Resource(RTbuffer buffer, ID3D10Resource **resource)
Gets the D3D10 resource associated with this buffer.
void removeVariable(Variable v)
Remove a variable associated with this object.
Definition: optixpp_namespace.h:2658
RTresult RTAPI rtAccelerationDestroy(RTacceleration acceleration)
Destroys an acceleration structure object.
void setIndexingMode(RTtextureindexmode indexmode)
Set texture indexing mode for this sampler. See rtTextureSamplerSetIndexingMode.
Definition: optixpp_namespace.h:3640
Program object wraps the OptiX C API RTprogram opaque type and its associated function set...
Definition: optixpp_namespace.h:920
RTresult RTAPI rtContextQueryVariable(RTcontext context, const char *name, RTvariable *v)
Returns a named variable associated with this context.
RTresult RTAPI rtContextSetExceptionProgram(RTcontext context, unsigned int entry_point_index, RTprogram program)
Specifies the exception program for a given context entry point.
Variable getVariable(unsigned int index) const
Query variable by index. See rt[ObjectType]GetVariable.
Definition: optixpp_namespace.h:2612
float getMipLevelBias() const
Query mipmap offset for this sampler. See rtTextureSamplerGetMipLevelBias.
Definition: optixpp_namespace.h:3614
RTresult RTAPI rtVariableSet4uiv(RTvariable v, const unsigned int *u)
RTformat
Definition: optix_declarations.h:63
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:2637
RTresult RTAPI rtProgramCreateFromPTXString(RTcontext context, const char *ptx, const char *program_name, RTprogram *program)
Creates a new program object.
RTresult RTAPI rtBufferGetMipLevelSize3D(RTbuffer buffer, unsigned int level, RTsize *width, RTsize *height, RTsize *depth)
Gets the width, height and depth of buffer specific MIP level.
Definition: optix_declarations.h:323
RTresult RTAPI rtBufferGetD3D9Resource(RTbuffer buffer, IDirect3DResource9 **resource)
Gets the D3D9 resource associated with this buffer.
void setMissProgram(unsigned int ray_type_index, Program program)
See rtContextSetMissProgram.
Definition: optixpp_namespace.h:2494
bool getPrintEnabled() const
See rtContextGetPrintEnabled.
Definition: optixpp_namespace.h:2555
RTresult RTAPI rtVariableGetName(RTvariable v, const char **name_return)
Queries the name of a program variable.
T getChild(unsigned int index) const
Query an indexed child within this group. See rtSelectorGetChild.
Definition: optixpp_namespace.h:2758
struct RTgeometry_api * RTgeometry
Definition: optix_host.h:75
RTresult RTAPI rtMaterialDestroy(RTmaterial material)
Destroys a material object.
RTresult RTAPI rtProgramValidate(RTprogram program)
Validates the state of a program.
unsigned int getVariableCount() const
Definition: optixpp_namespace.h:3410
static unsigned int getDeviceCount()
Call rtDeviceGetDeviceCount and returns number of valid devices.
Definition: optixpp_namespace.h:1905
void launchProgressive(unsigned int entry_point_index, RTsize image_width, RTsize image_height, unsigned int max_subframes)
Definition: optixpp_namespace.h:2528
RTresult RTAPI rtTextureSamplerD3D9Unregister(RTtexturesampler textureSampler)
Declares a D3D9 texture as mutable and inaccessible by OptiX.
void setUserData(RTsize size, const void *ptr)
Set the variable to a user defined type given the sizeof the user object.
Definition: optixpp_namespace.h:4269
RTresult RTAPI rtBufferD3D10Unregister(RTbuffer buffer)
Declares a D3D10 buffer as mutable and inaccessible by OptiX.
RTresult RTAPI rtBufferD3D9Register(RTbuffer buffer)
Declares a D3D9 buffer as immutable and accessible by OptiX.
RTresult RTAPI rtTextureSamplerSetReadMode(RTtexturesampler texturesampler, RTtexturereadmode readmode)
Sets the read mode of a texture sampler.
RTresult RTAPI rtGroupCreate(RTcontext context, RTgroup *group)
Creates a new group.
RTresult RTAPI rtTextureSamplerGetArraySize(RTtexturesampler texturesampler, unsigned int *num_textures_in_array)
Gets the number of array slices present in a texture sampler.
Program getExceptionProgram(unsigned int entry_point_index) const
See rtContextGetExceptionProgram.
Definition: optixpp_namespace.h:2461
RTresult RTAPI rtVariableSet2ui(RTvariable v, unsigned int u1, unsigned int u2)
RTresult RTAPI rtTextureSamplerCreate(RTcontext context, RTtexturesampler *texturesampler)
Creates a new texture sampler object.
void setD3D10Device(ID3D10Device *device)
Set the D3D device assocaiated with this context (Windows only). See rtContextSetD3D10Device.
Definition: optixpp_namespace.h:2170
std::string getAnnotation() const
Retrieve the annotation associated with the variable.
Definition: optixpp_namespace.h:4335
RTresult RTAPI rtVariableSetMatrix4x4fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtGeometryDestroy(RTgeometry geometry)
Destroys a geometry node.
RTresult RTAPI rtBufferSetMipLevelCount(RTbuffer buffer, unsigned int levels)
Sets the MIP level count of a buffer.
GeometryGroup createGeometryGroup()
See rtGeometryGroupCreate.
Definition: optixpp_namespace.h:2260
Program getAnyHitProgram(unsigned int ray_type_index) const
Get any hit program for this material at the given ray_type index. See rtMaterialGetAnyHitProgram.
Definition: optixpp_namespace.h:3477
static Exception makeException(RTresult code, RTcontext context)
Definition: optixpp_namespace.h:239
RTresult RTAPI rtGeometryGetContext(RTgeometry geometry, RTcontext *context)
Returns the context associated with a geometry node.
Handle< T > & operator=(const Handle< T > ©)
Assignment of handle with same underlying object type.
Definition: optixpp_namespace.h:112
void setBuffer(unsigned int texture_array_idx, unsigned int mip_level, Buffer buffer)
Definition: optixpp_namespace.h:3652
RTresult RTAPI rtBufferMarkDirty(RTbuffer buffer)
Sets a buffer as dirty.
RTresult RTAPI rtBufferSetDevicePointer(RTbuffer buffer, unsigned int optix_device_number, CUdeviceptr device_pointer)
Sets the pointer to the buffer's data on the given device.
static Handle< T > take(typename T::api_t p)
Takes a base optix api opaque type and creates a handle to optixpp wrapper type.
Definition: optixpp_namespace.h:124
RTresult RTAPI rtBufferUnmap(RTbuffer buffer)
Unmaps a buffer's storage from the host.
RTresult RTAPI rtSelectorDeclareVariable(RTselector selector, const char *name, RTvariable *v)
Declares a variable associated with a Selector node.
RTresult RTAPI rtVariableSet3uiv(RTvariable v, const unsigned int *u)
RTresult RTAPI rtAccelerationSetProperty(RTacceleration acceleration, const char *name, const char *value)
Sets an acceleration structure property.
RTsize getPrintBufferSize() const
See rtContextGetPrintBufferSize.
Definition: optixpp_namespace.h:2567
RTresult RTAPI rtVariableSetMatrix2x3fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtContextGetRayTypeCount(RTcontext context, unsigned int *num_ray_types)
Query the number of ray types associated with this context.
RTresult RTAPI rtTextureSamplerGetFilteringModes(RTtexturesampler texturesampler, RTfiltermode *minification, RTfiltermode *magnification, RTfiltermode *mipmapping)
Gets the filtering modes of a texture sampler.
RTresult RTAPI rtTextureSamplerGetWrapMode(RTtexturesampler texturesampler, unsigned int dimension, RTwrapmode *wrapmode)
Gets the wrap mode of a texture sampler.
Variable declareVariable(const std::string &name)
Definition: optixpp_namespace.h:3484
void setChildCount(unsigned int count)
Definition: optixpp_namespace.h:2998
RTresult RTAPI rtContextLaunchProgressive2D(RTcontext context, unsigned int entry_index, RTsize width, RTsize height, unsigned int max_subframes)
Executes a Progressive Launch for a given context.
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:3331
int getGPUPagingActive() const
See rtContextGetAttribute.
Definition: optixpp_namespace.h:2374
RTresult RTAPI rtMaterialQueryVariable(RTmaterial material, const char *name, RTvariable *v)
Queries for the existence of a named variable of a material.
void removeVariable(Variable v)
Remove a variable associated with this object.
Definition: optixpp_namespace.h:2600
RTresult RTAPI rtVariableSetMatrix3x2fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtGeometrySetBoundingBoxProgram(RTgeometry geometry, RTprogram program)
Sets the bounding box program.
std::string getProperty(const std::string &name) const
Definition: optixpp_namespace.h:3169
RTtexturereadmode getReadMode() const
Query texture read mode for this sampler. See rtTextureSamplerGetReadMode.
Definition: optixpp_namespace.h:3633
RTresult RTAPI rtGeometrySetPrimitiveCount(RTgeometry geometry, unsigned int num_primitives)
Sets the number of primitives.
RTresult RTAPI rtVariableSetObject(RTvariable v, RTobject object)
Sets a program variable value to a OptiX object.
Buffer wraps the OptiX C API RTbuffer opaque type and its associated function set.
Definition: optixpp_namespace.h:1529
RTresult RTAPI rtBufferGetGLBOId(RTbuffer buffer, unsigned int *glId)
Gets the OpenGL Buffer Object ID associated with this buffer.
RTresult RTAPI rtBufferMapEx(RTbuffer buffer, unsigned int map_flags, unsigned int level, void *user_owned, void **optix_owned)
Maps mipmap level of buffer object to the host.
unsigned int getVariableCount() const
Definition: optixpp_namespace.h:3503
virtual Context getContext() const =0
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
RTresult RTAPI rtVariableGetMatrix2x4fv(RTvariable v, int transpose, float *m)
RTresult RTAPI rtContextSetEntryPointCount(RTcontext context, unsigned int num_entry_points)
Set the number of entry points for a given context.
void compile()
See rtContextCompile.
Definition: optixpp_namespace.h:2506
void setAttribute(RTcontextattribute attribute, const T &val)
See rtContextSetAttribute.
Definition: optixpp_namespace.h:2408
virtual const char * what() const
From std::exception.
Definition: optixpp_namespace.h:233
RTresult RTAPI rtTextureSamplerCreateFromGLImage(RTcontext context, unsigned int glId, RTgltarget target, RTtexturesampler *textureSampler)
Creates a new texture sampler object from an OpenGL image.
unsigned int getPrimitiveIndexOffset() const
Definition: optixpp_namespace.h:3360
RTwrapmode
Definition: optix_declarations.h:146
RTresult RTAPI rtContextGetPrintBufferSize(RTcontext context, RTsize *buffer_size_bytes)
Get the current size of the print buffer.
unsigned int addChild(T child)
Set a new child in this group and returns its new index. See rtSelectorSetChild.
Definition: optixpp_namespace.h:2773
void setFormat(RTformat format)
Definition: optixpp_namespace.h:3744
std::string getErrorString(RTresult code) const
See rtContextGetErrorString.
Definition: optixpp_namespace.h:2323
RTresult RTAPI rtContextRemoveVariable(RTcontext context, RTvariable v)
Removes a variable from the given context.
void markDirty()
Mark the buffer dirty.
Definition: optixpp_namespace.h:3785
void RTAPI rtContextGetErrorString(RTcontext context, RTresult code, const char **return_string)
Returns the error string associated with a given error.
RTresult RTAPI rtGeometryInstanceQueryVariable(RTgeometryinstance geometryinstance, const char *name, RTvariable *v)
Returns a handle to a named variable of a geometry node.
struct RTselector_api * RTselector
Definition: optix_host.h:93
RTresult RTAPI rtMaterialDeclareVariable(RTmaterial material, const char *name, RTvariable *v)
Declares a new named variable to be associated with a material.
RTresult RTAPI rtContextSetPrintLaunchIndex(RTcontext context, int x, int y, int z)
Sets the active launch index to limit text output.
Variable queryVariable(const std::string &name) const
Definition: optixpp_namespace.h:3293
RTresult RTAPI rtAccelerationValidate(RTacceleration acceleration)
Validates the state of an acceleration structure.
TextureSampler createTextureSamplerFromGLImage(unsigned int id, RTgltarget target)
Create TextureSampler from GL image. See rtTextureSamplerCreateFromGLImage.
Definition: optixpp_namespace.h:2182
RTresult RTAPI rtVariableSet1uiv(RTvariable v, const unsigned int *u)
void destroy()
call rt[ObjectType]Destroy on the underlying OptiX C object
Definition: optixpp_namespace.h:3222
RTresult RTAPI rtVariableSet4i(RTvariable v, int i1, int i2, int i3, int i4)
int getCPUNumThreads() const
See rtContextGetAttribute.
Definition: optixpp_namespace.h:2360
struct RTremotedevice_api * RTremotedevice
Definition: optix_host.h:108
void setBuilder(const std::string &builder)
Specify the acceleration structure builder. See rtAccelerationSetBuilder.
Definition: optixpp_namespace.h:3176
RTresult RTAPI rtProgramRemoveVariable(RTprogram program, RTvariable v)
Removes the named variable from a program.
RTresult RTAPI rtBufferCreateFromD3D10Resource(RTcontext context, unsigned int bufferdesc, ID3D10Resource *resource, RTbuffer *buffer)
Creates a new buffer object from a D3D10 resource.
RTresult RTAPI rtVariableGet2f(RTvariable v, float *f1, float *f2)
RTresult RTAPI rtGeometryGroupSetChild(RTgeometrygroup geometrygroup, unsigned int index, RTgeometryinstance geometryinstance)
Attaches a child node to a geometry group.
RTresult RTAPI rtGroupSetChildCount(RTgroup group, unsigned int count)
Sets the number of child nodes to be attached to the group.
void * RTobject
Definition: optix_host.h:105
Buffer getBuffer() const
Get the underlying buffer used for texture storage. See rtTextureSamplerGetBuffer.
Definition: optixpp_namespace.h:3669
RTresult RTAPI rtVariableGet1ui(RTvariable v, unsigned int *u1)
RTresult RTAPI rtContextSetRemoteDevice(RTcontext context, RTremotedevice remote_dev)
Enable rendering on a remote device.
RTresult RTAPI rtBufferGetId(RTbuffer buffer, int *buffer_id)
Gets an id suitable for use with buffers of buffers.
RTresult RTAPI rtTextureSamplerSetArraySize(RTtexturesampler texturesampler, unsigned int num_textures_in_array)
Sets the array size of a texture sampler.
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:2696
RTresult RTAPI rtVariableSet1f(RTvariable v, float f1)
Functions designed to modify the value of a program variable.
Definition: optix_declarations.h:324
Variable getVariable(unsigned int index) const
Query variable by index. See rt[ObjectType]GetVariable.
Definition: optixpp_namespace.h:3417
RTresult RTAPI rtVariableGetMatrix4x3fv(RTvariable v, int transpose, float *m)
RTresult RTAPI rtSelectorGetContext(RTselector selector, RTcontext *context)
Returns the context of a Selector node.
RTresult RTAPI rtTextureSamplerGLRegister(RTtexturesampler textureSampler)
Declares an OpenGL texture as immutable and accessible by OptiX.
void set1fv(const float *f)
Set variable value to a scalar float.
Definition: optixpp_namespace.h:4183
RTresult RTAPI rtVariableSetMatrix3x4fv(RTvariable v, int transpose, const float *m)
The Handle class is a reference counted handle class used to manipulate API objects.
Definition: optixpp_namespace.h:92
Geometry wraps the OptiX C API RTgeometry opaque type and its associated function set...
Definition: optixpp_namespace.h:1300
RTresult RTAPI rtBufferCreateFromGLBO(RTcontext context, unsigned int bufferdesc, unsigned int glId, RTbuffer *buffer)
Creates a new buffer object from an OpenGL buffer object.
RTresult RTAPI rtBufferMap(RTbuffer buffer, void **user_pointer)
Maps a buffer object to the host.
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3737
RTresult RTAPI rtRemoteDeviceRelease(RTremotedevice remote_dev)
Release reserved nodes on a remote device.
std::string getTraverser() const
Query the acceleration structure traverser. See rtAccelerationGetTraverser.
Definition: optixpp_namespace.h:3193
void setEntryPointCount(unsigned int num_entry_points)
See rtContextSetEntryPointCount.
Definition: optixpp_namespace.h:2430
RTresult RTAPI rtContextSetPrintEnabled(RTcontext context, int enabled)
Enable or disable text printing from programs.
static Context create()
Creates a Context object. See rtContextCreate.
Definition: optixpp_namespace.h:1930
RTresult RTAPI rtGroupSetAcceleration(RTgroup group, RTacceleration acceleration)
Set the acceleration structure for a group.
RTresult RTAPI rtContextLaunch2D(RTcontext context, unsigned int entry_point_index, RTsize image_width, RTsize image_height)
RTresult RTAPI rtProgramCreateFromPTXFile(RTcontext context, const char *filename, const char *program_name, RTprogram *program)
Creates a new program object.
RTresult RTAPI rtGeometryInstanceGetMaterialCount(RTgeometryinstance geometryinstance, unsigned int *count)
Returns the number of attached materials.
unsigned int getMipLevelCount() const
Query number of mipmap levels of buffer. See rtBufferGetMipLevelCount.
Definition: optixpp_namespace.h:3857
RTobjecttype getType() const
Query the object type of the variable.
Definition: optixpp_namespace.h:4342
RTresult RTAPI rtTransformGetContext(RTtransform transform, RTcontext *context)
Returns the context of a Transform node.
RTresult RTAPI rtContextSetStackSize(RTcontext context, RTsize stack_size_bytes)
Set the stack size for a given context.
TextureSampler createTextureSamplerFromD3D11Resource(ID3D11Resource *pResource)
Create TextureSampler from D3D11 image. Windows only. See rtTextureSamplerCreateFromD3D11Resource.
Definition: optixpp_namespace.h:2158
Buffer createBufferFromD3D11Resource(unsigned int type, ID3D11Resource *pResource)
Create buffer from D3D11 buffer object. Windows only. See rtBufferCreateFromD3D11Resource.
Definition: optixpp_namespace.h:2137
void removeVariable(Variable v)
Remove a variable associated with this object.
Definition: optixpp_namespace.h:3498
RTsize getSize() const
Get the size of the variable data in bytes (eg, float4 returns 4*sizeof(float) )
Definition: optixpp_namespace.h:4354
RTresult RTAPI rtTextureSamplerSetBuffer(RTtexturesampler texturesampler, unsigned int deprecated0, unsigned int deprecated1, RTbuffer buffer)
Attaches a buffer object to a texture sampler.
void registerD3D11Texture()
Declare the texture's buffer as immutable and accessible by OptiX. See rtTextureSamplerD3D11Register...
Definition: optixpp_namespace.h:3703
RTresult RTAPI rtAccelerationIsDirty(RTacceleration acceleration, int *dirty)
Returns the dirty flag of an acceleration structure.
void unregisterD3D9Buffer()
Unregister the buffer, re-enabling OptiX operations. See rtTextureSamplerD3D9Unregister.
Definition: optixpp_namespace.h:3905
Geometry createGeometry()
See rtGeometryCreate.
Definition: optixpp_namespace.h:2210
unsigned int getRayTypeCount() const
See rtContextGetRayTypeCount.
Definition: optixpp_namespace.h:2487
RTresult RTAPI rtRemoteDeviceReserve(RTremotedevice remote_dev, unsigned int num_nodes, unsigned int configuration)
Reserve nodes for rendering on a remote device.
RTresult RTAPI rtVariableSet3iv(RTvariable v, const int *i)
virtual void checkError(RTresult code) const
Definition: optixpp_namespace.h:1871
void unregisterGLBuffer()
Unregister the buffer, re-enabling OptiX operations. See rtTextureSamplerGLUnregister.
Definition: optixpp_namespace.h:3883
RTresult RTAPI rtProgramDestroy(RTprogram program)
Destroys a program object.
RTresult RTAPI rtTextureSamplerSetIndexingMode(RTtexturesampler texturesampler, RTtextureindexmode indexmode)
Sets whether texture coordinates for this texture sampler are normalized.
RTresult RTAPI rtSelectorGetChildType(RTselector selector, unsigned int index, RTobjecttype *type)
Returns type information about a Selector child node.
RTresult RTAPI rtAccelerationGetTraverser(RTacceleration acceleration, const char **return_string)
Query the current traverser from an acceleration structure.
virtual unsigned int getVariableCount() const =0
void setMipLevelClamp(float minLevel, float maxLevel)
Set minimum and maxnimum mipmap levels for this sampler. See rtTextureSamplerSetMipLevelClamp.
Definition: optixpp_namespace.h:3599
RTresult RTAPI rtTextureSamplerGetMipLevelBias(RTtexturesampler texturesampler, float *value)
Gets the mipmap offset for a texture sampler.
RTfiltermode
Definition: optix_declarations.h:155
void * map()
Definition: optixpp_namespace.h:3943
RTresult RTAPI rtBufferGetMipLevelSize1D(RTbuffer buffer, unsigned int level, RTsize *width)
Gets the width of buffer specific MIP level.
RTresult RTAPI rtBufferSetAttribute(RTbuffer buffer, RTbufferattribute attrib, RTsize size, void *p)
Set a buffer attribute.
void setMaxAnisotropy(float value)
Set maximum anisotropy for this sampler. See rtTextureSamplerSetMaxAnisotropy.
Definition: optixpp_namespace.h:3587
RTresult RTAPI rtTextureSamplerCreateFromD3D11Resource(RTcontext context, ID3D11Resource *resource, RTtexturesampler *textureSampler)
Creates a new texture sampler object from a D3D11 resource.
RTresult RTAPI rtContextGetStackSize(RTcontext context, RTsize *stack_size_bytes)
Query the stack size for this context.
void setExceptionEnabled(RTexception exception, bool enabled)
See rtContextSetExceptionEnabled.
Definition: optixpp_namespace.h:2469
Handle()
Default constructor initializes handle to null pointer.
Definition: optixpp_namespace.h:95
RTresult RTAPI rtTextureSamplerSetMaxAnisotropy(RTtexturesampler texturesampler, float value)
Sets the maximum anisotropy of a texture sampler.
RTresult RTAPI rtGeometryInstanceSetGeometry(RTgeometryinstance geometryinstance, RTgeometry geometry)
Attaches a Geometry node.
RTcontextattribute
Definition: optix_declarations.h:321
RTresult RTAPI rtBufferGetSize1D(RTbuffer buffer, RTsize *width)
Get the width of this buffer.
RTresult RTAPI rtContextSetMissProgram(RTcontext context, unsigned int ray_type_index, RTprogram program)
Specifies the miss program for a given context ray type.
RTresult RTAPI rtGroupGetChildType(RTgroup group, unsigned int index, RTobjecttype *type)
Get the type of a group child.
RTresult RTAPI rtGroupValidate(RTgroup group)
Verifies the state of the group.
RTresult RTAPI rtBufferGetMipLevelSize2D(RTbuffer buffer, unsigned int level, RTsize *width, RTsize *height)
Gets the width, height of buffer specific MIP level.
optix::int3 getPrintLaunchIndex() const
See rtContextGetPrintLaunchIndex.
Definition: optixpp_namespace.h:2579
void validate()
call rt[ObjectType]Validate on the underlying OptiX C object
Definition: optixpp_namespace.h:2974
Definition: optix_declarations.h:243
Definition: optix_declarations.h:288
Handle< VariableObj > operator[](const std::string &varname)
Definition: optixpp_namespace.h:571
RTresult RTAPI rtVariableSetMatrix2x4fv(RTvariable v, int transpose, const float *m)
RTresult RTAPI rtGeometryInstanceDestroy(RTgeometryinstance geometryinstance)
Destroys a geometry instance node.
void setChild(unsigned int index, T child)
Set an indexed child child of this group. See rtSelectorSetChild.
Definition: optixpp_namespace.h:2752
RTresult RTAPI rtVariableGet3i(RTvariable v, int *i1, int *i2, int *i3)
virtual Variable declareVariable(const std::string &name)=0
void unregisterD3D11Buffer()
Unregister the buffer, re-enabling OptiX operations. See rtTextureSamplerD3D11Unregister.
Definition: optixpp_namespace.h:3915
RTresult RTAPI rtContextDestroy(RTcontext context)
Destroys a context and frees all associated resources.
Acceleration getAcceleration() const
Query the Acceleration structure for this group. See rtGeometryGroupGetAcceleration.
Definition: optixpp_namespace.h:2991
RTremotedeviceattribute
Definition: optix_declarations.h:296
Variable object wraps OptiX C API RTvariable type and its related function set.
Definition: optixpp_namespace.h:387
RTobjecttype getChildType(unsigned int index) const
Query indexed child's type. See rtSelectorGetChildType.
Definition: optixpp_namespace.h:2765
virtual Variable getVariable(unsigned int index) const =0
Query variable by index. See rt[ObjectType]GetVariable.
RTresult RTAPI rtGeometryGetVariableCount(RTgeometry geometry, unsigned int *count)
Returns the number of attached variables.
RTresult RTAPI rtTextureSamplerGetMipLevelClamp(RTtexturesampler texturesampler, float *minLevel, float *maxLevel)
Gets the minimum and the maximum MIP level access range for a texture sampler.
RTsize getAvailableDeviceMemory(int ordinal) const
See rtContextGetAttribute.
Definition: optixpp_namespace.h:2388
Definition: optix_declarations.h:238
void setPrintEnabled(bool enabled)
Definition: optixpp_namespace.h:2550
T * operator->()
Dereferences the handle.
Definition: optixpp_namespace.h:130
void setRayGenerationProgram(unsigned int entry_point_index, Program program)
Definition: optixpp_namespace.h:2443
void unregisterGLTexture()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtTextureSamplerGLUnregister.
Definition: optixpp_namespace.h:3686
RTresult RTAPI rtTextureSamplerGetMipLevelCount(RTtexturesampler texturesampler, unsigned int *num_mip_levels)
Gets the number of MIP levels in a texture sampler.
struct RTtransform_api * RTtransform
Definition: optix_host.h:99
RTresult RTAPI rtTextureSamplerSetWrapMode(RTtexturesampler texturesampler, unsigned int dimension, RTwrapmode wrapmode)
Sets the wrapping mode of a texture sampler.
Program getBoundingBoxProgram() const
Get the bounding box program for this geometry. See rtGeometryGetBoundingBoxProgram.
Definition: optixpp_namespace.h:3372
RTresult RTAPI rtContextGetPrintEnabled(RTcontext context, int *enabled)
Query whether text printing from programs is enabled.
void getSize(RTsize &width) const
Query 1D buffer dimension. See rtBufferGetSize1D.
Definition: optixpp_namespace.h:3795
void setGeometry(Geometry geometry)
Definition: optixpp_namespace.h:3241
RTresult RTAPI rtBufferGetElementSize(RTbuffer buffer, RTsize *size_of_element)
Returns the size of a buffer's individual elements.
RTresult RTAPI rtRemoteDeviceCreate(const char *url, const char *username, const char *password, RTremotedevice *remote_dev)
Create a device for remote rendering on VCAs.
struct RTcontext_api * RTcontext
Definition: optix_host.h:72
RTresult RTAPI rtVariableSet1ui(RTvariable v, unsigned int u1)
void registerD3D10Buffer()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtBufferD3D10Register.
Definition: optixpp_namespace.h:3895
RTresult RTAPI rtVariableGet1i(RTvariable v, int *i1)
void registerD3D9Texture()
Definition: optixpp_namespace.h:3693
RTresult RTAPI rtSelectorGetChild(RTselector selector, unsigned int index, RTobject *child)
Returns a child node that is attached to a Selector node.
RTresult RTAPI rtGeometryInstanceGetContext(RTgeometryinstance geometryinstance, RTcontext *context)
Returns the context associated with a geometry instance node.
Buffer createMipmappedBuffer(unsigned int type, RTformat format, RTsize width, unsigned int levels)
Definition: optixpp_namespace.h:1984
RTresult RTAPI rtBufferD3D10Register(RTbuffer buffer)
Declares a D3D10 buffer as immutable and accessible by OptiX.
RTresult RTAPI rtVariableGetMatrix3x4fv(RTvariable v, int transpose, float *m)
int getGPUPagingForcedOff() const
See rtContextGetAttribute.
Definition: optixpp_namespace.h:2381
RTresult RTAPI rtVariableSet4iv(RTvariable v, const int *i)
RTresult RTAPI rtVariableSet1fv(RTvariable v, const float *f)
RTresult RTAPI rtMaterialValidate(RTmaterial material)
Verifies the state of a material.
RTresult RTAPI rtBufferGetD3D11Resource(RTbuffer buffer, ID3D11Resource **resource)
Gets the D3D11 resource associated with this buffer.
RTresult RTAPI rtVariableSet2iv(RTvariable v, const int *i)
void checkError(RTresult code) const
Definition: optixpp_namespace.h:1899
RTresult RTAPI rtContextSetRayTypeCount(RTcontext context, unsigned int num_ray_types)
Sets the number of ray types for a given context.
RTselector get()
Get the underlying OptiX C API RTselector opaque pointer.
Definition: optixpp_namespace.h:2859
RTsize getStackSize() const
See rtContextGetStackSize.
Definition: optixpp_namespace.h:2418
RTresult RTAPI rtSelectorSetChildCount(RTselector selector, unsigned int count)
Specifies the number of child nodes to be attached to a Selector node.
RTresult RTAPI rtBufferValidate(RTbuffer buffer)
Validates the state of a buffer.
struct RTgeometrygroup_api * RTgeometrygroup
Definition: optix_host.h:81
void getMipLevelSize(unsigned int level, RTsize &width) const
Query 1D buffer dimension of specific MIP level. See rtBufferGetMipLevelSize1D.
Definition: optixpp_namespace.h:3800
RTresult RTAPI rtSelectorGetVisitProgram(RTselector selector, RTprogram *program)
Returns the currently assigned visit program.
static Handle< T > create(const std::string &a, const std::string &b, const std::string &c)
Static RemoteDevice creation. Only valid for remote devices.
Definition: optixpp_namespace.h:169
RTresult RTAPI rtGeometryGroupSetAcceleration(RTgeometrygroup geometrygroup, RTacceleration acceleration)
Set the acceleration structure for a group.
Handle(const Handle< T > ©)
Takes a handle of the same type and creates a handle.
Definition: optixpp_namespace.h:105
Base class for all reference counted wrappers around OptiX C API opaque types.
Definition: optixpp_namespace.h:269
void unregisterD3D10Texture()
Declare the texture's buffer as mutable and inaccessible by OptiX. See rtTextureSamplerD3D10Unregiste...
Definition: optixpp_namespace.h:3713
RTresult RTAPI rtSelectorRemoveVariable(RTselector selector, RTvariable v)
Removes a variable from a Selector node.
RTresult RTAPI rtContextGetAttribute(RTcontext context, RTcontextattribute attrib, RTsize size, void *p)
Returns an attribute specific to an OptiX context.
RTbuffer get()
Get the underlying OptiX C API RTbuffer opaque pointer.
Definition: optixpp_namespace.h:3977
void setChildCount(unsigned int count)
Definition: optixpp_namespace.h:2739
unsigned int getVariableCount() const
Definition: optixpp_namespace.h:3305
RTresult RTAPI rtTextureSamplerD3D10Unregister(RTtexturesampler textureSampler)
Declares a D3D10 texture as mutable and inaccessible by OptiX.
RTresult RTAPI rtRemoteDeviceGetAttribute(RTremotedevice remote_dev, RTremotedeviceattribute attrib, RTsize size, void *p)
Queries attributes of a remote device.
Program getVisitProgram() const
Get the visitor program for this selector. See rtSelectorGetVisitProgram.
Definition: optixpp_namespace.h:2732
RTresult RTAPI rtBufferGetDimensionality(RTbuffer buffer, unsigned int *dimensionality)
Gets the dimensionality of this buffer object.
Program createProgramFromPTXString(const std::string &ptx, const std::string &program_name)
See rtProgramCreateFromPTXString.
Definition: optixpp_namespace.h:2302
void setPrintBufferSize(RTsize buffer_size_bytes)
See rtContextSetPrintBufferSize.
Definition: optixpp_namespace.h:2562
Handle(U *ptr)
Takes a raw pointer of arbitrary type and creates a handle.
Definition: optixpp_namespace.h:102
Context getContext() const
Retrieve the context this object is associated with. See rt[ObjectType]GetContext.
Definition: optixpp_namespace.h:3453
RTresult RTAPI rtContextSetD3D9Device(RTcontext context, IDirect3DDevice9 *device)
Binds a D3D9 device to a context and enables interop.
RTresult RTAPI rtVariableGetUserData(RTvariable v, RTsize size, void *ptr)
Defined.
void setD3D11Device(ID3D11Device *device)
Set the D3D device assocaiated with this context (Windows only). See rtContextSetD3D11Device.
Definition: optixpp_namespace.h:2175
RTresult RTAPI rtGeometryGroupCreate(RTcontext context, RTgeometrygroup *geometrygroup)
Creates a new geometry group.
TextureSampler createTextureSampler()
See rtTextureSamplerCreate.
Definition: optixpp_namespace.h:2316
int getId() const
Definition: optixpp_namespace.h:2677