我有一个制服,其格式如下:
uniform float abc;
而我在Haskell代码中得到它的方式如下:
abc <- GL.get (GL.uniformLocation program "abc")
我该如何将 GLfloat
值传递给它?
从这里可以看到,我应该使用 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)
似乎没有涵盖这个简单的情况。
我该怎么办?