#include <OpenGLRenderer.h>
Inheritance diagram for OpenGLRenderer:

Public Methods | |
| void | setup_initial_opengl_state (void) |
| initialize VMD's OpenGL state. More... | |
| OpenGLRenderer (const char *) | |
| constructor/destructor. More... | |
| virtual | ~OpenGLRenderer (void) |
| virtual int | supports_gui () |
| Does this display device support GUI's? The default stub display does not. More... | |
| virtual void | find_3D_from_2D (const float *A3D, const float *B2D, float *B3D) |
| virtual void | set_background (const float *) |
| set bg color. More... | |
| virtual void | set_backgradient (const float *, const float *) |
| set bg grad. More... | |
| virtual void | enable_stencil_stereo (void) |
| turn on stencil stereo. More... | |
| virtual void | disable_stencil_stereo (void) |
| turn off stencil stereo. More... | |
| virtual void | left (void) |
| ready to draw left eye. More... | |
| virtual void | right (void) |
| ready to draw right eye. More... | |
| virtual void | normal (void) |
| ready to draw non-stereo. More... | |
| virtual void | set_persp (DisplayEye=NOSTEREO) |
| set view configuration. More... | |
| virtual int | prepare3D (int do_clear=TRUE) |
| ready to draw 3D. More... | |
| virtual int | prepareOpaque () |
| draw opaque objects. More... | |
| virtual int | prepareTrans () |
| draw transparent objects. More... | |
| virtual void | clear (void) |
| erase the device. More... | |
| virtual void | render (const VMDDisplayList *) |
| process list of draw cmds. More... | |
| virtual void | render_done () |
| post-rendering operations. More... | |
| void | free_opengl_ctx () |
| free up gl context rsrcs. More... | |
| virtual int | forced_stereo_draws (void) |
| whether we must force mono draws in stereo or not. More... | |
| virtual void | set_stereo_mode (int=0) |
| set stereo mode, 0==off. More... | |
| virtual void | set_cache_mode (int) |
| set caching mode, 0==off. More... | |
| virtual void | set_render_mode (int) |
| set render mode, 0==norm. More... | |
| virtual void | loadmatrix (const Matrix4 &) |
| virtual routines to affect the devices transformation matrix. More... | |
| virtual void | multmatrix (const Matrix4 &) |
| virtual routines to affect the devices transformation matrix. More... | |
| virtual void | abs_screen_loc_3D (float *, long *) |
| return absolute 2D screen coordinates, given 2D or 3D world coordinates. More... | |
| virtual void | abs_screen_loc_2D (float *, long *) |
| return absolute 2D screen coordinates, given 2D or 3D world coordinates. More... | |
| virtual void | aa_on (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
| virtual void | aa_off (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
| virtual void | cueing_on (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
| virtual void | cueing_off (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
| virtual void | culling_on (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
| virtual void | culling_off (void) |
| functions to control depth cueing, culling, and antialiasing. More... | |
Protected Methods | |
| void | update_lists (void) |
| Update the OpenGL sphere/cylinder/etc display lists. More... | |
| void | update_shader_uniforms (void *, int forceupdate) |
| void | set_line_width (int) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | set_line_style (int) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | set_sphere_res (int) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | set_sphere_mode (int) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | cylinder (float *, float *, int, float, float) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | require_volume_texture (unsigned long ID, unsigned xsize, unsigned ysize, unsigned zsize, unsigned char *texmap) |
| routines to perform various OGL-specific graphics operations. More... | |
| int | build3Dmipmaps (int, int, int, unsigned char *tx) |
| routines to perform various OGL-specific graphics operations. More... | |
| void | draw_background_gradient (void) |
| routines to perform various OGL-specific graphics operations. More... | |
| virtual int | do_define_light (int n, float *color, float *position) |
| routines to deal with light sources at device level, return success/fail. More... | |
| virtual int | do_activate_light (int n, int turnon) |
| routines to deal with light sources at device level, return success/fail. More... | |
Protected Attributes | |
| float * | dataBlock |
| pointer to data block. More... | |
| int | ogl_cacheenabled |
| flag to enable display list caching. More... | |
| int | ogl_cachedebug |
| flag to enable printing of debug messages. More... | |
| GLint | ogl_cachelistbase |
| base index for display list cache. More... | |
| int | dpl_initialized |
| have we initialized display lists? More... | |
| GLuint | fontListBase |
| OpenGL display list base index for fonts. More... | |
| OpenGLExtensions * | ext |
| OpenGL Extensions class. More... | |
| int | simplegraphics |
| Force use of simplest OpenGL primitives. More... | |
| int | wiregl |
| Using Stanford's WireGL library. More... | |
| int | immersadeskflip |
| Immersadesk right-eye X-axis reflection mode. More... | |
| int | shearstereo |
| Use shear matrix stereo rather than eye rotation. More... | |
| GLUquadricObj * | pointsQuadric |
| quadric objects and display lists for spheres, cylinders, and disks. More... | |
| GLUquadricObj * | objQuadric |
| quadric objects and display lists for spheres, cylinders, and disks. More... | |
| ResizeArray< GLuint > | solidSphereLists |
| one sphere display list for each supported resolution. More... | |
| ResizeArray< GLuint > | pointSphereLists |
| quadric objects and display lists for spheres, cylinders, and disks. More... | |
| GLuint | SphereList |
| the current sphere display list. More... | |
| OpenGLCache | displaylistcache |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| OpenGLCache | texturecache |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | oglmaterialindex |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| float | oglopacity |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| float | oglambient |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| float | oglspecular |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| float | ogldiffuse |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| float | oglshininess |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLfloat | ogl_pmatrix [16] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLfloat | ogl_mvmatrix [16] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| Matrix4 | ogl_textMat |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLint | ogl_viewport [4] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLint | ogl_fogmode |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_lightingenabled |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_useblendedtrans |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_useglslshader |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_glslserial |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_glsltoggle |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_glslmaterialindex |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_glslprojectionmode |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_glsltexturemode |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_transpass |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_rendstateserial |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_clipmode [VMD_MAX_CLIP_PLANE] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_lightstate [DISP_LIGHTS] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLfloat | ogl_lightcolor [DISP_LIGHTS][4] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLfloat | ogl_lightpos [DISP_LIGHTS][4] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| GLfloat | ogl_backgradient [2][4] |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | ogl_acrobat3dcapture |
| cached copies of most recently used OpenGL state, materials, etc. More... | |
| int | hastex2d |
| 2D texturing features. More... | |
| GLint | max2DtexX |
| 2D texturing features. More... | |
| GLint | max2DtexY |
| 2D texturing features. More... | |
| GLint | max2DtexSize |
| 2D texturing features. More... | |
| int | hastex3d |
| 3D texturing features. More... | |
| GLint | max3DtexX |
| 3D texturing features. More... | |
| GLint | max3DtexY |
| 3D texturing features. More... | |
| GLint | max3DtexZ |
| 3D texturing features. More... | |
| GLint | max3DtexSize |
| 3D texturing features. More... | |
Definition at line 110 of file OpenGLRenderer.h.
|
|
constructor/destructor.
Definition at line 563 of file OpenGLRenderer.C. References dataBlock, dpl_initialized, ext, and NULL. |
|
|
Definition at line 577 of file OpenGLRenderer.C. References ext, objQuadric, and pointsQuadric. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 959 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, DisplayDevice::aaAvailable, DisplayDevice::aaEnabled, ext, and OpenGLExtensions::hasmultisample. Referenced by aa_on, and enable_stencil_stereo. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 923 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, aa_off, DisplayDevice::aaAvailable, DisplayDevice::aaEnabled, ext, OpenGLExtensions::hasmultisample, DisplayDevice::inStereo, and OPENGL_STEREO_STENCIL. Referenced by disable_stencil_stereo, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, and OpenGLDisplayDevice::init. |
|
||||||||||||
|
return absolute 2D screen coordinates, given 2D or 3D world coordinates.
Reimplemented from DisplayDevice. Definition at line 854 of file OpenGLRenderer.C. References abs_screen_loc_3D. |
|
||||||||||||
|
return absolute 2D screen coordinates, given 2D or 3D world coordinates.
Reimplemented from DisplayDevice. Definition at line 832 of file OpenGLRenderer.C. References ogl_mvmatrix, ogl_pmatrix, ogl_viewport, DisplayDevice::xOrig, and DisplayDevice::yOrig. Referenced by abs_screen_loc_2D. |
|
||||||||||||||||||||
|
routines to perform various OGL-specific graphics operations.
Definition at line 3200 of file OpenGLRenderer.C. References ext, GLTEXIMAGE3D, OpenGLExtensions::hastex3d, max3DtexX, max3DtexY, max3DtexZ, NULL, DisplayDevice::x, and DisplayDevice::y. Referenced by require_volume_texture. |
|
|
erase the device.
Reimplemented from DisplayDevice. Definition at line 1569 of file OpenGLRenderer.C. References ext, OpenGLExtensions::hasstereo, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_CROSSED, OPENGL_STEREO_CRYSTAL, OPENGL_STEREO_CRYSTAL_REVERSE, OPENGL_STEREO_DTISIDE, OPENGL_STEREO_SIDE, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, prepare3D, set_render_mode, and set_stereo_mode. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 993 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, DisplayDevice::cueingAvailable, and DisplayDevice::cueingEnabled. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, and OpenGLDisplayDevice::init. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 984 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, DisplayDevice::cueingAvailable, and DisplayDevice::cueingEnabled. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 1014 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, DisplayDevice::cullingAvailable, and DisplayDevice::cullingEnabled. |
|
|
functions to control depth cueing, culling, and antialiasing.
Reimplemented from DisplayDevice. Definition at line 1002 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, DisplayDevice::cullingAvailable, and DisplayDevice::cullingEnabled. |
|
||||||||||||||||||||||||
|
routines to perform various OGL-specific graphics operations.
Definition at line 669 of file OpenGLRenderer.C. References glPopMatrix, objQuadric, and VMD_PI. Referenced by render. |
|
|
turn off stencil stereo.
Definition at line 1212 of file OpenGLRenderer.C. References aa_on, DisplayDevice::inStereo, and OPENGL_STEREO_OFF. Referenced by set_stereo_mode. |
|
||||||||||||
|
routines to deal with light sources at device level, return success/fail.
Reimplemented from DisplayDevice. Definition at line 802 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, ogl_lightstate, and ogl_rendstateserial. |
|
||||||||||||||||
|
routines to deal with light sources at device level, return success/fail.
Reimplemented from DisplayDevice. Definition at line 779 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, ogl_lightcolor, ogl_lightpos, ogl_rendstateserial, and vec_normalize. |
|
|
routines to perform various OGL-specific graphics operations.
Definition at line 1599 of file OpenGLRenderer.C. References DisplayDevice::backgroundmode, ext, GLGLOBALALPHAFACTORFSUN, glPopMatrix, OpenGLExtensions::hasglobalalphasun, ogl_backgradient, ogl_clipmode, ogl_lightingenabled, ogl_useglslshader, and VMD_MAX_CLIP_PLANE. |
|
|
turn on stencil stereo.
Definition at line 1152 of file OpenGLRenderer.C. References aa_off, DisplayDevice::aaEnabled, DisplayDevice::aaPrevious, ext, glPopMatrix, OpenGLExtensions::hasstencilbuffer, OPENGL_STEREO_OFF, set_stereo_mode, DisplayDevice::xSize, and DisplayDevice::ySize. Referenced by OpenGLDisplayDevice::reshape, FltkOpenGLDisplayDevice::reshape, and set_stereo_mode. |
|
||||||||||||||||
|
Reimplemented from DisplayDevice. Definition at line 869 of file OpenGLRenderer.C. References ogl_mvmatrix, ogl_pmatrix, ogl_viewport, DisplayDevice::xSize, and DisplayDevice::ySize. |
|
|
whether we must force mono draws in stereo or not.
Reimplemented from DisplayDevice. Definition at line 292 of file OpenGLRenderer.h. References OpenGLExtensions::stereodrawforced. |
|
|
free up gl context rsrcs.
Definition at line 590 of file OpenGLRenderer.C. References OpenGLCache::deleteUnused, displaylistcache, fontListBase, GLCACHE_FAIL, OpenGLCache::markUnused, MAX_SPHERE_RES, MIN_SPHERE_RES, pointSphereLists, solidSphereLists, and texturecache. Referenced by FltkOpenGLDisplayDevice::~FltkOpenGLDisplayDevice, and OpenGLDisplayDevice::~OpenGLDisplayDevice. |
|
|
ready to draw left eye.
Reimplemented from DisplayDevice. Definition at line 1228 of file OpenGLRenderer.C. References draw_background_gradient, ext, OpenGLExtensions::hasstereo, DisplayDevice::inStereo, DisplayDevice::LEFTEYE, normal, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_CROSSED, OPENGL_STEREO_CRYSTAL, OPENGL_STEREO_CRYSTAL_REVERSE, OPENGL_STEREO_DTISIDE, OPENGL_STEREO_LEFT, OPENGL_STEREO_RIGHT, OPENGL_STEREO_SIDE, OPENGL_STEREO_STENCIL, DisplayDevice::RIGHTEYE, set_persp, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize. |
|
|
virtual routines to affect the devices transformation matrix.
Reimplemented from DisplayDevice. Definition at line 816 of file OpenGLRenderer.C. References Matrix4::mat. |
|
|
virtual routines to affect the devices transformation matrix.
Reimplemented from DisplayDevice. Definition at line 822 of file OpenGLRenderer.C. References Matrix4::mat. Referenced by render, FreeVRDisplayDevice::render, and CaveDisplayDevice::render. |
|
|
ready to draw non-stereo.
Reimplemented from DisplayDevice. Reimplemented in CaveDisplayDevice. Definition at line 1143 of file OpenGLRenderer.C. References draw_background_gradient, set_persp, DisplayDevice::xSize, and DisplayDevice::ySize. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, left, right, set_render_mode, and set_stereo_mode. |
|
|
ready to draw 3D.
Reimplemented from DisplayDevice. Definition at line 1526 of file OpenGLRenderer.C. References clear, displaylistcache, OpenGLCache::markUnused, oglmaterialindex, and texturecache. |
|
|
draw opaque objects.
Reimplemented from DisplayDevice. Definition at line 1548 of file OpenGLRenderer.C. References ogl_transpass. |
|
|
draw transparent objects.
Reimplemented from DisplayDevice. Definition at line 1558 of file OpenGLRenderer.C. References ogl_transpass. |
|
|
|
post-rendering operations.
Reimplemented from DisplayDevice. Definition at line 3151 of file OpenGLRenderer.C. References OpenGLCache::deleteUnused, displaylistcache, GLCACHE_FAIL, ogl_glsltoggle, and texturecache. |
|
||||||||||||||||||||||||
|
routines to perform various OGL-specific graphics operations.
Definition at line 3166 of file OpenGLRenderer.C. References build3Dmipmaps, OpenGLCache::encache, ext, OpenGLExtensions::hastex3d, OpenGLCache::markUsed, and texturecache. Referenced by render. |
|
|
ready to draw right eye.
Reimplemented from DisplayDevice. Definition at line 1307 of file OpenGLRenderer.C. References draw_background_gradient, ext, OpenGLExtensions::hasstereo, DisplayDevice::inStereo, DisplayDevice::LEFTEYE, normal, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_CROSSED, OPENGL_STEREO_CRYSTAL, OPENGL_STEREO_CRYSTAL_REVERSE, OPENGL_STEREO_DTISIDE, OPENGL_STEREO_LEFT, OPENGL_STEREO_RIGHT, OPENGL_STEREO_SIDE, OPENGL_STEREO_STENCIL, DisplayDevice::RIGHTEYE, set_persp, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize. |
|
||||||||||||
|
set bg grad.
Reimplemented from DisplayDevice. Definition at line 1046 of file OpenGLRenderer.C. References ogl_backgradient. |
|
|
set bg color.
Reimplemented from DisplayDevice. Definition at line 1025 of file OpenGLRenderer.C. |
|
|
set caching mode, 0==off.
Reimplemented from DisplayDevice. Definition at line 1078 of file OpenGLRenderer.C. References DisplayDevice::cacheMode, and ogl_cacheenabled. |
|
|
routines to perform various OGL-specific graphics operations.
Definition at line 630 of file OpenGLRenderer.C. References DisplayDevice::lineStyle. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, and render. |
|
|
routines to perform various OGL-specific graphics operations.
Definition at line 622 of file OpenGLRenderer.C. References DisplayDevice::lineWidth. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, and render. |
|
|
|
set render mode, 0==norm.
Reimplemented from DisplayDevice. Definition at line 1084 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, clear, ext, OpenGLExtensions::hasglobalalphasun, normal, ogl_acrobat3dcapture, ogl_useblendedtrans, ogl_useglslshader, OPENGL_RENDER_ACROBAT3D, OPENGL_RENDER_GALPHA, OPENGL_RENDER_GLSL, OPENGL_RENDER_NORMAL, DisplayDevice::renderMode, DisplayDevice::reshape, and DisplayDevice::update. |
|
|
routines to perform various OGL-specific graphics operations.
Definition at line 657 of file OpenGLRenderer.C. References DisplayDevice::sphereMode, and update_lists. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, and render. |
|
|
routines to perform various OGL-specific graphics operations.
Definition at line 642 of file OpenGLRenderer.C. References DisplayDevice::sphereRes, and update_lists. Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLDisplayDevice::init, and render. |
|
|
set stereo mode, 0==off.
Reimplemented from DisplayDevice. Reimplemented in CaveDisplayDevice. Definition at line 1058 of file OpenGLRenderer.C. References DisplayDevice::_needRedraw, clear, disable_stencil_stereo, enable_stencil_stereo, DisplayDevice::inStereo, normal, OPENGL_STEREO_STENCIL, DisplayDevice::reshape, and DisplayDevice::update. Referenced by enable_stencil_stereo. |
|