Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OpenGLRenderer Class Reference

DisplayDevice subclass implementing the low-level OpenGL rendering functions used by several derived DisplayDevice subclasses. This class renders drawing commands into a window provided by one of the further subclasses. More...

#include <OpenGLRenderer.h>

Inheritance diagram for OpenGLRenderer:

DisplayDevice CaveDisplayDevice FltkOpenGLDisplayDevice FreeVRDisplayDevice OpenGLDisplayDevice OpenGLPbufferDisplayDevice VRJugglerDisplayDevice List of all members.

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 (int newMode)
 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 draw cmd list. More...

virtual void render_done ()
 post-rendering ops. More...

void free_opengl_ctx ()
 free 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 set_window_title (char *)
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 *, float *)
 return normalized absolut 3D screen coordinates, given 3D world coordinates. More...

virtual void abs_screen_loc_2D (float *, float *)
 return absolute 2D screen coordinates, given 2D 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

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 font1pxListBase
 1-pixel wide non-AA font display list. More...

GLuint fontNpxListBase
 N-pixel wide antialiased font display list. More...

OpenGLExtensionsext
 OpenGL Extensions class. More...

int simplegraphics
 Force use of simplest OpenGL primitives. More...

int wiregl
 Using Stanford's WireGL library. More...

int intelswr
 Intel's OpenSWR software rasterizer. More...

int immersadeskflip
 Immersadesk right-eye X-axis reflection mode. More...

int shearstereo
 Use shear matrix stereo rather than eye rotation. More...

ResizeArray< GLuint > solidSphereLists
 quadric objects and display lists for spheres, cylinders, and disks one sphere display list for each supported resolution. More...

ResizeArray< GLuint > pointSphereLists
 quadric objects and display lists for spheres, cylinders, and disks one sphere display list for each supported resolution. 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...

float ogloutline
 cached copies of most recently used OpenGL state, materials, etc. More...

float ogloutlinewidth
 cached copies of most recently used OpenGL state, materials, etc. More...

