00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _SO_GL_GRAPHIC_CONFIG_TEMPLATE_H_
00024 #define _SO_GL_GRAPHIC_CONFIG_TEMPLATE_H_
00025
00026 #include <Inventor/components/SoGraphicConfigTemplate.h>
00027
00028 class SoGLGraphicConfigTemplateSync;
00029
00071 class SoGLGraphicConfigTemplate : public SoGraphicConfigTemplate {
00072
00073 public:
00074
00078 SoGLGraphicConfigTemplate();
00079
00083 virtual ~SoGLGraphicConfigTemplate();
00084
00091 virtual SbBool isGraphicsConfigSupported(SoGraphicConfig &graphicConfig) const;
00092
00096 void setDoubleBuffer(SoGraphicConfigTemplate::Preference pref);
00097
00101 SoGraphicConfigTemplate::Preference getDoubleBuffer() const;
00102
00106 void setStereoBuffer(SoGraphicConfigTemplate::Preference pref);
00107
00111 SoGraphicConfigTemplate::Preference getStereoBuffer() const;
00112
00116 void setAccelerated(SoGraphicConfigTemplate::Preference pref);
00117
00121 SoGraphicConfigTemplate::Preference getAccelerated() const;
00122
00130 void setDepth(SoGraphicConfigTemplate::Preference pref,
00131 int minBits = 0,
00132 int maxBits = INT_MAX);
00133
00139 SoGraphicConfigTemplate::Preference getDepth(int &minBits,
00140 int &maxBits) const;
00141
00142 #if 1 SoDEPRECATED
00147 void setOverlays( SoGraphicConfigTemplate::Preference pref );
00148 SoDEPRECATED
00153 SoGraphicConfigTemplate::Preference getOverlays() const;
00154 SoDEPRECATED
00164 void setIndexedColor(SoGraphicConfigTemplate::Preference pref,
00165 int minBits = 0,
00166 int maxBits = INT_MAX);
00167 SoDEPRECATED
00174 SoGraphicConfigTemplate::Preference getIndexedColor(int &minBits,
00175 int &maxBits) const;
00176 #endif
00182 SbBool isFloatRGBAColor() const;
00183
00194 void setRGBAColor(SoGraphicConfigTemplate::Preference pref,
00195 int minRedBits = 0,
00196 int minGreenBits = 0,
00197 int minBlueBits = 0,
00198 int minAlphaBits = 0,
00199 int maxRedBits = INT_MAX,
00200 int maxGreenBits = INT_MAX,
00201 int maxBlueBits = INT_MAX,
00202 int maxAlphaBits = INT_MAX);
00203
00209 SoGraphicConfigTemplate::Preference getRGBAColor(int &minRedBits,
00210 int &minGreenBits,
00211 int &minBlueBits,
00212 int &minAlphaBits,
00213 int &maxRedBits,
00214 int &maxGreenBits,
00215 int &maxBlueBits,
00216 int &maxAlphaBits) const;
00217
00218
00229 void setFloatRGBAColor(SoGraphicConfigTemplate::Preference pref,
00230 int minFloatRedBits = 15,
00231 int minFloatGreenBits = 15,
00232 int minFloatBlueBits = 15,
00233 int minFloatAlphaBits = 15,
00234 int maxFloatRedBits = 16,
00235 int maxFloatGreenBits = 16,
00236 int maxFloatBlueBits = 16,
00237 int maxFloatAlphaBits = 16);
00243 SoGraphicConfigTemplate::Preference getFloatRGBAColor(int &minFloatRedBits,
00244 int &minFloatGreenBits,
00245 int &minFloatBlueBits,
00246 int &minFloatAlphaBits,
00247 int &maxFloatRedBits,
00248 int &maxFloatGreenBits,
00249 int &maxFloatBlueBits,
00250 int &maxFloatAlphaBits) const;
00251
00252
00262 void setAccum(SoGraphicConfigTemplate::Preference pref,
00263 int minRedBits = 0,
00264 int minGreenBits = 0,
00265 int minBlueBits = 0,
00266 int minAlphaBits = 0,
00267 int maxRedBits = INT_MAX,
00268 int maxGreenBits = INT_MAX,
00269 int maxBlueBits = INT_MAX,
00270 int maxAlphaBits = INT_MAX);
00271
00277 SoGraphicConfigTemplate::Preference getAccum(int &minRedBits,
00278 int &minGreenBits,
00279 int &minBlueBits,
00280 int &minAlphaBits,
00281 int &maxRedBits,
00282 int &maxGreenBits,
00283 int &maxBlueBits,
00284 int &maxAlphaBits) const;
00285
00294 void setStencil(SoGraphicConfigTemplate::Preference pref,
00295 int minBits = 0,
00296 int maxBits = INT_MAX);
00297
00303 SoGraphicConfigTemplate::Preference getStencil(int &minBits,
00304 int &maxBits) const;
00305
00317 void setFullSceneAntialiasing( SoGraphicConfigTemplate::Preference pref,
00318 int minFsaaBits = 0,
00319 int maxFsaaBits = INT_MAX );
00320
00326 SoGraphicConfigTemplate::Preference getFullSceneAntialiasing( int &minFsaaBits,
00327 int &maxFsaaBits) const;
00328
00329 private:
00330
00331 SoGLGraphicConfigTemplateSync* getSynchronizer() const;
00332 void setSynchronizer( SoGLGraphicConfigTemplateSync* );
00333
00334 SoGLGraphicConfigTemplate( const SoGLGraphicConfigTemplate& );
00335
00339 SoGLGraphicConfigTemplate &operator =(const SoGLGraphicConfigTemplate &gc);
00340
00341 private:
00342 SoGLGraphicConfigTemplateSync* m_synchronizer;
00343 };
00344
00345
00346 inline SoGLGraphicConfigTemplateSync*
00347 SoGLGraphicConfigTemplate::getSynchronizer() const
00348 {
00349 return m_synchronizer;
00350 }
00351
00352 #endif
00353
00354