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

FreeVRScene.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 /***************************************************************************
00009  * RCS INFORMATION:
00010  *
00011  *      $RCSfile: FreeVRScene.h,v $
00012  *      $Author: johns $        $Locker:  $             $State: Exp $
00013  *      $Revision: 1.32 $       $Date: 2020/02/26 15:51:10 $
00014  *
00015  ***************************************************************************/
00029 #ifndef FreeVR_SCENE_H
00030 #define FreeVR_SCENE_H
00031 
00032 #include "Scene.h"
00033 #include <freevr.h>
00034 #include "FreeVRRoutines.h"
00035 #include "FreeVRDisplayDevice.h" // for manipulating lights etc
00036 #include "WKFThreads.h"          // for the barrier synchronization code
00037 
00038 class VMDApp;
00039 
00040 // This needs to grab shared memory for use in the FreeVR 
00041 // environment.  It does it with one means.
00042 //  1) use a FreeVRScene::operator new so that the internal
00043 //      scene information is shared (get_disp_storage and
00044 //      free_disp_storage)
00045 // The shared memory is allocated through a global function,
00046 //  new_from_FreeVR_memory.
00047 // This must also call the left eye and right eye draws correctly
00048 
00051 class FreeVRScene : public Scene {
00052 private:
00053   VMDApp *app;
00054 
00056   wkf_barrier_t * draw_barrier;
00057 
00059   vrLock draw_rwlock;
00060 
00061 public:
00063   FreeVRScene(VMDApp *);
00064   virtual ~FreeVRScene(void);
00065   
00068   void draw(DisplayDevice *);
00069   void draw(DisplayDevice *, vrRenderInfo *rendinfo);   /* This version passes the rendering properties through to the render routine */
00070   
00072   virtual int prepare();
00073 
00075   void *operator new(size_t);
00076   void operator delete(void *, size_t);
00077 };
00078 
00079 #endif /* FREEVR_SCENE_H */
00080 

Generated on Thu Apr 25 02:42:38 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002