import Graphics.UI.Gtk
import Graphics.UI.Gtk.Glade
import Graphics.UI.Gtk.OpenGL
import qualified Graphics.Rendering.OpenGL as GL
import Graphics.Rendering.OpenGL (($=))

main = do
  initGUI
  initGL
  GL.shadeModel $= GL.Flat
  GL.depthFunc $= Just GL.Less
  (window1,gui,dlgs) <- constructGUIObject
  (sX, sY) <- liftM (mapPair fromIntegral) . widgetGetSize .
drawing_canvas $ gui -- get the canvas size for determining the part
of the widget to repaint
  pb <- pixbufNew ColorspaceRgb False 8 (round pbWidth) (round pbHeight)
  pixbufFill pb 0 0 0 255
  pxbufs <- initSubpixbufs pb texRows texCols
  textures <- GL.genObjectNames (texRows*texCols)
  print textures


-- 
I try to take things like a crow; war and chaos don't always ruin a
picnic, they just mean you have to be careful what you swallow.

-- Jessica Edwards
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to