FXGLVisual.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                            V i s u a l   C l a s s                            *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXGLVisual.h,v 1.24 2006/01/22 17:58:04 fox Exp $                        *
00023 ********************************************************************************/
00024 #ifndef FX_DISABLEGL
00025 
00026 #if FX_GRAPHINGMODULE
00027 
00028 #ifndef FXGLVISUAL_H
00029 #define FXGLVISUAL_H
00030 
00031 #ifndef FXVISUAL_H
00032 #include "FXVisual.h"
00033 #endif
00034 
00035 namespace FX {
00036 
00037 
00038 class FXFont;
00039 class FXWindow;
00040 class FXImage;
00041 class FXIcon;
00042 class FXBitmap;
00043 class FXDCWindow;
00044 class FXGLCanvas;
00045 
00046 
00048 class FXGRAPHINGMODULEAPI FXGLVisual : public FXVisual {
00049   FXDECLARE(FXGLVisual)
00050   friend class FXWindow;
00051   friend class FXImage;
00052   friend class FXIcon;
00053   friend class FXBitmap;
00054   friend class FXDCWindow;
00055   friend class FXGLCanvas;
00056 protected:
00057   FXint        redSize;             // Desired #bits for red
00058   FXint        greenSize;           // Desired #bits for green
00059   FXint        blueSize;            // Desired #bits for blue
00060   FXint        alphaSize;           // Desired #bits for alpha
00061   FXint        depthSize;           // Desired #bits for Z
00062   FXint        stencilSize;         // Desired #bits for stencil
00063   FXint        accumRedSize;        // Desired #bits for accum red
00064   FXint        accumGreenSize;      // Desired #bits for accum green
00065   FXint        accumBlueSize;       // Desired #bits for accum blue
00066   FXint        accumAlphaSize;      // Desired #bits for accum alpha
00067 protected:
00068   FXGLVisual();
00069 private:
00070   FXGLVisual(const FXGLVisual&);
00071   FXGLVisual &operator=(const FXGLVisual&);
00072 public:
00073 
00075   FXGLVisual(FXApp* a,FXuint flags);
00076 
00084   static FXbool supported(FXApp* application,int& major,int& minor);
00085 
00087   virtual void create();
00088 
00090   virtual void detach();
00091 
00093   virtual void destroy();
00094 
00096   FXint getRedSize() const { return redSize; }
00097   FXint getGreenSize() const { return greenSize; }
00098   FXint getBlueSize() const { return blueSize; }
00099   FXint getAlphaSize() const { return alphaSize; }
00100   FXint getDepthSize() const { return depthSize; }
00101   FXint getStencilSize() const { return stencilSize; }
00102   FXint getAccumRedSize() const { return accumRedSize; }
00103   FXint getAccumGreenSize() const { return accumGreenSize; }
00104   FXint getAccumBlueSize() const { return accumBlueSize; }
00105   FXint getAccumAlphaSize() const { return accumAlphaSize; }
00106 
00108   void setRedSize(FXint rs){ redSize=rs; }
00109   void setGreenSize(FXint gs){ greenSize=gs; }
00110   void setBlueSize(FXint bs){ blueSize=bs; }
00111   void setAlphaSize(FXint as){ alphaSize=as; }
00112   void setDepthSize(FXint ds){ depthSize=ds; }
00113   void setStencilSize(FXint ss){ stencilSize=ss; }
00114   void setAccumRedSize(FXint rs){ accumRedSize=rs; }
00115   void setAccumGreenSize(FXint gs){ accumGreenSize=gs; }
00116   void setAccumBlueSize(FXint bs){ accumBlueSize=bs; }
00117   void setAccumAlphaSize(FXint as){ accumAlphaSize=as; }
00118 
00120   FXint getActualRedSize() const;
00121   FXint getActualGreenSize() const;
00122   FXint getActualBlueSize() const;
00123   FXint getActualAlphaSize() const;
00124   FXint getActualDepthSize() const;
00125   FXint getActualStencilSize() const;
00126   FXint getActualAccumRedSize() const;
00127   FXint getActualAccumGreenSize() const;
00128   FXint getActualAccumBlueSize() const;
00129   FXint getActualAccumAlphaSize() const;
00130 
00132   FXbool isDoubleBuffer() const;
00133 
00135   FXbool isStereo() const;
00136 
00138   FXbool isAccelerated() const;
00139 
00141   FXbool isBufferSwapCopy() const;
00142 
00144   virtual void save(FXStream& store) const;
00145 
00147   virtual void load(FXStream& store);
00148 
00150   virtual ~FXGLVisual();
00151   };
00152 
00153 
00155 extern FXGRAPHINGMODULEAPI void glUseFXFont(FXFont* font,int first,int count,int list);
00156 
00157 }
00158 
00159 #endif
00160 #endif
00161 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:22 2009 for TnFOX by doxygen v1.4.7