| Gtk2Hs | Contents | Index

Graphics.UI.Gtk.OpenGL.Context

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

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

Instances

GObjectClass GLContext
GLContextClass GLContext

class GObjectClass o => GLContextClass o

Instances

GLContextClass GLContext

castToGLContext :: GObjectClass obj => obj -> GLContext
data GLRenderType

Constructors

RGBAType |
ColorIndexType |

Instances

Enum GLRenderType
Eq GLRenderType

Constructors
glContextNew

:: 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

:: 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
Gets the `GLConfig` with which the `GLContext` is configured.
glContextGetShareList :: GLContext -> IO GLContext
Gets the other `GLContext` with which the `GLContext` shares the display lists and texture objects.
glContextIsDirect :: GLContext -> IO Bool
Returns whether the `GLContext` is a direct rendering context.
glContextGetRenderType :: GLContext -> IO GLRenderType
Gets the `GLRenderType` of the `GLContext`.
glContextGetCurrent

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

Produced by Haddock version 2.4.2