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

OpenGLDisplayDevice Class Reference

Subclass of OpenGLRenderer, this object has routines used by all the different display devices that are OpenGL-specific. Will render drawing commands into a single X window. More...

#include <OpenGLDisplayDevice.h>

Inheritance diagram for OpenGLDisplayDevice:

OpenGLRenderer DisplayDevice List of all members.

Public Methods

 OpenGLDisplayDevice ()
int init (int argc, char **argv, VMDApp *app, int *size, int *loc=NULL)
 do actual window construction here. Return true if the window was successfully created; false if not. More...

virtual ~OpenGLDisplayDevice (void)
virtual int x (void)
virtual int y (void)
 absolute position of cursor from lower-left corner. More...

virtual int shift_state (void)
virtual int spaceball (int *, int *, int *, int *, int *, int *, int *)
 return the shift state (ORed enums). More...

virtual void set_cursor (int)
virtual void queue_events (void)
virtual int read_event (long &, long &)
virtual void update (int do_update=TRUE)
 finish up after drawing. More...

virtual void reshape (void)
 refresh device after change. More...

virtual unsigned char * readpixels (int &x, int &y)
 virtual routine for capturing the screen to a packed RGB array. More...


Public Attributes

VMDAppvmdapp
glxdata glxsrv

Protected Methods

Window open_window (char *, int *, int *, int, char **)
virtual void do_resize_window (int, int)
virtual void do_reposition_window (int, int)

Protected Attributes

int have_window

Detailed Description

Subclass of OpenGLRenderer, this object has routines used by all the different display devices that are OpenGL-specific. Will render drawing commands into a single X window.

Definition at line 140 of file OpenGLDisplayDevice.h.


Constructor & Destructor Documentation

OpenGLDisplayDevice::OpenGLDisplayDevice  
 

Definition at line 650 of file OpenGLDisplayDevice.C.

References DisplayDevice::cacheModes, DisplayDevice::cacheNames, glxdata::dpy, glxdata::dpyScreen, glCacheNameStr, glRenderNameStr, glStereoNameStr, glxsrv, have_window, glxdata::havefocus, NULL, OPENGL_CACHE_MODES, OPENGL_RENDER_MODES, OPENGL_STEREO_MODES, DisplayDevice::renderModes, DisplayDevice::renderNames, glxdata::sball, DisplayDevice::screenX, DisplayDevice::screenY, DisplayDevice::stereoModes, DisplayDevice::stereoNames, vmdapp, and glxdata::xinp.

OpenGLDisplayDevice::~OpenGLDisplayDevice void    [virtual]
 

Definition at line 717 of file OpenGLDisplayDevice.C.

References glxdata::cx, glxdata::dpy, OpenGLRenderer::free_opengl_ctx, glxsrv, NULL, glxdata::sball, spaceball_close, glxdata::windowID, glxdata::xinp, and xinput_close.


Member Function Documentation

void OpenGLDisplayDevice::do_reposition_window int   ,
int   
[protected, virtual]
 

Reimplemented from DisplayDevice.

Definition at line 965 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, and glxdata::windowID.

void OpenGLDisplayDevice::do_resize_window int   ,
int   
[protected, virtual]
 

Do device-specific resizing or positioning of window

Reimplemented from DisplayDevice.

Definition at line 952 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, setfullscreen, and glxdata::windowID.

int OpenGLDisplayDevice::init int    argc,
char **    argv,
VMDApp   app,
int *    size,
int *    loc = NULL
[virtual]
 

do actual window construction here. Return true if the window was successfully created; false if not.

Reimplemented from DisplayDevice.

Definition at line 674 of file OpenGLDisplayDevice.C.

References OpenGLRenderer::aa_on, DisplayDevice::aaAvailable, OpenGLRenderer::clear, OpenGLRenderer::cueing_on, DisplayDevice::cueingAvailable, OpenGLRenderer::culling_off, DisplayDevice::cullingAvailable, OpenGLRenderer::ext, glxsrv, OpenGLExtensions::hasmultisample, have_window, DisplayDevice::lineStyle, DisplayDevice::lineWidth, DisplayDevice::name, OpenGLRenderer::normal, open_window, reshape, OpenGLRenderer::set_line_style, OpenGLRenderer::set_line_width, OpenGLRenderer::set_sphere_mode, OpenGLRenderer::set_sphere_res, DisplayDevice::sphereMode, DisplayDevice::sphereRes, update, vmdapp, and glxdata::windowID.

