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
00074 virtual void getDepth(int &bits) const;
00075
00076 #if 1 SoDEPRECATED
00082 SbBool hasOverlays() const;
00083 SoDEPRECATED
00090 void getIndexedColor( int &bits ) const;
00091 #endif
00098 virtual void getRGBAColor(int &redBits,
00099 int &greenBits,
00100 int &blueBits,
00101 int &alphaBits) const;
00102
00108 virtual void getFloatRGBAColor(int &redBits,
00109 int &greenBits,
00110 int &blueBits,
00111 int &alphaBits) const;
00112
00113
00119 virtual void getAccum(int &redBits,
00120 int &greenBits,
00121 int &blueBits,
00122 int &alphaBits) const;
00123
00128 virtual void getStencil(int &bits) const;
00129
00134 virtual SbBool getFullSceneAntialiasing(int &bits) const;
00135
00139 SbGlContextHelper::VisualInfo getXVisualInfo();
00140
00141 #ifndef __hpux
00142
00145 GLXFBConfig *getFBConfig();
00146 #endif
00147
00148 private:
00149
00150 static SoGLGraphicConfig *getConfig(SoGLGraphicDevicePeer *device, SbGlContextHelper::VisualInfo visual);
00151
00152 #ifndef __hpux
00153 static SoGLGraphicConfig *getConfig(SoGLGraphicDevicePeer *device,
00154 GLXFBConfig *fbConfig);
00155 #endif
00156
00157 virtual SbBool isValid() const;
00158
00159 static int getMaxFsaaSamples();
00160
00161 virtual ~SoXtGLGraphicConfig();
00162
00163 SoINTERNAL private:
00164
00165 SoXtGLGraphicConfig(SoGLGraphicDevicePeer *device, SbGlContextHelper::VisualInfo visual);
00166 #ifndef __hpux
00167 SoXtGLGraphicConfig(SoGLGraphicDevicePeer *device, GLXFBConfig fbConfig);
00168 #endif
00169 SoXtGLGraphicConfig(SoXtGLGraphicConfig &config);
00170
00171 private:
00172
00173 SbBool buildDescription();
00174
00175 SbBool m_supportMultiSample;
00176 int m_numSamples;
00177
00178 SoGLGraphicDevicePeer *m_device;
00179 SbGlContextHelper::VisualInfo m_visual;
00180 #ifndef __hpux
00181 GLXFBConfig m_fbConfig;
00182 #endif
00183 SbBool m_isValid;
00184 int m_bufferBits;
00185 int m_level;
00186 SbBool m_isIndexedColor;
00187 SbBool m_isDoubleBuffer;
00188 SbBool m_supportsStereo;
00189 int m_redBits, m_greenBits, m_blueBits, m_alphaBits;
00190 int m_auxBuffers;
00191 int m_depthBits;
00192 int m_stencilBits;
00193 int m_accumRedBits, m_accumGreenBits, m_accumBlueBits, m_accumAlphaBits;
00194 };
00195
00196 #endif
00197
00198
00199
00200