{-# LINE 2 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) GLContext -- -- Author : Chris Mennie -- -- Created: 23 April 2016 -- -- Copyright (C) 2016 Chis Mennie -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- | -- Maintainer : gtk2hs-users@lists.sourceforge.net -- Stability : provisional -- Portability : portable (depends on GHC) -- -- OpenGL context -- module Graphics.UI.Gtk.Gdk.GLContext ( -- * Detail -- -- | GLContext is an object representing the platform-specific OpenGL drawing context. -- -- GLContexts are created for a GdkWindow, and the context will match the GdkVisual of the window. -- -- A 'GLContext' is not tied to any particular normal framebuffer. For instance, it cannot draw to -- the Window back buffer. The GDK repaint system is in full control of the painting to that. -- GDK will handle the integration of your rendering with that of other widgets. -- -- Support for 'GLContext' is platform-specific, context creation can fail, returning NULL context. -- -- A 'GLContext' has to be made "current" in order to start using it, otherwise any OpenGL call will -- be ignored. -- * Class Hierarchy -- | -- @ -- | 'GObject' -- | +----'GLContext' -- @ -- -- * Types -- * Methods {-# LINE 81 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} ) where import Control.Monad (liftM) import Data.Maybe (fromMaybe) import System.Glib.FFI import System.Glib.Flags (toFlags) import Graphics.UI.Gtk.Types {-# LINE 89 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} import Graphics.UI.Gtk.Gdk.Enums {-# LINE 90 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} import Graphics.UI.Gtk.Gdk.Cursor {-# LINE 91 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} import Graphics.UI.Gtk.General.Structs import System.Glib.GError (propagateGError) import System.Glib.Attributes {-# LINE 96 "./Graphics/UI/Gtk/Gdk/GLContext.chs" #-} -------------------- -- Methods