Anyone know why this always returns invalid texture objects?

"Jefferson Heard" <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe,gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.