#include <OptiXRenderer.h>
Public Types | |
enum | ClipMode { RT_CLIP_NONE = 0, RT_CLIP_PLANE = 1, RT_CLIP_SPHERE = 2 } |
enum | HeadlightMode { RT_HEADLIGHT_OFF = 0, RT_HEADLIGHT_ON = 1 } |
enum | FogMode { RT_FOG_NONE = 0, RT_FOG_LINEAR = 1, RT_FOG_EXP = 2, RT_FOG_EXP2 = 3 } |
enum | CameraProjection { RT_PERSPECTIVE = 0, RT_ORTHOGRAPHIC = 1, RT_CUBEMAP = 2, RT_DOME_MASTER = 3, RT_EQUIRECTANGULAR = 4, RT_OCULUS_RIFT } |
enum | Verbosity { RT_VERB_MIN = 0, RT_VERB_TIMING = 1, RT_VERB_DEBUG = 2 } |
enum | BGMode { RT_BACKGROUND_TEXTURE_SOLID = 0, RT_BACKGROUND_TEXTURE_SKY_SPHERE = 1, RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE = 2 } |
enum | RayType { RT_RAY_TYPE_RADIANCE = 0, RT_RAY_TYPE_SHADOW = 1, RT_RAY_TYPE_COUNT = 2 } |
enum | RayGen { RT_RAY_GEN_CLEAR_ACCUMULATION_BUFFER = 0, RT_RAY_GEN_ACCUMULATE = 1, RT_RAY_GEN_COPY_FINISH = 2, RT_RAY_GEN_COUNT = 3 } |
Public Methods | |
OptiXRenderer (VMDApp *vmdapp) | |
constructor ... initialize some variables. More... | |
~OptiXRenderer (void) | |
destructor. More... | |
void | check_verbose_env () |
check environment variables that modify verbose output. More... | |
void | create_context (void) |
initialize the OptiX context. More... | |
void | setup_context (int width, int height) |
void | report_context_stats (void) |
report various context statistics for memory leak debugging, etc. More... | |
void | shadows_on (int onoff) |
shadows. More... | |
void | set_aa_samples (int cnt) |
antialiasing (samples > 1 == on). More... | |
void | set_camera_projection (CameraProjection m) |
set the camera projection mode. More... | |
void | set_camera_zoom (float zoomfactor) |
set camera zoom factor. More... | |
void | set_camera_stereo_eyesep (float eyesep) |
set stereo eye separation. More... | |
void | set_camera_stereo_convergence_dist (float dist) |
set stereo convergence distance. More... | |
void | dof_on (int onoff) |
depth of field on/off. More... | |
void | set_camera_dof_focal_dist (float d) |
set depth of field focal plane distance. More... | |
void | set_camera_dof_fnumber (float n) |
set depth of field f/stop number. More... | |
void | set_ao_samples (int cnt) |
ambient occlusion (samples > 1 == on). More... | |
void | set_ao_ambient (float aoa) |
set AO ambient lighting factor. More... | |
void | set_ao_direct (float aod) |
set AO direct lighting factor. More... | |
void | set_bg_mode (BGMode m) |
void | set_bg_color (float *rgb) |
void | set_bg_color_grad_top (float *rgb) |
void | set_bg_color_grad_bot (float *rgb) |
void | set_bg_gradient (float *vec) |
void | set_bg_gradient_topval (float v) |
void | set_bg_gradient_botval (float v) |
void | set_clip_sphere (ClipMode mode, float start, float end) |
set camera clipping plane/sphere mode and parameters. More... | |
void | set_cue_mode (FogMode mode, float start, float end, float density) |
set depth cueing mode and parameters. More... | |
void | init_materials () |
void | add_material (int matindex, float ambient, float diffuse, float specular, float shininess, float reflectivity, float opacity, float outline, float outlinewidth, int transmode) |
void | set_material (RTgeometryinstance instance, int matindex, const float *uniform_color, int hwtri=0) |
void | clear_all_lights () |
void | set_clipview_mode (int mode) |
void | set_headlight_onoff (int onoff) |
void | add_directional_light (const float *dir, const float *color) |
void | add_positional_light (const float *pos, const float *color) |
void | update_rendering_state (int interactive) |
void | framebuffer_config (int fbwidth, int fbheight, int interactive) |
void | framebuffer_resize (int fbwidth, int fbheight) |
void | framebuffer_map_rgb4u (unsigned char **imgrgb4u) |
void | framebuffer_unmap () |
void | framebuffer_destroy (void) |
void | render_compile_and_validate (void) |
void | render_to_file (const char *filename, int writealpha) |
void | render_to_videostream (const char *filename, int writealpha) |
void | destroy_scene (void) |
void | destroy_context (void) |
void | cylinder_array (Matrix4 *wtrans, float rscale, const float *uniform_color, int cylnum, const float *points, int matindex) |
void | cylinder_array_color (Matrix4 *wtrans, float rscale, int cylnum, const float *points, const float *radii, const float *colors, int matindex) |
void | ring_array_color (Matrix4 &wtrans, float rscale, int rnum, const float *centers, const float *norms, const float *radii, const float *colors, int matindex) |
void | sphere_array (Matrix4 *wtrans, float rscale, const float *uniform_color, int spnum, const float *centers, const float *radii, int matindex) |
void | sphere_array_color (Matrix4 &wtrans, float rscale, int spnum, const float *centers, const float *radii, const float *colors, int matindex) |
void | tricolor_list (Matrix4 &wtrans, int numtris, const float *vnc, int matindex) |
void | trimesh_c4n3v3 (Matrix4 &wtrans, int numverts, const float *cnv, int numfacets, const int *facets, int matindex) |
void | trimesh_c4u_n3b_v3f (Matrix4 &wtrans, const unsigned char *c, const signed char *n, const float *v, int numfacets, int matindex) |
void | trimesh_c4u_n3f_v3f (Matrix4 &wtrans, const unsigned char *c, const float *n, const float *v, int numfacets, int matindex) |
void | trimesh_n3b_v3f (Matrix4 &wtrans, const float *uniform_color, const signed char *n, const float *v, int numfacets, int matindex) |
void | trimesh_n3f_v3f (Matrix4 &wtrans, const float *uniform_color, const float *n, const float *v, int numfacets, int matindex) |
void | trimesh_v3f (Matrix4 &wtrans, const float *uniform_color, const float *v, int numfacets, int matindex) |
void | tristrip (Matrix4 &wtrans, int numverts, const float *cnv, int numstrips, const int *vertsperstrip, const int *facets, int matindex) |
Static Public Methods | |
unsigned int | device_list (int **, char ***) |
static methods for querying OptiX-supported GPU hardware independent of whether we actually have an active context. More... | |
unsigned int | device_count (void) |
unsigned int | optix_version (void) |
int | material_shader_table_size (void) |
|
Definition at line 190 of file OptiXRenderer.h. |
|
Definition at line 182 of file OptiXRenderer.h. |
|
Definition at line 179 of file OptiXRenderer.h. |
|
Definition at line 181 of file OptiXRenderer.h. |
|
Definition at line 180 of file OptiXRenderer.h. |
|
Definition at line 196 of file OptiXRenderer.h. |
|
Definition at line 193 of file OptiXRenderer.h. |
|
Definition at line 189 of file OptiXRenderer.h. Referenced by device_count, device_list, get_verbose_flag, and optix_version. |
|
constructor ... initialize some variables.
Definition at line 688 of file OptiXRenderer.C. References check_verbose_env, create_context, destroy_scene, NULL, PROFILE_POP_RANGE, PROFILE_PUSH_RANGE, RT_BACKGROUND_TEXTURE_SOLID, RT_CLIP_NONE, RT_CLIP_SPHERE, RT_FOG_NONE, RT_HEADLIGHT_OFF, RT_HEADLIGHT_ON, RT_SHADOWS_OFF, RT_VERB_MIN, wkf_timer_create, and wkf_timer_start. |
|
destructor.
Definition at line 795 of file OptiXRenderer.C. References destroy_context, PROFILE_POP_RANGE, PROFILE_PUSH_RANGE, and wkf_timer_destroy. |
|
Definition at line 5563 of file OptiXRenderer.C. References ResizeArray< ort_directional_light >::append, ort_directional_light::color, ort_directional_light::dir, and vec_copy. |
|
|
Definition at line 5572 of file OptiXRenderer.C. References ResizeArray< ort_positional_light >::append, ort_positional_light::color, ort_positional_light::pos, and vec_copy. |
|
check environment variables that modify verbose output.
Definition at line 806 of file OptiXRenderer.C. References get_verbose_flag. Referenced by OptiXRenderer, and setup_context. |
|
Definition at line 632 of file OptiXRenderer.h. References ResizeArray::clear. |
|
initialize the OptiX context.
Definition at line 1006 of file OptiXRenderer.C. References device_list, init_materials, NULL, RT_RAY_TYPE_COUNT, RT_VERB_DEBUG, RT_VERB_TIMING, RTERR, RTERR2, and wkf_timer_timenow. Referenced by OptiXRenderer. |
|
Definition at line 5593 of file OptiXRenderer.C. References Matrix4::multpoint3d, vmd_cylinder::radius, RT_VERB_DEBUG, RTERR, set_material, vec_copy, and vec_sub. Referenced by OptiXDisplayDevice::text. |
|
Definition at line 5654 of file OptiXRenderer.C. References Matrix4::multpoint3d, vmd_cylinder_color::radius, RT_VERB_DEBUG, RTERR, set_material, vec_copy, and vec_sub. Referenced by OptiXDisplayDevice::send_cylinder_buffer. |
|
Definition at line 5337 of file OptiXRenderer.C. References framebuffer_destroy. Referenced by ~OptiXRenderer. |
|
Definition at line 1407 of file OptiXRenderer.C. References ResizeArray< ort_material >::clear, ResizeArray< RTbuffer >::clear, ResizeArray< RTgeometry >::clear, ResizeArray< RTgeometryinstance >::clear, ResizeArray< RTbuffer >::num, ResizeArray< RTgeometry >::num, ResizeArray< RTgeometryinstance >::num, RTERR, and wkf_timer_timenow. Referenced by OptiXRenderer, and OptiXDisplayDevice::write_trailer. |
|
Definition at line 968 of file OptiXRenderer.C. References device_list, get_verbose_flag, NULL, RT_VERB_DEBUG, and Verbosity. Referenced by OptiXDisplayDevice::device_count. |
|
static methods for querying OptiX-supported GPU hardware independent of whether we actually have an active context.
Definition at line 818 of file OptiXRenderer.C. References get_verbose_flag, NULL, RT_VERB_DEBUG, and Verbosity. Referenced by create_context, and device_count. |
|
depth of field on/off.
Definition at line 584 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
Definition at line 2177 of file OptiXRenderer.C. References framebuffer_destroy, framebuffer_resize, RT_VERB_DEBUG, and RTERR. Referenced by render_to_file, and render_to_videostream. |
|
Definition at line 2327 of file OptiXRenderer.C. References RTERR. Referenced by destroy_context, and framebuffer_config. |
|
Definition at line 2317 of file OptiXRenderer.C. |
|
Definition at line 2296 of file OptiXRenderer.C. References RT_VERB_DEBUG, and RTERR. Referenced by framebuffer_config. |
|
Definition at line 2322 of file OptiXRenderer.C. |
|
Definition at line 5396 of file OptiXRenderer.C. References onoffstr, ORTMTABSZ, RT_CLIP_SPHERE, RT_RAY_TYPE_RADIANCE, RT_RAY_TYPE_SHADOW, RT_VERB_DEBUG, and RTERR. Referenced by create_context. |
|
Definition at line 996 of file OptiXRenderer.C. References ORTMTABSZ. |
|
Definition at line 984 of file OptiXRenderer.C. References get_verbose_flag, RT_VERB_DEBUG, and Verbosity. |
|
Definition at line 2350 of file OptiXRenderer.C. References NULL, query_meminfo_ctx_devices, RT_RAY_GEN_ACCUMULATE, RT_VERB_DEBUG, RTERR, and wkf_timer_timenow. Referenced by render_to_file, and render_to_videostream. |
|
Definition at line 4948 of file OptiXRenderer.C. References framebuffer_config, OptiXPrintRayStats, OptiXWriteImage, render_compile_and_validate, RT_RAY_GEN_ACCUMULATE, RT_RAY_GEN_CLEAR_ACCUMULATION_BUFFER, RT_RAY_GEN_COPY_FINISH, RT_VERB_DEBUG, RT_VERB_TIMING, RTERR, update_rendering_state, and wkf_timer_timenow. Referenced by OptiXDisplayDevice::write_trailer. |
|
|
report various context statistics for memory leak debugging, etc.
Definition at line 1397 of file OptiXRenderer.C. References RTERR. |
|
Definition at line 5737 of file OptiXRenderer.C. References vmd_ring_color::inrad, Matrix4::multnorm3d, Matrix4::multpoint3d, vmd_ring_color::outrad, vmd_ring_color::pad, RT_VERB_DEBUG, RTERR, set_material, vec_copy, and vec_normalize. Referenced by OptiXDisplayDevice::send_cylinder_buffer. |
|
antialiasing (samples > 1 == on).
Definition at line 567 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
set AO ambient lighting factor.
Definition at line 596 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
set AO direct lighting factor.
Definition at line 599 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
ambient occlusion (samples > 1 == on).
Definition at line 593 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
Definition at line 602 of file OptiXRenderer.h. |
|
Definition at line 604 of file OptiXRenderer.h. |
|
Definition at line 603 of file OptiXRenderer.h. |
|
Definition at line 605 of file OptiXRenderer.h. |
|
Definition at line 607 of file OptiXRenderer.h. |
|
Definition at line 606 of file OptiXRenderer.h. |
|
Definition at line 601 of file OptiXRenderer.h. |
|
set depth of field f/stop number.
Definition at line 590 of file OptiXRenderer.h. References n. Referenced by OptiXDisplayDevice::write_header. |
|
set depth of field focal plane distance.
Definition at line 587 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
set the camera projection mode.
Definition at line 570 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_trailer. |
|
set stereo convergence distance.
Definition at line 579 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_trailer. |
|
set stereo eye separation.
Definition at line 576 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_trailer. |
|
set camera zoom factor.
Definition at line 573 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_trailer. |
|
set camera clipping plane/sphere mode and parameters.
Definition at line 610 of file OptiXRenderer.h. |
|
Definition at line 636 of file OptiXRenderer.h. |
|
set depth cueing mode and parameters.
Definition at line 617 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
Definition at line 639 of file OptiXRenderer.h. |
|
Definition at line 5489 of file OptiXRenderer.C. References ORTMTABSZ, RT_CLIP_NONE, RT_FOG_NONE, RT_HEADLIGHT_OFF, RT_SHADOWS_OFF, and RTERR. Referenced by cylinder_array, cylinder_array_color, ring_array_color, sphere_array, sphere_array_color, tricolor_list, trimesh_c4n3v3, trimesh_c4u_n3b_v3f, trimesh_c4u_n3f_v3f, trimesh_n3b_v3f, trimesh_n3f_v3f, trimesh_v3f, and tristrip. |
|
Definition at line 1336 of file OptiXRenderer.C. References check_verbose_env, RTERR, and wkf_timer_timenow. Referenced by OptiXDisplayDevice::write_header. |
|
shadows.
Definition at line 564 of file OptiXRenderer.h. Referenced by OptiXDisplayDevice::write_header. |
|
Definition at line 5791 of file OptiXRenderer.C. References Matrix4::multpoint3d, vmd_sphere::radius, RT_VERB_DEBUG, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::text. |
|
Definition at line 5865 of file OptiXRenderer.C. References Matrix4::multpoint3d, vmd_sphere_color::pad, vmd_sphere_color::radius, RT_VERB_DEBUG, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::send_sphere_buffer, OptiXDisplayDevice::sphere, and OptiXDisplayDevice::sphere_array. |
|
Definition at line 6007 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::tricolor. |
|
Definition at line 6161 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, RT_VERB_DEBUG, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::trimesh_c4n3v3. |
|
Definition at line 6341 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, n, vmd_trimesh_c4u_n3b_v3f::n0, vmd_trimesh_c4u_n3b_v3f::n1, vmd_trimesh_c4u_n3b_v3f::n2, RT_VERB_DEBUG, RTERR, and set_material. Referenced by OptiXDisplayDevice::trimesh_c4u_n3b_v3f. |
|
Definition at line 6516 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, n, RT_VERB_DEBUG, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::trimesh_c4u_n3f_v3f. |
|
Definition at line 6693 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, n, vmd_trimesh_n3b_v3f::n0, vmd_trimesh_n3b_v3f::n1, vmd_trimesh_n3b_v3f::n2, RT_VERB_DEBUG, RTERR, and set_material. Referenced by OptiXDisplayDevice::trimesh_n3b_v3f. |
|
Definition at line 6860 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, n, RT_VERB_DEBUG, RTERR, and set_material. Referenced by OptiXDisplayDevice::send_triangle_buffer, and OptiXDisplayDevice::trimesh_n3f_v3f. |
|
Definition at line 6997 of file OptiXRenderer.C. References Matrix4::multpoint3d, RT_VERB_DEBUG, RTERR, and set_material. Referenced by OptiXDisplayDevice::trimesh_n3fopt_v3f. |
|
Definition at line 7170 of file OptiXRenderer.C. References Matrix4::multnorm3d, Matrix4::multpoint3d, RT_VERB_DEBUG, RTERR, set_material, and vec_copy. Referenced by OptiXDisplayDevice::tristrip. |
|