Table of Contents
The examples have go.sh scripts which perform the normal config, make, install using a fresh build dir every time. This is a convenient when the focus is on the CMake machinery.
(plain vanilla modern CMake with target import/export)
(plain vanilla modern CMake)
(modern CMake assisted by BCM)
UseUseGLMViaBCM
- similar observations to UseUseGLM
Attempt to vend a library target that uses Boost::filesystem:
16 find_package(Boost REQUIRED COMPONENTS filesystem) 17 18 ## kludge that tees up arguments to find_dependency in generated export useboost-config.cmake 19 ## so downstream will automatically do the above find_package 20 set_target_properties(Boost::filesystem PROPERTIES INTERFACE_FIND_PACKAGE_NAME "Boost REQUIRED COMPONENTS filesystem")
attempt to use the lib target exported from UseBoost, initially failed to auto hookup the non-direct Boost::filesystem dependent, because useboost-config.cmake had:
include(CMakeFindDependencyMacro)
# Library: Boost::filesystem
find_dependency(Boost)
include("${CMAKE_CURRENT_LIST_DIR}/useboost-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/properties-useboost-targets.cmake")
Suspect problem is that the non-BCM exported targets lack some needed metadata ? YEP, BCM relies on setting target properties in bcm_deploy that get read on generating the exported target serialization. Kludge fix is to misuse that property as shown above, so that the imported target automatically does the necessary:
find_dependency(Boost REQUIRED COMPONENTS filesystem) # this works with cmake_minimum_version set to 3.5 with cmake 3.11
old first attempt using raw inclusion of exported targets with the non-standard approach of cmake -DOPTICKS_CONFIG_DIR=/usr/local/opticks/config rather than using the standard find_package mechanism
Formerly named UseOpticksGLFWShader
This is a good starting point for creating self contained minimal reproducers.
Creates red-green-blue axes
Implemented in standalone single file fashion that sets up a geometry shader pipeline using the same shader strings as the Rdr axis renderer as used by UseOGLRapMinimal. All the mat4 have been matched with UseOGLRapMinimal.
Features a monolithic standalone getMVP, providing the ModelViewProjection matrix, which is useful for demo code.:
glm::mat4 getMVP(int width, int height, bool verbose)
Actually it was the comparison of the mat4 between UseOGLRapMinimal which uses View::getTransforms and my standalone reimplementation of the matrix manipulations in UseGeometryShader that led to finding the "uninitialized forth row bug" that has been lurking for years ready to bite just at the wrong time following a Linux kernel and driver update and OptiX update.
See the mis-named: notes/issues/OGLRap_GLFW_OpenGL_Linux_display_issue_with_new_driver.rst
record array rec_flying_point viz using early stage of SGLFW.h encapulation (refreshed July 2025)
The below sections list examples using OptiX, named after directory names. Many of the examples are standalone in nature, not depending on an Opticks install. The steps to build (and sometimes run) are often simply:
cd ~/opticks/examples/UseOptiX ./go.sh cd ~/opticks/examples/UseOptiX7GeometryInstanced ./go.sh
Minimally demonstrate the use of optix::GeometryTriangles introduced in OptiX 6.0.0. Raytraces an octahedron writing a PPM file. Based on NPY and SYSRAP for buffer and PPM handling. No OXRAP.
Ray-traced theta-phi texture mapping onto a sphere, when using an Earth texture this provides Earth view PPM images centered around any latitude-longitude position. This example was used to develop the watertight OptiX OCtx wrapper (C opaque pointer style) which does not leak any optix types into its interface.
Intersects are highly instrumented with the position of each interesect recorded into a pos buffer.
start from UseOptiXGeometryInstancedStandalone, plan:
jumble of thousands of spheres gradient shaded with red/green/blue border/midline/quadline
start from UseOptiXGeometryInstanced, using just OCtx
/tmp/octx.sh : normal shaded assembly of boxes and spheres /tmp/octx.sh global : global shaded assembly of boxes and spheres /tmp/octx.sh textured,tex1 : textured assembly of boxes and spheres, using tex1 green midline
/tmp/octx.sh single : normal shaded single box and sphere /tmp/octx.sh single,textured,tex1 : single box and sphere
/tmp/octx.sh textest,tex0 : vertical gradient with red border /tmp/octx.sh textest,tex1 : vertical gradient with green midlines /tmp/octx.sh textest,tex2 : vertical gradient with blue quadlines
ISSUE
on Linux/OptiX 6.5 the spheres are appearing as big boxes but there is no problem with the sphere implementation when used not in an assembly. Perhaps problem with the transforms/scaling/bbox ?
ISSUE HAS DISAPPEARED
Returning to this issue after implementing IntersectSDF to automatically test for such problems find that the problem is no longer happening.
Start from UseOptiX7GeometryStandalone Apply wrecking ball to the monolith, splitting into:
Revisited this, tidying up the headers aiming to eliminate optix types from high levels in order to hide the version. (Feb 2024: updated for OptiX 7.5+)
Started from UseOptiX7GeometryInstanced.
(Feb 2024: updated for OptiX 7.5+)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。