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
00070 class SoGLGraphicConfigTemplate : public SoGraphicConfigTemplate {
00071
00072 public:
00073
00077 SoGLGraphicConfigTemplate();
00078
00082 virtual ~SoGLGraphicConfigTemplate();
00083
00090 virtual SbBool isGraphicsConfigSupported(SoGraphicConfig &graphicConfig) const;
00091
00095 void setDoubleBuffer(SoGraphicConfigTemplate::Preference pref);
00096
00100 SoGraphicConfigTemplate::Preference getDoubleBuffer() const;
00101
00105 void setStereoBuffer(SoGraphicConfigTemplate::Preference pref);
00106
00110 SoGraphicConfigTemplate::Preference getStereoBuffer() const;
00111
00115 void setAccelerated(SoGraphicConfigTemplate::Preference pref);
00116
00120 SoGraphicConfigTemplate::Preference getAccelerated() const;
00121
00129 void setDepth(SoGraphicConfigTemplate::Preference pref,
00130 int minBits = 0,
00131 int maxBits = INT_MAX);
00132
00138 SoGraphicConfigTemplate::Preference getDepth(int &minBits,
00139 int &maxBits) const;
00140
00145 SbBool isFloatRGBAColor() const;
00146
00157 void setRGBAColor(SoGraphicConfigTemplate::Preference pref,
00158 int minRedBits = 0,
00159 int minGreenBits = 0,
00160 int minBlueBits = 0,
00161 int minAlphaBits = 0,
00162 int maxRedBits = INT_MAX,
00163 int maxGreenBits = INT_MAX,
00164 int maxBlueBits = INT_MAX,
00165 int maxAlphaBits = INT_MAX);
00166
00172 SoGraphicConfigTemplate::Preference getRGBAColor(int &minRedBits,
00173 int &minGreenBits,
00174 int &minBlueBits,
00175 int &minAlphaBits,
00176 int &maxRedBits,
00177 int &maxGreenBits,
00178 int &maxBlueBits,
00179 int &maxAlphaBits) const;
00180
00181
00192 void setFloatRGBAColor(SoGraphicConfigTemplate::Preference pref,
00193 int minFloatRedBits = 15,
00194 int minFloatGreenBits = 15,
00195 int minFloatBlueBits = 15,
00196 int minFloatAlphaBits = 15,
00197 int maxFloatRedBits = 16,
00198 int maxFloatGreenBits = 16,
00199 int maxFloatBlueBits = 16,
00200 int maxFloatAlphaBits = 16);
00206 SoGraphicConfigTemplate::Preference getFloatRGBAColor(int &minFloatRedBits,
00207 int &minFloatGreenBits,
00208 int &minFloatBlueBits,
00209 int &minFloatAlphaBits,
00210 int &maxFloatRedBits,
00211 int &maxFloatGreenBits,
00212 int &maxFloatBlueBits,
00213 int &maxFloatAlphaBits) const;
00214
00215
00225 void setAccum(SoGraphicConfigTemplate::Preference pref,
00226 int minRedBits = 0,
00227 int minGreenBits = 0,
00228 int minBlueBits = 0,
00229 int minAlphaBits = 0,
00230 int maxRedBits = INT_MAX,
00231 int maxGreenBits = INT_MAX,
00232 int maxBlueBits = INT_MAX,
00233 int maxAlphaBits = INT_MAX);
00234
00240 SoGraphicConfigTemplate::Preference getAccum(int &minRedBits,
00241 int &minGreenBits,
00242 int &minBlueBits,
00243 int &minAlphaBits,
00244 int &maxRedBits,
00245 int &maxGreenBits,
00246 int &maxBlueBits,
00247 int &maxAlphaBits) const;
00248
00257 void setStencil(SoGraphicConfigTemplate::Preference pref,
00258 int minBits = 0,
00259 int maxBits = INT_MAX);
00260
00266 SoGraphicConfigTemplate::Preference getStencil(int &minBits,
00267 int &maxBits) const;
00268
00280 void setFullSceneAntialiasing( SoGraphicConfigTemplate::Preference pref,
00281 int minFsaaBits = 0,
00282 int maxFsaaBits = INT_MAX );
00283
00289 SoGraphicConfigTemplate::Preference getFullSceneAntialiasing( int &minFsaaBits,
00290 int &maxFsaaBits) const;
00291
00292 private:
00293
00294 SoGLGraphicConfigTemplateSync* getSynchronizer() const;
00295 void setSynchronizer( SoGLGraphicConfigTemplateSync* );
00296
00297 SoGLGraphicConfigTemplate( const SoGLGraphicConfigTemplate& );
00298
00302 SoGLGraphicConfigTemplate &operator =(const SoGLGraphicConfigTemplate &gc);
00303
00304 private:
00305 SoGLGraphicConfigTemplateSync* m_synchronizer;
00306 };
00307
00308
00309 inline SoGLGraphicConfigTemplateSync*
00310 SoGLGraphicConfigTemplate::getSynchronizer() const
00311 {
00312 return m_synchronizer;
00313 }
00314
00315 #endif
00316
00317