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

context.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_CONTEXT_H
00025 #define INTI_GDK_GL_CONTEXT_H
00026 
00027 #ifndef INTI_G_OBJECT_H
00028 #include <inti/glib/object.h>
00029 #endif
00030 
00031 #ifndef __GDK_GL_CONTEXT_H__
00032 #include <gdk/gdkglcontext.h>
00033 #endif
00034 
00035 #ifndef __GDK_GL_TOKENS_H__
00036 #include <gdk/gdkgltokens.h>
00037 #endif
00038 
00039 #ifndef __gl_h_
00040 #include <GL/gl.h>
00041 #endif
00042 
00043 namespace Inti {
00044 
00045 namespace Gdk {
00046 
00047 namespace GL {
00048 
00049 class Config;
00050 class ContextClass;
00051 class Drawable;
00052 
00055 
00056 class Context : public G::Object
00057 {
00058         friend class G::Object;
00059         friend class ContextClass;
00060 
00061         Context(const Context&);
00062         Context& operator=(const Context&);
00063 
00064 protected:
00067 
00068         explicit Context(GdkGLContext *context, bool reference = true);
00075 
00077 
00078 public:
00081 
00082         virtual ~Context();
00084 
00086 
00087         static Pointer<Context> create(const Drawable& gldrawable, bool direct = true, int render_type = GDK_GL_RGBA_TYPE);
00095 
00096         static Pointer<Context> create(const Drawable& gldrawable, const Context& share_list, bool direct = true, int render_type = GDK_GL_RGBA_TYPE);
00103 
00106 
00107         GdkGLContext* gdk_gl_context() const { return (GdkGLContext*)instance; }
00109 
00110         GdkGLContextClass* gdk_gl_context_class() const;
00112 
00113         operator GdkGLContext* () const;
00115 
00116         Drawable* get_gl_drawable() const;
00119 
00120         Config* get_gl_config() const;
00123 
00124         Context* get_share_list() const;
00127 
00128         bool is_direct() const;
00131 
00132         int get_render_type() const;
00135 
00137 
00138         static Context* get_current();
00141 
00144 
00145         virtual void dispose();
00148 
00149         bool copy(const Context& src, unsigned long mask = GL_ALL_ATTRIB_BITS);
00157 
00159 };
00160 
00161 } // namespace GL
00162 
00163 } // namespace Gdk
00164 
00165 } // namespace Inti
00166 
00167 #endif // INTI_GDK_GL_CONTEXT_H
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