Changeset 13041 for OpenSceneGraph/trunk/src/osgPlugins/cfg/VisualChooser.h
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/cfg/VisualChooser.h
r12292 r13041 22 22 namespace osgProducer { 23 23 24 class VisualChooser : public osg::Referenced 24 class VisualChooser : public osg::Referenced 25 25 { 26 26 public : … … 31 31 BufferSize, 32 32 Level, 33 RGBA, 34 DoubleBuffer, 35 Stereo, 33 RGBA, 34 DoubleBuffer, 35 Stereo, 36 36 AuxBuffers, 37 37 RedSize, … … 51 51 //------------------------------------------------------------------------- 52 52 // Explicitely set the visual info pointer. This will override the use of 53 // glXChooseVisual(). Useful for functions requiring a VisualChooser 53 // glXChooseVisual(). Useful for functions requiring a VisualChooser 54 54 // argument, but not a XVisualInfo. 55 55 void setVisual( VisualInfo *vinfo ); 56 56 #endif 57 57 //------------------------------------------------------------------------- 58 // Chooses a minimal set of parameters 58 // Chooses a minimal set of parameters 59 59 void setSimpleConfiguration(bool doublebuffer = true); 60 60 … … 64 64 65 65 //------------------------------------------------------------------------- 66 // Generic method for adding an attribute without a parameter 66 // Generic method for adding an attribute without a parameter 67 67 // (e.g DoubleBuffer ) 68 68 void addAttribute( AttributeName attribute ); 69 69 70 70 //------------------------------------------------------------------------- 71 // Generic method for adding an attribute with a parameter 71 // Generic method for adding an attribute with a parameter 72 72 // (e.g DepthSize, 1 ) 73 73 void addAttribute( AttributeName attribute, int parameter ); 74 74 75 75 //------------------------------------------------------------------------- 76 // Generic method for adding an attribute without a parameter 76 // Generic method for adding an attribute without a parameter 77 77 // (e.g DoubleBuffer ) 78 78 void addExtendedAttribute( unsigned int attribute ); 79 79 80 80 //------------------------------------------------------------------------- 81 // Generic method for adding an extended attribute with a parameter 81 // Generic method for adding an extended attribute with a parameter 82 82 // (e.g DepthSize, 1 ) 83 83 void addExtendedAttribute( unsigned int attribute, int parameter ); … … 93 93 94 94 void setLevel( int level ); 95 95 96 96 void useRGBA(); 97 97 … … 126 126 void setSamples( unsigned int size ); 127 127 128 void setVisualID( unsigned int id ); 128 void setVisualID( unsigned int id ); 129 129 130 130 … … 134 134 // dpy = Conection to Xserver as returned by XOpenDisplay() 135 135 // screen = XServer screen (Could be DefaultScreen(dpy)) 136 // strict_adherence = If true, return NULL visual info if the set of 136 // strict_adherence = If true, return NULL visual info if the set of 137 137 // parameters is not matched verbatim. If set to 138 138 // false, choose() will attempt to find a visual that … … 140 140 // 141 141 // Important Note : An attribute is removed from the end 142 // of the list before each retry, implying that the 142 // of the list before each retry, implying that the 143 143 // attribute list should be specified in priority order, 144 144 // most important attriutes first. 145 // 145 // 146 146 147 147 VisualInfo *choose( Display *dpy, int screen, bool strict_adherence=false); … … 158 158 public : 159 159 160 struct VisualAttribute 160 struct VisualAttribute 161 161 { 162 162 unsigned int _attribute; … … 197 197 void applyAttribute(const VisualAttribute &va, std::vector<int> &attribs); 198 198 void resetVisualInfo(); 199 199 200 200 std::vector <VisualAttribute> _visual_attributes; 201 201 // VisualInfo *_vinfo;
