[Haskell-cafe] Where is OpenGL loadMatrix ?
Krzysztof Skrzętnicki
gtener at gmail.com
Thu Sep 25 09:45:21 EDT 2008
On Thu, Sep 25, 2008 at 15:39, minh thu <noteed at gmail.com> wrote:
>
> Hi,
>
> I can't find the loadMatrix function in
> http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/Graphics-Rendering-OpenGL-GL-CoordTrans.html
>
> Should I use loadIdentity then multMatrix instead ?
>
> Thank you,
> Thu
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
From what I can see in the source, loadMatrix is method of class
MatrixComponent [1]:
instance MatrixComponent GLfloat_ where
getMatrix = getFloatv
loadMatrix = glLoadMatrixf
loadTransposeMatrix = glLoadTransposeMatrixfARB
multMatrix_ = glMultMatrixf
multTransposeMatrix = glMultTransposeMatrixfARB
rotate a (Vector3 x y z) = glRotatef a x y z
translate (Vector3 x y z) = glTranslatef x y z
scale = glScalef
However, for some reason it is not exported:
MatrixOrder(..), MatrixComponent(rotate,translate,scale), Matrix(..),
Best regards
Christopher Skrzętnicki
[1]: http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/src/Graphics-Rendering-OpenGL-GL-CoordTrans.html#MatrixComponent
More information about the Haskell-Cafe
mailing list