Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

Gdk::GL::Context Class Reference

#include <context.h>

List of all members.

Public Member Functions

virtual ~Context ()
GdkGLContext * gobj ()
 Provides access to the underlying C GObject.
const GdkGLContext * gobj () const
 Provides access to the underlying C GObject.
GdkGLContext * gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool copy (const Glib::RefPtr< const Context > &src, unsigned long mask=GL_ALL_ATTRIB_BITS)
Glib::RefPtr< Drawable > get_gl_drawable ()
Glib::RefPtr< const Drawable > get_gl_drawable () const
Glib::RefPtr< Config > get_gl_config ()
Glib::RefPtr< const Config > get_gl_config () const
Glib::RefPtr< Context > get_share_list ()
Glib::RefPtr< const Context > get_share_list () const
bool is_direct () const
int get_render_type () const

Static Public Member Functions

static Glib::RefPtr< Context > create (const Glib::RefPtr< const Drawable > &gldrawable, const Glib::RefPtr< const Context > &share_list, bool direct=true, int render_type=RGBA_TYPE)
static Glib::RefPtr< Context > create (const Glib::RefPtr< const Drawable > &gldrawable, bool direct=true, int render_type=RGBA_TYPE)
static Glib::RefPtr< Context > get_current ()

Protected Member Functions

 Context (const Glib::RefPtr< const Drawable > &gldrawable, const Glib::RefPtr< const Context > &share_list, bool direct=true, int render_type=RGBA_TYPE)
 Context (const Glib::RefPtr< const Drawable > &gldrawable, bool direct=true, int render_type=RGBA_TYPE)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gdk::GL::Context > wrap (GdkGLContext *object, bool take_copy=false)


Detailed Description

OpenGL rendering context.


Constructor & Destructor Documentation

virtual Gdk::GL::Context::~Context (   )  [virtual]
 

Gdk::GL::Context::Context (  const Glib::RefPtr< const Drawable > &  gldrawable,
const Glib::RefPtr< const Context > &  share_list,
bool  direct = true,
int  render_type = RGBA_TYPE
)  [protected]
 

Gdk::GL::Context::Context (  const Glib::RefPtr< const Drawable > &  gldrawable,
bool  direct = true,
int  render_type = RGBA_TYPE
)  [explicit, protected]
 


Member Function Documentation

bool Gdk::GL::Context::copy (  const Glib::RefPtr< const Context > &  src,
unsigned long  mask = GL_ALL_ATTRIB_BITS
) 
 

Copy state from one rendering context to another.

mask contains the bitwise-OR of the same symbolic names that are passed to the glPushAttrib() function. You can use GL_ALL_ATTRIB_BITS to copy all the rendering state information.

Parameters:
src the source context.
mask which portions of src state are to be copied.
Returns:
false if it fails, true otherwise.

static Glib::RefPtr<Context> Gdk::GL::Context::create (  const Glib::RefPtr< const Drawable > &  gldrawable,
bool  direct = true,
int  render_type = RGBA_TYPE
)  [static]
 

Create a new OpenGL rendering context.

Parameters:
gldrawable a Gdk::GL::Drawable.
direct whether rendering is to be done with a direct connection to the graphics system.
render_type Gdk::GL::RGBA_TYPE or Gdk::GL::COLOR_INDEX_TYPE (currently not used).
Returns:
the new Gdk::GL::Context.

static Glib::RefPtr<Context> Gdk::GL::Context::create (  const Glib::RefPtr< const Drawable > &  gldrawable,
const Glib::RefPtr< const Context > &  share_list,
bool  direct = true,
int  render_type = RGBA_TYPE
)  [static]
 

Create a new OpenGL rendering context.

Parameters:
gldrawable a Gdk::GL::Drawable.
share_list the Gdk::GL::Context which to share display lists.
direct whether rendering is to be done with a direct connection to the graphics system.
render_type Gdk::GL::RGBA_TYPE or Gdk::GL::COLOR_INDEX_TYPE (currently not used).
Returns:
the new Gdk::GL::Context.
Examples:
pixmap-mixed.cc, and pixmap.cc.

static Glib::RefPtr<Context> Gdk::GL::Context::get_current (   )  [static]
 

Returns the current Gdk::GLContext.

Returns:
The current Gdk::GLContext or 0 if there is no current context.

Glib::RefPtr<const Config> Gdk::GL::Context::get_gl_config (   )  const
 

Gets Gdk::GLConfig with which the glcontext is configured.

Returns:
The Gdk::GLConfig.

Glib::RefPtr<Config> Gdk::GL::Context::get_gl_config (   ) 
 

Gets Gdk::GLConfig with which the glcontext is configured.

Returns:
The Gdk::GLConfig.

Glib::RefPtr<const Drawable> Gdk::GL::Context::get_gl_drawable (   )  const
 

Gets Gdk::GLDrawable to which the glcontext is bound.

Returns:
The Gdk::GLDrawable or 0 if no Gdk::GLDrawable is bound.

Glib::RefPtr<Drawable> Gdk::GL::Context::get_gl_drawable (   ) 
 

Gets Gdk::GLDrawable to which the glcontext is bound.

Returns:
The Gdk::GLDrawable or 0 if no Gdk::GLDrawable is bound.

int Gdk::GL::Context::get_render_type (   )  const
 

Gets render_type of the glcontext .

Returns:
GDK_GL_RGBA_TYPE or GDK_GL_COLOR_INDEX_TYPE.

Glib::RefPtr<const Context> Gdk::GL::Context::get_share_list (   )  const
 

Gets Gdk::GLContext with which the glcontext shares the display lists and texture objects.

Returns:
The Gdk::GLContext.

Glib::RefPtr<Context> Gdk::GL::Context::get_share_list (   ) 
 

Gets Gdk::GLContext with which the glcontext shares the display lists and texture objects.

Returns:
The Gdk::GLContext.

const GdkGLContext* Gdk::GL::Context::gobj (   )  const [inline]
 

Provides access to the underlying C GObject.

GdkGLContext* Gdk::GL::Context::gobj (   )  [inline]
 

Provides access to the underlying C GObject.

GdkGLContext* Gdk::GL::Context::gobj_copy (   ) 
 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Gdk::GL::Context::is_direct (   )  const
 

Returns whether the glcontext is a direct rendering context.

Returns:
true if the glcontext is a direct rendering contest.


Friends And Related Function Documentation

Glib::RefPtr< Gdk::GL::Context > wrap (  GdkGLContext *  object,
bool  take_copy = false
)  [related]
 

Parameters:
object The C instance
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated on Mon Feb 27 18:47:52 2006 for gtkglextmm by  doxygen 1.4.4