diff --git a/AERN-RnToRm-Plot.cabal b/AERN-RnToRm-Plot.cabal
--- a/AERN-RnToRm-Plot.cabal
+++ b/AERN-RnToRm-Plot.cabal
@@ -1,5 +1,5 @@
 Name:           AERN-RnToRm-Plot
-Version:        0.2.0.2
+Version:        0.2.0.3
 Cabal-Version:  >= 1.2
 Build-Type:     Simple
 License:        BSD3
@@ -28,13 +28,13 @@
       directory, filepath, time, stm, mtl,
       AERN-Real >= 0.10, AERN-Real < 0.10.1,
       AERN-RnToRm >= 0.5, AERN-RnToRm < 0.5.1,
-      OpenGL >= 2.2.1.1, GLUT >= 2.1.1.1,
-      OpenGL < 3, GLUT < 3,
+      OpenGL >= 2.3, OpenGL < 2.4,
       gtk >= 0.10, gtkglext >= 0.10, glib >= 0.10, glade >= 0.10,
       gtk < 0.11, gtkglext < 0.11, glib < 0.11, glade < 0.11
   Exposed-modules:
     Data.Number.ER.RnToRm.Plot.FnView,
     Data.Number.ER.RnToRm.Plot.GLDrawable,
-    Data.Number.ER.RnToRm.Plot.Params
+    Data.Number.ER.RnToRm.Plot.Params,
+    Data.Number.ER.Misc.GL
     
   
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+0.2.0.3: 1 August 2009: adapted to new OpenGL, removed GLUT pseudo dependency
 0.2.0.2: 29 July 2009: renamed "demos" folder to "examples"
 0.2.0.1: 29 July 2009: fixed dependencies
 0.2: 29 July 2009
diff --git a/src/Data/Number/ER/Misc/GL.hs b/src/Data/Number/ER/Misc/GL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Number/ER/Misc/GL.hs
@@ -0,0 +1,19 @@
+{-|
+    Module      :  Data.Number.ER.Misc.GL
+    Description :  some OpenGL extras 
+    Copyright   :  (c) Michal Konecny 2008
+    License     :  BSD3
+
+    Maintainer  :  mik@konecny.aow.cz
+    Stability   :  experimental
+    Portability :  portable
+    
+    Miscelaneous utilities related to OpenGL.
+-}
+module Data.Number.ER.Misc.GL where
+
+-- import qualified Graphics.Rendering.OpenGL as GL
+import Foreign.C.Types
+
+doubleToCDouble :: Double -> CDouble
+doubleToCDouble = realToFrac
diff --git a/src/Data/Number/ER/RnToRm/Plot/FnView.hs b/src/Data/Number/ER/RnToRm/Plot/FnView.hs
--- a/src/Data/Number/ER/RnToRm/Plot/FnView.hs
+++ b/src/Data/Number/ER/RnToRm/Plot/FnView.hs
@@ -63,7 +63,9 @@
 
 import Control.Monad.Reader.Class
 import Control.Monad.Trans
+
 import Foreign.Storable
+import Foreign.C.Types
 
 {-|
     Two transactional variables with values of the following two types
@@ -1004,29 +1006,29 @@
             do
             return ()
 --            FTGL.setFontFaceSize font 6 12
---            GL.matrixMode $= GL.Projection
+----            GL.matrixMode $= GL.Projection
 --            GL.preservingMatrix $
 --                do
---            GL.translate $ GL.Vector3 0.2 0.8 z
---            GL.scale 0.01 0.01 z
---            m <- GL.newMatrix GL.ColumnMajor [0.1, 0, 0, 0,   0, 0.1, 0, 0,  0, 0, 0.1, 0,  0, 0, 0, 1]
---            GL.multMatrix (m :: GL.GLmatrix Double)
---            GL.renderPrimitive GL.Lines $
---                do
---                GL.vertex $ GL.Vertex3 0 0 z  
---                GL.vertex $ GL.Vertex3 0.5 0.5 z
---                m <- GL.newMatrix GL.ColumnMajor [1,0,0,0,1,0,0,0,1]
---                let _ = m :: (GL.GLmatrix Double)
---                GL.withMatrix m $ \_ _ ->
+----                GL.translate $ GL.Vector3 0.2 0.8 z
+----                GL.scale 0.01 0.01 z
+--                m <- GL.newMatrix GL.ColumnMajor [0.1, 0, 0, 0,   0, 0.1, 0, 0,  0, 0, 0.1, 0,  0, 0, 0, 1]
+--                GL.multMatrix (m :: GL.GLmatrix CDouble)
+--                GL.renderPrimitive GL.Lines $
 --                    do
-----                GL.rasterPos $ GL.Vertex2 50 (50 :: GL.GLdouble)
-----                FTGL.renderFont font label FTGL.Front
---                    GL.renderPrimitive GL.Lines $
---                        do
---                        GL.vertex $ GL.Vertex3 0 0 z  
---                        GL.vertex $ GL.Vertex3 10 10 z
---                    GtkGL.glDrawableSwapBuffers glwindow
-----            box <- FTGL.getFontBBox font label
-----            putStrLn $ show box
-----            GLUT.renderString GLUT.Fixed9By15 label
+--                    GL.vertex $ GL.Vertex3 0 0 z  
+--                    GL.vertex $ GL.Vertex3 0.5 0.5 z
+----                m <- GL.newMatrix GL.ColumnMajor [1,0,0,0,1,0,0,0,1]
+----                let _ = m :: (GL.GLmatrix Double)
+----                GL.withMatrix m $ \_ _ ->
+----                    do
+------                GL.rasterPos $ GL.Vertex2 50 (50 :: GL.GLdouble)
+------                FTGL.renderFont font label FTGL.Front
+----                    GL.renderPrimitive GL.Lines $
+----                        do
+----                        GL.vertex $ GL.Vertex3 0 0 z  
+----                        GL.vertex $ GL.Vertex3 10 10 z
+----                    GtkGL.glDrawableSwapBuffers glwindow
+------            box <- FTGL.getFontBBox font label
+------            putStrLn $ show box
+------            GLUT.renderString GLUT.Fixed9By15 label
     
diff --git a/src/Data/Number/ER/RnToRm/Plot/GLDrawable.hs b/src/Data/Number/ER/RnToRm/Plot/GLDrawable.hs
--- a/src/Data/Number/ER/RnToRm/Plot/GLDrawable.hs
+++ b/src/Data/Number/ER/RnToRm/Plot/GLDrawable.hs
@@ -37,6 +37,7 @@
 import Data.Number.ER.RnToRm.Plot.Params
 
 import Data.Number.ER.Misc
+import Data.Number.ER.Misc.GL
 
 import qualified Graphics.Rendering.OpenGL as GL
 
@@ -118,8 +119,8 @@
                 | otherwise =
                     ((dD,vD1),(dD,vD2))
                 where
-                (vD1,vD2) = RA.doubleBounds v
-                dD = snd $ RA.doubleBounds d
+                (vD1,vD2) = mapPairHomog doubleToCDouble $ RA.doubleBounds v
+                dD = doubleToCDouble $ snd $ RA.doubleBounds d
         mkVertexNorm (d,v) =
             do
             GL.vertex $ GL.Vertex3 dNorm vNorm 0
