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_XT_GL_GRAPHIC_CONFIG_H_
00024 #define _SO_XT_GL_GRAPHIC_CONFIG_H_
00025
00026 #include <Inventor/components/SoGLGraphicConfig.h>
00027 #include <Inventor/components/SoGLGraphicDevice.h>
00028 #include <Inventor/helpers/SbGlContextHelper.h>
00029
00030 class SoGLGraphicDevicePeer;
00031
00050 class SoXtGLGraphicConfig : public SoGLGraphicConfig {
00051
00052 public:
00053
00058 virtual SbBool isDoubleBuffer() const;
00059
00063 virtual SbBool isStereoBuffer() const;
00064
00068 virtual SbBool isAccelerated() const;
00069
00077 virtual void getDepth(int &bits) const;
00078
00084 virtual void getRGBAColor(int &redBits,
00085 int &greenBits,
00086 int &blueBits,
00087 int &alphaBits) const;
00088
00094 virtual void getFloatRGBAColor(int &redBits,
00095 int &greenBits,
00096 int &blueBits,
00097 int &alphaBits) const;
00098
00099
00105 virtual void getAccum(int &redBits,
00106 int &greenBits,
00107 int &blueBits,
00108 int &alphaBits) const;
00109
00114 virtual void getStencil(int &bits) const;
00115
00120 virtual SbBool getFullSceneAntialiasing(int &bits) const;
00121
00125 SbGlContextHelper::VisualInfo getXVisualInfo();
00126
00130 GLXFBConfig *getFBConfig();
00131
00132 private:
00133
00134 static SoGLGraphicConfig *getConfig(SoGLGraphicDevicePeer *device, SbGlContextHelper::VisualInfo visual);
00135
00136 static SoGLGraphicConfig *getConfig(SoGLGraphicDevicePeer *device,
00137 GLXFBConfig *fbConfig);
00138
00139 virtual SbBool isValid() const;
00140
00141 static int getMaxFsaaSamples();
00142
00143 virtual ~SoXtGLGraphicConfig();
00144
00145 SoINTERNAL private:
00146
00147 SoXtGLGraphicConfig(SoGLGraphicDevicePeer *device, SbGlContextHelper::VisualInfo visual);
00148 SoXtGLGraphicConfig(SoGLGraphicDevicePeer *device, GLXFBConfig fbConfig);
00149 SoXtGLGraphicConfig(SoXtGLGraphicConfig &config);
00150
00151 private:
00152
00153 SbBool buildDescription();
00154
00155 SbBool m_supportMultiSample;
00156 int m_numSamples;
00157
00158 SoGLGraphicDevicePeer *m_device;
00159 SbGlContextHelper::VisualInfo m_visual;
00160 GLXFBConfig m_fbConfig;
00161 SbBool m_isValid;
00162 int m_bufferBits;
00163 int m_level;
00164 SbBool m_isIndexedColor;
00165 SbBool m_isDoubleBuffer;
00166 SbBool m_supportsStereo;
00167 int m_redBits, m_greenBits, m_blueBits, m_alphaBits;
00168 int m_auxBuffers;
00169 int m_depthBits;
00170 int m_stencilBits;
00171 int m_accumRedBits, m_accumGreenBits, m_accumBlueBits, m_accumAlphaBits;
00172 };
00173
00174 #endif
00175
00176
00177
00178