int OpenGLDisplayDevice::open_window char *   ,
int *   ,
int *   ,
int   ,
char **   
[protected]
 

Definition at line 746 of file OpenGLDisplayDevice.C.

References glxdata::cursor, cursorBG, cursorFG, glxdata::cx, glxdata::dpy, glxdata::dpyScreen, OpenGLRenderer::ext, glxsrv, OpenGLExtensions::hasmultisample, OpenGLExtensions::hasstereo, have_window, NULL, OpenGLExtensions::nummultisamples, glxdata::rootWindowID, glxdata::sball, glxdata::sballevent, DisplayDevice::screenX, DisplayDevice::screenY, OpenGLRenderer::setup_initial_opengl_state, glxdata::sizeHints, spaceball_enable, spaceball_init_event, OpenGLExtensions::stereodrawforced, vmd_get_visual, OpenGLExtensions::vmdQueryExtension, glxdata::xinp, and xinput_enable.

Referenced by init.

void OpenGLDisplayDevice::queue_events void    [virtual]
 

queue the standard events (need only be called once ... but this is not done automatically by the window because it may not be necessary or even wanted)

Reimplemented from DisplayDevice.

Definition at line 1074 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, and glxdata::windowID.

int OpenGLDisplayDevice::read_event long &   ,
long &   
[virtual]
 

read the next event ... returns an event type (one of the above ones), and a value. Returns success, and sets arguments. NOTE: THIS SHOULD NOT BLOCK ... IT SHOUULD RETURN FALSE IF NO EVENT TO READ.

Reimplemented from DisplayDevice.

Definition at line 1085 of file OpenGLDisplayDevice.C.

References DisplayDevice::_needRedraw, glxdata::dpy, glxsrv, glxdata::havefocus, NULL, reshape, glxdata::sball, glxdata::sballevent, spaceball_clear_event, spaceball_decode_event, DisplayDevice::WIN_KBD, DisplayDevice::WIN_KBD_DELETE, DisplayDevice::WIN_KBD_DOWN, DisplayDevice::WIN_KBD_END, DisplayDevice::WIN_KBD_ESCAPE, DisplayDevice::WIN_KBD_F1, DisplayDevice::WIN_KBD_F10, DisplayDevice::WIN_KBD_F11, DisplayDevice::WIN_KBD_F12, DisplayDevice::WIN_KBD_F2, DisplayDevice::WIN_KBD_F3, DisplayDevice::WIN_KBD_F4, DisplayDevice::WIN_KBD_F5, DisplayDevice::WIN_KBD_F6, DisplayDevice::WIN_KBD_F7, DisplayDevice::WIN_KBD_F8, DisplayDevice::WIN_KBD_F9, DisplayDevice::WIN_KBD_HOME, DisplayDevice::WIN_KBD_INSERT, DisplayDevice::WIN_KBD_LEFT, DisplayDevice::WIN_KBD_PAGE_UP, DisplayDevice::WIN_KBD_RIGHT, DisplayDevice::WIN_KBD_UP, DisplayDevice::WIN_LEFT, DisplayDevice::WIN_MIDDLE, DisplayDevice::WIN_NOEVENT, DisplayDevice::WIN_RIGHT, DisplayDevice::WIN_WHEELDOWN, DisplayDevice::WIN_WHEELUP, glxdata::xinp, and xinput_decode_event.

unsigned char * OpenGLDisplayDevice::readpixels int &    x,
int &    y
[virtual]
 

virtual routine for capturing the screen to a packed RGB array.

Reimplemented from DisplayDevice.

Definition at line 1281 of file OpenGLDisplayDevice.C.

References NULL, DisplayDevice::xSize, and DisplayDevice::ySize.

void OpenGLDisplayDevice::reshape void    [virtual]
 

