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

drawable.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_DRAWABLE_H
00025 #define INTI_GDK_GL_DRAWABLE_H
00026 
00027 #ifndef INTI_G_TYPE_H
00028 #include <inti/glib/type.h>
00029 #endif
00030 
00031 #ifndef __GDK_GL_DRAWABLE_H__
00032 #include <gdk/gdkgldrawable.h>
00033 #endif
00034 
00035 namespace Inti {
00036 
00037 namespace Gdk {
00038 
00039 namespace GL {
00040 
00041 class Config;
00042 class Context;
00043 class DrawableClass;
00044 
00049 
00050 class Drawable : public virtual G::TypeInterface
00051 {
00052         friend class DrawableClass;
00053 
00054 protected:
00057 
00058         virtual ~Drawable() = 0;
00060 
00062 //  Override these do_ methods when you want to change the default behaviour of the GdkGLDrawable.
00063 
00064         virtual GdkGLContext* do_create_new_context(GdkGLContext *share_list, bool direct, int render_type);
00065 
00066         virtual bool do_make_context_current(GdkGLDrawable *read, GdkGLContext *glcontext);
00067 
00068         virtual bool do_is_double_buffered();
00069 
00070         virtual void do_swap_buffers();
00071 
00072         virtual void do_wait_gl();
00073 
00074         virtual void do_wait_gdk();
00075 
00076         virtual bool do_gl_begin(GdkGLDrawable *read, GdkGLContext *glcontext);
00077 
00078         virtual void do_gl_end();
00079 
00080         virtual GdkGLConfig* do_get_gl_config();
00081 
00082         virtual void do_get_size(int *width, int *height);
00083 
00084 public:
00087 
00088         GdkGLDrawable* gdk_gl_drawable() const { return (GdkGLDrawable*)instance; }
00090 
00091         GdkGLDrawableClass* gdk_gl_drawable_class() const;
00093 
00094         operator GdkGLDrawable* () const;
00096 
00097         bool is_double_buffered() const;
00100 
00101         Config* get_gl_config() const;
00104 
00105         void get_size(int *width, int *height) const;
00111 
00113 
00114         static Drawable* get_current();
00117 
00120 
00121         bool make_current(Context& glcontext);
00125 
00126         void swap_buffers();
00128 
00129         void wait_gl();
00131 
00132         void wait_gdk();
00134 
00135         bool gl_begin(Context& glcontext);
00139 
00140         void gl_end();
00142 
00144 };
00145 
00146 } // namespace GL
00147 
00148 } // namespace Gdk
00149 
00150 } // namespace Inti
00151 
00152 #endif // INTI_GDK_GL_DRAWABLE_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