00001
00002
00003
#ifndef _GDKMM_GL_CONTEXT_H
00004
#define _GDKMM_GL_CONTEXT_H
00005
00006
#include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
#include <gdkmm/gl/defs.h>
00028
#include <gdkmm/gl/tokens.h>
00029
#include <gdkmm/gl/config.h>
00030
#include <gdkmm/gl/drawable.h>
00031
00032
#include <GL/gl.h>
00033
00034
00035
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00036
typedef struct _GdkGLContext GdkGLContext;
00037
typedef struct _GdkGLContextClass GdkGLContextClass;
00038
#endif
00039
00040
00041
namespace Gdk
00042 {
00043
00044
namespace GL
00045 {
class Context_Class; }
00046
00047 }
00048
namespace Gdk
00049 {
00050
namespace GL
00051 {
00052
00053
class Drawable;
00054
00061 class Context :
public Glib::Object
00062 {
00063
00064
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00065
00066
public:
00067
typedef Context CppObjectType;
00068
typedef Context_Class CppClassType;
00069
typedef GdkGLContext BaseObjectType;
00070
typedef GdkGLContextClass BaseClassType;
00071
00072
private:
friend class Context_Class;
00073
static CppClassType context_class_;
00074
00075
private:
00076
00077
Context(
const Context&);
00078
Context& operator=(
const Context&);
00079
00080
protected:
00081
explicit Context(
const Glib::ConstructParams& construct_params);
00082
explicit Context(GdkGLContext* castitem);
00083
00084
#endif
00085
00086
public:
00087
virtual ~Context();
00088
00089
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00090
static GType get_type() G_GNUC_CONST;
00091
static GType get_base_type() G_GNUC_CONST;
00092
#endif
00093
00095 GdkGLContext*
gobj() {
return reinterpret_cast<GdkGLContext*>(gobject_); }
00096
00098 const GdkGLContext*
gobj()
const {
return reinterpret_cast<GdkGLContext*>(gobject_); }
00099
00101 GdkGLContext*
gobj_copy();
00102
00103
private:
00104
00105
00106
protected:
00107
00108
Context(
const Glib::RefPtr<const Drawable>& gldrawable,
00109
const Glib::RefPtr<const Context>& share_list,
00110
bool direct =
true,
00111
int render_type = RGBA_TYPE);
00112
00113
explicit Context(
const Glib::RefPtr<const Drawable>& gldrawable,
00114
bool direct =
true,
00115
int render_type = RGBA_TYPE);
00116
00117
public:
00118
00129
static Glib::RefPtr<Context> create(
const Glib::RefPtr<const Drawable>& gldrawable,
00130
const Glib::RefPtr<const Context>& share_list,
00131
bool direct =
true,
00132
int render_type = RGBA_TYPE);
00133
00143
static Glib::RefPtr<Context> create(
const Glib::RefPtr<const Drawable>& gldrawable,
00144
bool direct =
true,
00145
int render_type = RGBA_TYPE);
00146
00147
public:
00148
00159
bool copy(
const Glib::RefPtr<const Context>& src,
00160
unsigned long mask = GL_ALL_ATTRIB_BITS);
00161
00162
00166 Glib::RefPtr<Drawable>
get_gl_drawable();
00167
00171 Glib::RefPtr<const Drawable>
get_gl_drawable() const;
00172
00173
00177 Glib::RefPtr<
Config> get_gl_config();
00178
00182 Glib::RefPtr<const
Config> get_gl_config() const;
00183
00184
00189 Glib::RefPtr<
Context> get_share_list();
00190
00195 Glib::RefPtr<const
Context> get_share_list() const;
00196
00197
00201
bool is_direct() const;
00202
00203
00207
int get_render_type() const;
00208
00209
00214 static Glib::RefPtr<
Context> get_current();
00215
00216
00217 public:
00218
00219 public:
00220
00221
00222 protected:
00223
00224
00225
00226
00227
00228 };
00229
00230 }
00231 }
00232
00233
00234 namespace Glib
00235 {
00241 Glib::RefPtr<Gdk::GL::Context> wrap(GdkGLContext* object,
bool take_copy =
false);
00242 }
00243
00244
00245
#endif
00246