refresh device after change.

Reimplemented from DisplayDevice.

Definition at line 1230 of file OpenGLDisplayDevice.C.

References glxdata::dpy, OpenGLRenderer::enable_stencil_stereo, glxsrv, DisplayDevice::inStereo, OPENGL_STEREO_ABOVEBELOW, OPENGL_STEREO_SIDE, OPENGL_STEREO_STENCIL_CHECKERBOARD, OPENGL_STEREO_STENCIL_COLUMNS, OPENGL_STEREO_STENCIL_ROWS, glxdata::rootWindowID, DisplayDevice::screenY, DisplayDevice::set_screen_pos, glxdata::windowID, DisplayDevice::xOrig, DisplayDevice::xSize, DisplayDevice::yOrig, and DisplayDevice::ySize.

Referenced by init, read_event, and vmdWindowProc.

void OpenGLDisplayDevice::set_cursor int    [virtual]
 

set the Nth cursor shape as the current one. If no arg given, the default shape (n=0) is used.

Reimplemented from DisplayDevice.

Definition at line 1051 of file OpenGLDisplayDevice.C.

References glxdata::cursor, glxdata::dpy, glxsrv, DisplayDevice::NORMAL_CURSOR, DisplayDevice::PICK_CURSOR, DisplayDevice::SCALE_CURSOR, DisplayDevice::TRANS_CURSOR, DisplayDevice::WAIT_CURSOR, and glxdata::windowID.

Referenced by vmdWindowProc.

int OpenGLDisplayDevice::shift_state void    [virtual]
 

Reimplemented from DisplayDevice.

Definition at line 1005 of file OpenGLDisplayDevice.C.

References DisplayDevice::ALT, DisplayDevice::CONTROL, glxdata::dpy, glxsrv, DisplayDevice::SHIFT, and glxdata::windowID.

int OpenGLDisplayDevice::spaceball int *    rx,
int *    ry,
int *    rz,
int *    tx,
int *    ty,
int *    tz,
int *    buttons
[virtual]
 

return the shift state (ORed enums).

get the current state of the Spaceball if one is available returns rx ry rz, tx ty tz, buttons

Reimplemented from DisplayDevice.

Definition at line 1030 of file OpenGLDisplayDevice.C.

References spaceballevent::buttons, spaceballevent::event, glxsrv, NULL, spaceballevent::rx, spaceballevent::ry, spaceballevent::rz, glxdata::sball, glxdata::sballevent, spaceballevent::tx, spaceballevent::ty, spaceballevent::tz, and glxdata::xinp.

void OpenGLDisplayDevice::update int    do_update = TRUE [virtual]
 

finish up after drawing.

Reimplemented from DisplayDevice.

Definition at line 1301 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, and glxdata::windowID.

Referenced by init.

int OpenGLDisplayDevice::x void    [virtual]
 

Reimplemented from DisplayDevice.

Definition at line 976 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, and glxdata::windowID.

int OpenGLDisplayDevice::y void    [virtual]
 

absolute position of cursor from lower-left corner.

Reimplemented from DisplayDevice.

Definition at line 990 of file OpenGLDisplayDevice.C.

References glxdata::dpy, glxsrv, DisplayDevice::screenY, and glxdata::windowID.


Member Data Documentation

glxdata OpenGLDisplayDevice::glxsrv
 

Definition at line 150 of file OpenGLDisplayDevice.h.

Referenced by do_reposition_window, do_resize_window, init, open_window, OpenGLDisplayDevice, queue_events, read_event, reshape, set_cursor, shift_state, spaceball, update, x, y, and ~OpenGLDisplayDevice.

int OpenGLDisplayDevice::have_window [protected]
 

Definition at line 156 of file OpenGLDisplayDevice.h.

Referenced by init, open_window, and OpenGLDisplayDevice.

VMDApp* OpenGLDisplayDevice::vmdapp
 

Definition at line 142 of file OpenGLDisplayDevice.h.

Referenced by init, OpenGLDisplayDevice, and vmdWindowProc.


The documentation for this class was generated from the following files:
Generated on Sat May 26 01:49:22 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002