gtkglext-0.12.1: Binding to the GTK+ OpenGL Extension

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net
Safe Haskell | None

Graphics.UI.Gtk.OpenGL.Context

Contents

- Types
- Constructors
- Methods

Description

OpenGL rendering context object

Synopsis

- data GLContext
- class GObjectClass o => GLContextClass o
- castToGLContext :: GObjectClass obj => obj -> GLContext
- data GLRenderType
  - = RGBAType
  - | ColorIndexType
- glContextNew :: GLDrawableClass gldrawable => gldrawable -> Maybe GLContext -> Bool -> GLRenderType -> IO GLContext
- glContextGetGLDrawable :: GLContext -> IO GLDrawable
- glContextGetGLConfig :: GLContext -> IO GLConfig
- glContextGetShareList :: GLContext -> IO GLContext
- glContextIsDirect :: GLContext -> IO Bool
- glContextGetRenderType :: GLContext -> IO GLRenderType
- glContextGetCurrent :: IO (Maybe GLContext)

# Types

data GLContext Source

Instances

Eq GLContext |
Ord GLContext |
GObjectClass GLContext |
GLContextClass GLContext |

class GObjectClass o => GLContextClass o Source

Instances

GLContextClass GLContext |

castToGLContext :: GObjectClass obj => obj -> GLContext Source

data GLRenderType Source

Constructors

RGBAType |
ColorIndexType |

Instances

Enum GLRenderType |
Eq GLRenderType |

# Constructors

glContextNew Source

Arguments

:: GLDrawableClass gldrawable |
=> gldrawable | `gldrawable` - a `GLDrawable`.
-> Maybe GLContext | `shareList` - the `GLContext` with which to share display lists and texture objects. A value of `Nothing` indicates that no sharing is to take place.
-> Bool | `direct` - whether rendering is to be done with a direct connection to the graphics system.
-> GLRenderType | `renderType` - `RGBAType` or `ColorIndexType` (currently not used).
-> IO GLContext |

Creates a new OpenGL rendering context.

# Methods

glContextGetGLDrawable Source

Arguments

:: GLContext |
-> IO GLDrawable | returns the `GLDrawable` or `Nothing` if no `GLDrawable` is bound.

Gets `GLDrawable` to which the `GLContext` is bound.

glContextGetGLConfig :: GLContext -> IO GLConfig Source

Gets the `GLConfig` with which the `GLContext` is configured.

glContextGetShareList :: GLContext -> IO GLContext Source

Gets the other `GLContext` with which the `GLContext` shares the display lists and texture objects.

glContextIsDirect :: GLContext -> IO Bool Source

Returns whether the `GLContext` is a direct rendering context.

glContextGetRenderType :: GLContext -> IO GLRenderType Source

Gets the `GLRenderType` of the `GLContext`.

glContextGetCurrent Source

Arguments

:: IO (Maybe GLContext) | returns the current `GLContext` or `Nothing` if there is no current context.

Returns the current `GLContext`.