int ogltransmode
 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_backcolor [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...


Detailed Description

DisplayDevice subclass implementing the low-level OpenGL rendering functions used by several derived DisplayDevice subclasses. This class renders drawing commands into a window provided by one of the further subclasses.

Definition at line 137 of file OpenGLRenderer.h.


Constructor & Destructor Documentation

OpenGLRenderer::OpenGLRenderer const char *   
 

constructor/destructor.

Definition at line 1427 of file OpenGLRenderer.C.

References dpl_initialized, ext, and NULL.

OpenGLRenderer::~OpenGLRenderer void    [virtual]
 

Definition at line 1450 of file OpenGLRenderer.C.

References ext, and NULL.


Member Function Documentation

void OpenGLRenderer::aa_off void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1840 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::aaAvailable, DisplayDevice::aaEnabled, ext, and OpenGLExtensions::hasmultisample.

Referenced by aa_on, and enable_stencil_stereo.

void OpenGLRenderer::aa_on void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1814 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, aa_off, DisplayDevice::aaAvailable, DisplayDevice::aaEnabled, ext, OpenGLExtensions::hasmultisample, DisplayDevice::inStereo, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, and OPENGL_STEREO_STENCIL_ROWS.

Referenced by disable_stencil_stereo, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::abs_screen_loc_2D float *   ,
float *   
[virtual]
 

return absolute 2D screen coordinates, given 2D world coordinates.

Reimplemented from DisplayDevice.

Definition at line 1745 of file OpenGLRenderer.C.

References abs_screen_loc_3D.

void OpenGLRenderer::abs_screen_loc_3D float *   ,
float *   
[virtual]
 

return normalized absolut 3D screen coordinates, given 3D world coordinates.

Reimplemented from DisplayDevice.

Definition at line 1722 of file OpenGLRenderer.C.

References ogl_mvmatrix, ogl_pmatrix, ogl_viewport, vmd_Project, DisplayDevice::xOrig, and DisplayDevice::yOrig.

Referenced by abs_screen_loc_2D.

int OpenGLRenderer::build3Dmipmaps int   ,
int   ,
int   ,
unsigned char *    tx
[protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 4653 of file OpenGLRenderer.C.

References ext, GLTEXIMAGE3D, OpenGLExtensions::hastex3d, max3DtexX, max3DtexY, max3DtexZ, NULL, DisplayDevice::x, DisplayDevice::y, and z.

Referenced by require_volume_texture.

void OpenGLRenderer::clear void    [virtual]
 

erase the device.

Reimplemented from DisplayDevice.

Definition at line 2623 of file OpenGLRenderer.C.

References ext, OpenGLExtensions::hasstereo, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_HDTVSIDE, OPENGL_STEREO_QUADBUFFER, OPENGL_STEREO_SIDE, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, OpenGLDisplayDevice::init, prepare3D, set_render_mode, and set_stereo_mode.

void OpenGLRenderer::cueing_off void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1866 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::cueingAvailable, and DisplayDevice::cueingEnabled.

void OpenGLRenderer::cueing_on void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1857 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::cueingAvailable, and DisplayDevice::cueingEnabled.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::culling_off void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1887 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::cullingAvailable, and DisplayDevice::cullingEnabled.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::culling_on void    [virtual]
 

functions to control depth cueing, culling, and antialiasing.

Reimplemented from DisplayDevice.

Definition at line 1875 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::cullingAvailable, and DisplayDevice::cullingEnabled.

void OpenGLRenderer::cylinder float *   ,
float *   ,
int   ,
float   ,
float   
[protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 1551 of file OpenGLRenderer.C.

References glPopMatrix, vmd_DrawConic, and VMD_PI.

void OpenGLRenderer::disable_stencil_stereo void    [virtual]
 

turn off stencil stereo.

Definition at line 2123 of file OpenGLRenderer.C.

References aa_on, DisplayDevice::inStereo, and OPENGL_STEREO_OFF.

Referenced by set_stereo_mode.

int OpenGLRenderer::do_activate_light int    n,
int    turnon
[protected, virtual]
 

routines to deal with light sources at device level, return success/fail.

Reimplemented from DisplayDevice.

Definition at line 1688 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, n, ogl_lightstate, and ogl_rendstateserial.

int OpenGLRenderer::do_define_light int    n,
float *    color,
float *    position
[protected, virtual]
 

routines to deal with light sources at device level, return success/fail.

Reimplemented from DisplayDevice.

Definition at line 1665 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, n, ogl_lightcolor, ogl_lightpos, ogl_rendstateserial, and vec_normalize.

void OpenGLRenderer::draw_background_gradient void    [protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 2651 of file OpenGLRenderer.C.

References DisplayDevice::backgroundmode, glPopMatrix, ogl_backgradient, ogl_clipmode, ogl_lightingenabled, ogl_useglslshader, and VMD_MAX_CLIP_PLANE.

Referenced by left, normal, and right.

void OpenGLRenderer::enable_stencil_stereo int    newMode [virtual]
 

turn on stencil stereo.

Definition at line 2047 of file OpenGLRenderer.C.

References aa_off, DisplayDevice::aaEnabled, DisplayDevice::aaPrevious, ext, glPopMatrix, OpenGLExtensions::hasstencilbuffer, OPENGL_STEREO_OFF, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, OPENGL_STEREO_STENCIL_ROWS, set_stereo_mode, DisplayDevice::xSize, and DisplayDevice::ySize.

Referenced by OpenGLPbufferDisplayDevice::reshape, OpenGLDisplayDevice::reshape, FltkOpenGLDisplayDevice::reshape, and set_stereo_mode.

void OpenGLRenderer::find_3D_from_2D const float *    A3D,
const float *    B2D,
float *    B3D
[virtual]
 

Reimplemented from DisplayDevice.

Definition at line 1760 of file OpenGLRenderer.C.

References ogl_mvmatrix, ogl_pmatrix, ogl_viewport, vmd_UnProject, DisplayDevice::xSize, and DisplayDevice::ySize.

virtual int OpenGLRenderer::forced_stereo_draws void    [inline, virtual]
 

whether we must force mono draws in stereo or not.

Reimplemented from DisplayDevice.

Definition at line 340 of file OpenGLRenderer.h.

References OpenGLExtensions::stereodrawforced.

void OpenGLRenderer::free_opengl_ctx  
 

free gl context rsrcs.

Definition at line 1469 of file OpenGLRenderer.C.

References OpenGLCache::deleteUnused, displaylistcache, font1pxListBase, fontNpxListBase, GLCACHE_FAIL, OpenGLCache::markUnused, MAX_SPHERE_RES, MIN_SPHERE_RES, pointSphereLists, solidSphereLists, and texturecache.

Referenced by FltkOpenGLDisplayDevice::~FltkOpenGLDisplayDevice, OpenGLDisplayDevice::~OpenGLDisplayDevice, and OpenGLPbufferDisplayDevice::~OpenGLPbufferDisplayDevice.

void OpenGLRenderer::left void    [virtual]
 

ready to draw left eye.

Reimplemented from DisplayDevice.

Definition at line 2139 of file OpenGLRenderer.C.

References DisplayDevice::DisplayEye, draw_background_gradient, ext, OpenGLExtensions::hasstereo, DisplayDevice::LEFTEYE, normal, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_HDTVSIDE, OPENGL_STEREO_LEFT, OPENGL_STEREO_QUADBUFFER, OPENGL_STEREO_RIGHT, OPENGL_STEREO_SIDE, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, OPENGL_STEREO_STENCIL_ROWS, DisplayDevice::RIGHTEYE, set_persp, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize.

void OpenGLRenderer::loadmatrix const Matrix4   [virtual]
 

virtual routines to affect the devices transformation matrix.

Reimplemented from DisplayDevice.

Definition at line 1702 of file OpenGLRenderer.C.

References Matrix4::mat.

void OpenGLRenderer::multmatrix const Matrix4   [virtual]
 

virtual routines to affect the devices transformation matrix.

Reimplemented from DisplayDevice.

Definition at line 1708 of file OpenGLRenderer.C.

References Matrix4::mat.

Referenced by VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, and CaveDisplayDevice::render.

void OpenGLRenderer::normal void    [virtual]
 

ready to draw non-stereo.

Reimplemented from DisplayDevice.

Reimplemented in CaveDisplayDevice.

Definition at line 2038 of file OpenGLRenderer.C.

References draw_background_gradient, set_persp, DisplayDevice::xSize, and DisplayDevice::ySize.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, OpenGLDisplayDevice::init, left, right, set_render_mode, and set_stereo_mode.

int OpenGLRenderer::prepare3D int    do_clear = TRUE [virtual]
 

ready to draw 3D.

Reimplemented from DisplayDevice.

Reimplemented in OpenGLDisplayDevice.

Definition at line 2458 of file OpenGLRenderer.C.

References DisplayDevice::ao_enabled, DisplayDevice::backgroundmode, clear, DisplayDevice::CUE_EXP, DisplayDevice::CUE_EXP2, DisplayDevice::CUE_LINEAR, DISP_LIGHTS, displaylistcache, DisplayDevice::dof_enabled, DisplayDevice::eyeDist, DisplayDevice::eyePos, DisplayDevice::eyeSep, DisplayDevice::get_ao_ambient, DisplayDevice::get_ao_direct, DisplayDevice::get_cue_density, DisplayDevice::get_cue_end, DisplayDevice::get_cue_start, DisplayDevice::get_dof_fnumber, DisplayDevice::get_dof_focal_dist, OpenGLCache::markUnused, DisplayDevice::NUM_CUE_MODES, ogl_backcolor, ogl_backgradient, ogl_lightcolor, ogl_lightpos, ogl_lightstate, oglmaterialindex, DisplayDevice::ORTHOGRAPHIC, DisplayDevice::PERSPECTIVE, DisplayDevice::projection, OptiXRenderer::RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE, OptiXRenderer::RT_BACKGROUND_TEXTURE_SKY_SPHERE, OptiXRenderer::RT_BACKGROUND_TEXTURE_SOLID, OptiXRenderer::RT_FOG_EXP, OptiXRenderer::RT_FOG_EXP2, OptiXRenderer::RT_FOG_LINEAR, OptiXRenderer::RT_FOG_NONE, OptiXRenderer::RT_ORTHOGRAPHIC, OptiXRenderer::RT_PERSPECTIVE, DisplayDevice::shadows_enabled, texturecache, DisplayDevice::vSize, DisplayDevice::xSize, DisplayDevice::ySize, and DisplayDevice::zDist.

Referenced by OpenGLDisplayDevice::prepare3D.

int OpenGLRenderer::prepareOpaque   [virtual]
 

draw opaque objects.

Reimplemented from DisplayDevice.

Definition at line 2602 of file OpenGLRenderer.C.

References ogl_transpass.

int OpenGLRenderer::prepareTrans   [virtual]
 

draw transparent objects.

Reimplemented from DisplayDevice.

Definition at line 2612 of file OpenGLRenderer.C.

References ogl_transpass.

void OpenGLRenderer::render const VMDDisplayList   [virtual]
 

process draw cmd list.

Reimplemented from DisplayDevice.

Reimplemented in CaveDisplayDevice.

Definition at line 2727 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, DisplayDevice::colorData, and NULL.

Referenced by VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, and CaveDisplayDevice::render.

void OpenGLRenderer::render_done   [virtual]
 

post-rendering ops.

Reimplemented from DisplayDevice.

Definition at line 4524 of file OpenGLRenderer.C.

References OpenGLCache::deleteUnused, displaylistcache, GLCACHE_FAIL, glPopMatrix, NULL, ogl_glsltoggle, texturecache, DisplayDevice::xSize, and DisplayDevice::ySize.

void OpenGLRenderer::require_volume_texture unsigned long    ID,
unsigned    xsize,
unsigned    ysize,
unsigned    zsize,
unsigned char *    texmap
[protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 4619 of file OpenGLRenderer.C.

References build3Dmipmaps, OpenGLCache::encache, ext, OpenGLExtensions::hastex3d, OpenGLCache::markUsed, and texturecache.

void OpenGLRenderer::right void    [virtual]
 

ready to draw right eye.

Reimplemented from DisplayDevice.

Definition at line 2223 of file OpenGLRenderer.C.

References DisplayDevice::DisplayEye, draw_background_gradient, ext, OpenGLExtensions::hasstereo, DisplayDevice::LEFTEYE, normal, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_ANAGLYPH, OPENGL_STEREO_HDTVSIDE, OPENGL_STEREO_LEFT, OPENGL_STEREO_QUADBUFFER, OPENGL_STEREO_RIGHT, OPENGL_STEREO_SIDE, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, OPENGL_STEREO_STENCIL_ROWS, DisplayDevice::RIGHTEYE, set_persp, OpenGLExtensions::stereodrawforced, DisplayDevice::xSize, and DisplayDevice::ySize.

void OpenGLRenderer::set_backgradient const float *   ,
const float *   
[virtual]
 

set bg grad.

Reimplemented from DisplayDevice.

Definition at line 1914 of file OpenGLRenderer.C.

References ogl_backgradient.

void OpenGLRenderer::set_background const float *    [virtual]
 

set bg color.

Reimplemented from DisplayDevice.

Definition at line 1898 of file OpenGLRenderer.C.

References ogl_backcolor.

void OpenGLRenderer::set_cache_mode int    [virtual]
 

set caching mode, 0==off.

Reimplemented from DisplayDevice.

Definition at line 1951 of file OpenGLRenderer.C.

References DisplayDevice::cacheMode, and ogl_cacheenabled.

void OpenGLRenderer::set_line_style int    [protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 1510 of file OpenGLRenderer.C.

References DisplayDevice::lineStyle.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::set_line_width int    [protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 1502 of file OpenGLRenderer.C.

References DisplayDevice::lineWidth.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::set_persp DisplayEye    = NOSTEREO [virtual]
 

set view configuration.

Definition at line 2328 of file OpenGLRenderer.C.

References DisplayDevice::Aspect, DisplayDevice::cpDown, DisplayDevice::cpLeft, DisplayDevice::cpRight, DisplayDevice::cpUp, DisplayDevice::eyeDir, DisplayDevice::eyeDist, DisplayDevice::eyePos, DisplayDevice::eyeSepDir, DisplayDevice::farClip, Matrix4::identity, immersadeskflip, DisplayDevice::left, DisplayDevice::LEFTEYE, Matrix4::multmatrix, DisplayDevice::nearClip, DisplayDevice::normal, DisplayDevice::NOSTEREO, ogl_glslprojectionmode, ogl_mvmatrix, ogl_pmatrix, ogl_textMat, ogl_viewport, DisplayDevice::ORTHOGRAPHIC, DisplayDevice::PERSPECTIVE, DisplayDevice::projection, DisplayDevice::right, DisplayDevice::RIGHTEYE, DisplayDevice::upDir, vmd_LookAt, and DisplayDevice::vSize.

Referenced by left, normal, and right.

void OpenGLRenderer::set_render_mode int    [virtual]
 

set render mode, 0==norm.

Reimplemented from DisplayDevice.

Definition at line 1957 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, clear, DisplayDevice::name, normal, ogl_acrobat3dcapture, ogl_useblendedtrans, ogl_useglslshader, OPENGL_RENDER_ACROBAT3D, OPENGL_RENDER_GLSL, OPENGL_RENDER_NORMAL, DisplayDevice::renderMode, DisplayDevice::reshape, set_window_title, and DisplayDevice::update.

void OpenGLRenderer::set_sphere_mode int    [protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 1538 of file OpenGLRenderer.C.

References DisplayDevice::sphereMode, and update_lists.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::set_sphere_res int    [protected]
 

routines to perform various OGL-specific graphics operations.

Definition at line 1522 of file OpenGLRenderer.C.

References DisplayDevice::sphereRes, and update_lists.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

void OpenGLRenderer::set_stereo_mode int    = 0 [virtual]
 

set stereo mode, 0==off.

Reimplemented from DisplayDevice.

Reimplemented in CaveDisplayDevice.

Definition at line 1926 of file OpenGLRenderer.C.

References DisplayDevice::_needRedraw, clear, disable_stencil_stereo, enable_stencil_stereo, DisplayDevice::inStereo, normal, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, OPENGL_STEREO_STENCIL_ROWS, DisplayDevice::reshape, and DisplayDevice::update.

Referenced by enable_stencil_stereo.

virtual void OpenGLRenderer::set_window_title char *    [inline, virtual]
 

Reimplemented in OpenGLDisplayDevice.

Definition at line 345 of file OpenGLRenderer.h.

Referenced by set_render_mode.

void OpenGLRenderer::setup_initial_opengl_state void   
 

initialize VMD's OpenGL state.

Definition at line 812 of file OpenGLRenderer.C.

References ResizeArray< GLuint >::append, OpenGLExtensions::ATI, DISP_LIGHTS, dpl_initialized, ext, OpenGLExtensions::find_extensions, OpenGLExtensions::find_renderer, font1pxListBase, fontNpxListBase, GLTEXIMAGE3D, OpenGLExtensions::hasglfragmentshaderarb, OpenGLExtensions::hasglshaderobjectsarb, OpenGLExtensions::hasglshadinglangarb, OpenGLExtensions::hasglvertexshaderarb, OpenGLExtensions::hasrescalenormalext, OpenGLExtensions::hasstereo, OpenGLExtensions::hastex2d, OpenGLExtensions::hastex3d, hersheyDrawLetterOpenGL, Matrix4::identity, immersadeskflip, OpenGLExtensions::INTELSWR, intelswr, max2DtexSize, max2DtexX, max2DtexY, max3DtexSize, max3DtexX, max3DtexY, max3DtexZ, MAX_SPHERE_RES, MIN_SPHERE_RES, OpenGLExtensions::multitextureunits, NULL, OpenGLExtensions::NVIDIA, ogl_acrobat3dcapture, ogl_cachedebug, ogl_cacheenabled, ogl_cachelistbase, ogl_clipmode, ogl_glslmaterialindex, ogl_glslprojectionmode, ogl_glslserial, ogl_glsltexturemode, ogl_glsltoggle, ogl_lightingenabled, ogl_lightstate, ogl_rendstateserial, ogl_textMat, ogl_transpass, ogl_useblendedtrans, ogl_useglslshader, oglambient, ogldiffuse, OGLERR, OpenGLExtensions::oglmajor, oglmaterialindex, OpenGLExtensions::oglminor, oglopacity, ogloutline, ogloutlinewidth, OpenGLExtensions::oglrenderer, oglshininess, oglspecular, ogltransmode, DisplayDevice::PERSPECTIVE, pointSphereLists, OpenGLExtensions::PrintExtensions, shearstereo, simplegraphics, solidSphereLists, OpenGLExtensions::stereodrawforced, vmd_DrawSphere, VMD_MAX_CLIP_PLANE, OpenGLExtensions::vmdQueryExtension, OpenGLExtensions::WIREGL, wiregl, DisplayDevice::x, DisplayDevice::y, and z.

Referenced by FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, and OpenGLDisplayDevice::open_window.

virtual int OpenGLRenderer::supports_gui   [inline, virtual]
 

Does this display device support GUI's? The default stub display does not.

Reimplemented from DisplayDevice.

Reimplemented in OpenGLPbufferDisplayDevice.

Definition at line 285 of file OpenGLRenderer.h.

void OpenGLRenderer::update_lists void    [protected]
 

Update the OpenGL sphere/cylinder/etc display lists.

Definition at line 1413 of file OpenGLRenderer.C.

References MIN_SPHERE_RES, ResizeArray::num, pointSphereLists, solidSphereLists, SphereList, DisplayDevice::sphereMode, and DisplayDevice::sphereRes.

Referenced by set_sphere_mode, and set_sphere_res.

void OpenGLRenderer::update_shader_uniforms void *   ,
int    forceupdate
[protected]
 

Definition at line 4787 of file OpenGLRenderer.C.

References DISP_LIGHTS, DisplayDevice::eyeDir, GLGETUNIFORMLOCATIONARB, GLUNIFORM1FVARB, GLUNIFORM1IARB, GLUNIFORM3FVARB, GLUNIFORM4FVARB, ogl_fogmode, ogl_glslprojectionmode, ogl_glslserial, ogl_glsltexturemode, ogl_lightpos, ogl_lightstate, ogl_rendstateserial, oglambient, ogldiffuse, oglopacity, ogloutline, ogloutlinewidth, oglshininess, oglspecular, ogltransmode, DisplayDevice::PERSPECTIVE, OpenGLShader::ProgramObject, Stack< Matrix4 >::top, DisplayDevice::transMat, vec_normalize, and vec_scale.


Member Data Documentation

OpenGLCache OpenGLRenderer::displaylistcache [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 167 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, prepare3D, and render_done.

int OpenGLRenderer::dpl_initialized [protected]
 

have we initialized display lists?

Definition at line 213 of file OpenGLRenderer.h.

Referenced by OpenGLRenderer, and setup_initial_opengl_state.

OpenGLExtensions* OpenGLRenderer::ext [protected]
 

OpenGL Extensions class.

Definition at line 220 of file OpenGLRenderer.h.

Referenced by aa_off, aa_on, build3Dmipmaps, clear, enable_stencil_stereo, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, FreeVRDisplayDevice::FreeVRDisplayDevice, OpenGLPbufferDisplayDevice::init, OpenGLDisplayDevice::init, left, OpenGLDisplayDevice::open_window, OpenGLRenderer, require_volume_texture, right, setup_initial_opengl_state, and ~OpenGLRenderer.

GLuint OpenGLRenderer::font1pxListBase [protected]
 

1-pixel wide non-AA font display list.

Definition at line 217 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, and setup_initial_opengl_state.

GLuint OpenGLRenderer::fontNpxListBase [protected]
 

N-pixel wide antialiased font display list.

Definition at line 218 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, and setup_initial_opengl_state.

int OpenGLRenderer::hastex2d [protected]
 

2D texturing features.

Definition at line 236 of file OpenGLRenderer.h.

int OpenGLRenderer::hastex3d [protected]
 

3D texturing features.

Definition at line 244 of file OpenGLRenderer.h.

int OpenGLRenderer::immersadeskflip [protected]
 

Immersadesk right-eye X-axis reflection mode.

Definition at line 231 of file OpenGLRenderer.h.

Referenced by set_persp, and setup_initial_opengl_state.

int OpenGLRenderer::intelswr [protected]
 

Intel's OpenSWR software rasterizer.

Definition at line 230 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

GLint OpenGLRenderer::max2DtexSize [protected]
 

2D texturing features.

Definition at line 239 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

GLint OpenGLRenderer::max2DtexX [protected]
 

2D texturing features.

Definition at line 237 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

GLint OpenGLRenderer::max2DtexY [protected]
 

2D texturing features.

Definition at line 238 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

GLint OpenGLRenderer::max3DtexSize [protected]
 

3D texturing features.

Definition at line 248 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

GLint OpenGLRenderer::max3DtexX [protected]
 

3D texturing features.

Definition at line 245 of file OpenGLRenderer.h.

Referenced by build3Dmipmaps, and setup_initial_opengl_state.

GLint OpenGLRenderer::max3DtexY [protected]
 

3D texturing features.

Definition at line 246 of file OpenGLRenderer.h.

Referenced by build3Dmipmaps, and setup_initial_opengl_state.

GLint OpenGLRenderer::max3DtexZ [protected]
 

3D texturing features.

Definition at line 247 of file OpenGLRenderer.h.

Referenced by build3Dmipmaps, and setup_initial_opengl_state.

int OpenGLRenderer::ogl_acrobat3dcapture [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 199 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, set_render_mode, and setup_initial_opengl_state.

GLfloat OpenGLRenderer::ogl_backcolor[4] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 197 of file OpenGLRenderer.h.

Referenced by prepare3D, and set_background.

GLfloat OpenGLRenderer::ogl_backgradient[2][4] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 198 of file OpenGLRenderer.h.

Referenced by draw_background_gradient, prepare3D, and set_backgradient.

int OpenGLRenderer::ogl_cachedebug [protected]
 

flag to enable printing of debug messages.

Definition at line 210 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

int OpenGLRenderer::ogl_cacheenabled [protected]
 

flag to enable display list caching.

Definition at line 209 of file OpenGLRenderer.h.

Referenced by set_cache_mode, and setup_initial_opengl_state.

GLint OpenGLRenderer::ogl_cachelistbase [protected]
 

base index for display list cache.

Definition at line 211 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

int OpenGLRenderer::ogl_clipmode[VMD_MAX_CLIP_PLANE] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 193 of file OpenGLRenderer.h.

Referenced by draw_background_gradient, and setup_initial_opengl_state.

GLint OpenGLRenderer::ogl_fogmode [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 182 of file OpenGLRenderer.h.

Referenced by update_shader_uniforms.

int OpenGLRenderer::ogl_glslmaterialindex [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 188 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, and setup_initial_opengl_state.

int OpenGLRenderer::ogl_glslprojectionmode [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 189 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, set_persp, setup_initial_opengl_state, and update_shader_uniforms.

int OpenGLRenderer::ogl_glslserial [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 186 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, setup_initial_opengl_state, and update_shader_uniforms.

int OpenGLRenderer::ogl_glsltexturemode [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 190 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, setup_initial_opengl_state, and update_shader_uniforms.

int OpenGLRenderer::ogl_glsltoggle [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 187 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, render_done, and setup_initial_opengl_state.

GLfloat OpenGLRenderer::ogl_lightcolor[DISP_LIGHTS][4] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 195 of file OpenGLRenderer.h.

Referenced by do_define_light, OpenGLDisplayDevice::init, and prepare3D.

int OpenGLRenderer::ogl_lightingenabled [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 183 of file OpenGLRenderer.h.

Referenced by draw_background_gradient, FreeVRDisplayDevice::FreeVRDisplayDevice, and setup_initial_opengl_state.

GLfloat OpenGLRenderer::ogl_lightpos[DISP_LIGHTS][4] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 196 of file OpenGLRenderer.h.

Referenced by do_define_light, OpenGLDisplayDevice::init, prepare3D, and update_shader_uniforms.

int OpenGLRenderer::ogl_lightstate[DISP_LIGHTS] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 194 of file OpenGLRenderer.h.

Referenced by do_activate_light, OpenGLDisplayDevice::init, prepare3D, setup_initial_opengl_state, and update_shader_uniforms.

GLfloat OpenGLRenderer::ogl_mvmatrix[16] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 179 of file OpenGLRenderer.h.

Referenced by abs_screen_loc_3D, find_3D_from_2D, VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, and set_persp.

GLfloat OpenGLRenderer::ogl_pmatrix[16] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 178 of file OpenGLRenderer.h.

Referenced by abs_screen_loc_3D, find_3D_from_2D, VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, and set_persp.

int OpenGLRenderer::ogl_rendstateserial [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 192 of file OpenGLRenderer.h.

Referenced by do_activate_light, do_define_light, FreeVRDisplayDevice::FreeVRDisplayDevice, setup_initial_opengl_state, and update_shader_uniforms.

Matrix4 OpenGLRenderer::ogl_textMat [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 180 of file OpenGLRenderer.h.

Referenced by VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, set_persp, and setup_initial_opengl_state.

int OpenGLRenderer::ogl_transpass [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 191 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, prepareOpaque, prepareTrans, and setup_initial_opengl_state.

int OpenGLRenderer::ogl_useblendedtrans [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 184 of file OpenGLRenderer.h.

Referenced by FreeVRDisplayDevice::FreeVRDisplayDevice, set_render_mode, and setup_initial_opengl_state.

int OpenGLRenderer::ogl_useglslshader [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 185 of file OpenGLRenderer.h.

Referenced by draw_background_gradient, FreeVRDisplayDevice::FreeVRDisplayDevice, set_render_mode, and setup_initial_opengl_state.

GLint OpenGLRenderer::ogl_viewport[4] [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 181 of file OpenGLRenderer.h.

Referenced by abs_screen_loc_3D, find_3D_from_2D, and set_persp.

float OpenGLRenderer::oglambient [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 171 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

float OpenGLRenderer::ogldiffuse [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 173 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

int OpenGLRenderer::oglmaterialindex [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 169 of file OpenGLRenderer.h.

Referenced by prepare3D, and setup_initial_opengl_state.

float OpenGLRenderer::oglopacity [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 170 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

float OpenGLRenderer::ogloutline [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 175 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

float OpenGLRenderer::ogloutlinewidth [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 176 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

float OpenGLRenderer::oglshininess [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 174 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

float OpenGLRenderer::oglspecular [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 172 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

int OpenGLRenderer::ogltransmode [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 177 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state, and update_shader_uniforms.

ResizeArray<GLuint> OpenGLRenderer::pointSphereLists [protected]
 

quadric objects and display lists for spheres, cylinders, and disks one sphere display list for each supported resolution.

Definition at line 157 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, setup_initial_opengl_state, and update_lists.

int OpenGLRenderer::shearstereo [protected]
 

Use shear matrix stereo rather than eye rotation.

Definition at line 232 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

int OpenGLRenderer::simplegraphics [protected]
 

Force use of simplest OpenGL primitives.

Definition at line 228 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.

ResizeArray<GLuint> OpenGLRenderer::solidSphereLists [protected]
 

quadric objects and display lists for spheres, cylinders, and disks one sphere display list for each supported resolution.

Definition at line 156 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, setup_initial_opengl_state, and update_lists.

GLuint OpenGLRenderer::SphereList [protected]
 

the current sphere display list.

Definition at line 160 of file OpenGLRenderer.h.

Referenced by update_lists.

OpenGLCache OpenGLRenderer::texturecache [protected]
 

cached copies of most recently used OpenGL state, materials, etc.

Definition at line 168 of file OpenGLRenderer.h.

Referenced by free_opengl_ctx, prepare3D, render_done, and require_volume_texture.

int OpenGLRenderer::wiregl [protected]
 

Using Stanford's WireGL library.

Definition at line 229 of file OpenGLRenderer.h.

Referenced by setup_initial_opengl_state.


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 02:47:14 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002