Implement dynamic material example and dynamic geometry example #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request add the support for the following:
New examples
dynamic_geometry.pydynamic_materials.pyAdd support for interactive OpenGL examples:
optix.sutilsubmodule to mimic the optix SDK sutil API (optix/SDK/sutil).sutil.camera.Camerawhich implements allsutil/Camera.hfeatures.sutil.camera.Trackballwhich implements allsutil/Trackball.hfeatures.sutil.cuda_output_buffer.CudaOutputBufferwhich implementssutil/CUDAOutputBuffer.hfeatures (currently only supportsCUDA_DEVICEmode,GL_INTEROPsupport may be added later once available in cupy).sutil.gl_display.GLDisplaywhich implements allsutil/GLDisplay.hfeatures.sutil.guiwhich implements some GUI features ofsutil/sutil.h(init_ui, display_text, display_stats).sutil.vecmathwhich implements basic vector operations (dot product, cross product, normalize, length).1. OpenGL -> PyOpenGL
2. glfw -> pyglfw
3. imgui -> pyimgui, pyimgui[glfw]
New features:
The two new examples required some additions to the existing wrapper:
module.pyx:get_default_nvrtc_compile_flags().OptixBuildInputInstanceArray.instancesis now public to be able to update instances directly in python.build.pyx:BuildInputInstanceArray.update_instance().build.pyx:BuildInputCustomPrimitiveArray.update_traversable().build.pyx:BuildInputInstanceArray.get_transform_view().ProgramGroupinstead of a singleProgramGroup.struct.pyx:SbtRecord.update_program_group().Bug fixes
2**(sizeof(unsigned int) * 8) - 1to2**max_visibility_mask_bits - 1.OPTIX_PRIMITIVE_TYPE_FLAGS_TRIANGLE = 1 << 31is a negative C int affected to a python integer (enum.IntEnum.value). Optix expects unsigned int flags in its structs, which led to a Cython conversion error: cannot affect negative python int to unsigned int. This bug may affect other enums.