Opengl 哈斯凯尔负荷矩阵

Opengl 哈斯凯尔负荷矩阵,opengl,haskell,Opengl,Haskell,loadMatrixf的OpenGL函数在哪里?类型签名是什么?请参阅。我认为您正在这些文档中寻找newMatrix或matrixStateVar 例如:设mat为代表矩阵的16个浮点数的列表。然后你可以这样使用它: import qualified Graphics.Rendering.OpenGL.GL as GL drawThingWithMatrix :: [GL.GLfloat] -> IO () drawThingWithMatrix mat = GL.preservingM

loadMatrixf的OpenGL函数在哪里?类型签名是什么?

请参阅。我认为您正在这些文档中寻找
newMatrix
matrix
StateVar

例如:设
mat
为代表矩阵的16个浮点数的列表。然后你可以这样使用它:

import qualified Graphics.Rendering.OpenGL.GL as GL

drawThingWithMatrix :: [GL.GLfloat] -> IO ()
drawThingWithMatrix mat = GL.preservingMatrix $ do  -- instead of push/pop
    newmat <- GL.newMatrix GL.RowMajor mat          -- or ColumnMajor
    GL.currentMatrix GL.$= newmat
    -- draw your thing
将合格的Graphics.Rendering.OpenGL.GL导入为GL
drawThingWithMatrix::[GL.GLfloat]->IO()
drawThingWithMatrix mat=GL.preservingMatrix$do——而不是推送/弹出
纽马特