我在表单中有一个制服:
uniform float abc;
我在Haskell代码中得到它:
abc <- GL.get (GL.uniformLocation program "abc")
如何将GLfloat
值传递给它?
我从here看到我应该使用uniform1
,但该功能不会被模块导出。
其他所有实例:
instance UniformComponent a => Uniform (Vertex2 a)
instance UniformComponent a => Uniform (Vertex3 a)
instance UniformComponent a => Uniform (Vertex4 a)
instance UniformComponent a => Uniform (TexCoord1 a)
instance UniformComponent a => Uniform (TexCoord2 a)
instance UniformComponent a => Uniform (TexCoord3 a)
instance UniformComponent a => Uniform (TexCoord4 a)
instance UniformComponent a => Uniform (Normal3 a)
instance UniformComponent a => Uniform (FogCoord1 a)
instance UniformComponent a => Uniform (Color3 a)
instance UniformComponent a => Uniform (Color4 a)
instance UniformComponent a => Uniform (Index1 a)
似乎没有涉及这个简单的案例。
我该怎么办?