Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

config.h

Go to the documentation of this file.
00001 /*  Inti-GL: Integrated Foundation Classes
00002  *  Copyright (C) 2003 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00023 
00024 #ifndef INTI_GDK_GL_CONFIG_H
00025 #define INTI_GDK_GL_CONFIG_H
00026 
00027 #ifndef INTI_G_OBJECT_H
00028 #include <inti/glib/object.h>
00029 #endif
00030 
00031 #ifndef __GDK_GL_CONFIG_H__
00032 #include <gdk/gdkglconfig.h>
00033 #endif
00034 
00035 namespace Inti {
00036 
00037 namespace Gdk {
00038 
00039 class Colormap;
00040 class Screen;
00041 class Visual;
00042 
00043 namespace GL {
00044 
00045 class ConfigClass;
00046 
00047 enum ConfigMode
00048 {
00049         MODE_RGB = GDK_GL_MODE_RGB, 
00050         MODE_RGBA = GDK_GL_MODE_RGBA, 
00051         MODE_INDEX = GDK_GL_MODE_INDEX, 
00052         MODE_SINGLE = GDK_GL_MODE_SINGLE, 
00053         MODE_DOUBLE = GDK_GL_MODE_DOUBLE, 
00054         MODE_STEREO = GDK_GL_MODE_STEREO, 
00055         MODE_ALPHA = GDK_GL_MODE_ALPHA, 
00056         MODE_DEPTH = GDK_GL_MODE_DEPTH, 
00057         MODE_STENCIL = GDK_GL_MODE_STENCIL, 
00058         MODE_ACCUM = GDK_GL_MODE_ACCUM, 
00059         MODE_MULTISAMPLE = GDK_GL_MODE_MULTISAMPLE 
00060 };
00061 
00062 typedef unsigned int ConfigModeField;
00063 
00066 
00067 class Config : public G::Object
00068 {
00069         friend class G::Object;
00070         friend class ConfigClass;
00071 
00072         Config(const Config&);
00073         Config& operator=(const Config&);
00074 
00075 protected:
00078 
00079         explicit Config(GdkGLConfig *config, bool reference = true);
00086 
00088 
00089 public:
00092 
00093         virtual ~Config();
00095 
00097 
00098         static Pointer<Config> create(const int *attrib_list, const Gdk::Screen *screen = 0);
00110 
00111         static Pointer<Config> create(ConfigModeField mode, const Gdk::Screen *screen = 0);
00116 
00119 
00120         GdkGLConfig* gdk_gl_config() const { return (GdkGLConfig*)instance; }
00122 
00123         GdkGLConfigClass* gdk_gl_config_class() const;
00125         
00126         operator GdkGLConfig* () const;
00128 
00129         Gdk::Screen* get_screen() const;
00131 
00132         bool get_attrib(int attribute, int& value);
00137 
00138         Gdk::Colormap* get_colormap() const;
00141 
00142         Gdk::Visual* get_visual() const;
00145 
00146         int get_depth() const;
00149 
00150         int get_layer_plane() const;
00157 
00158         int get_n_aux_buffers() const;
00161 
00162         int get_n_sample_buffers() const;
00165 
00166         bool is_rgba() const;
00169 
00170         bool is_double_buffered() const;
00173 
00174         bool is_stereo() const;
00177 
00178         bool has_alpha() const;
00181 
00182         bool has_depth_buffer() const;
00185 
00186         bool has_stencil_buffer() const;
00189 
00190         bool has_accum_buffer() const;
00193 
00195 };
00196 
00197 } // namespace GL
00198 
00199 } // namespace Gdk
00200 
00201 } // namespace Inti
00202 
00203 #endif // INTI_GDK_GL_CONFIG_H
00204 
Main Page - Footer


Generated on Sun Sep 14 20:59:26 2003 for Inti-GL by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002