コード例 #1
0
        public void SetUniform(UniformName uniform, Vector2f[] value)
        {
            float[] conv = new float[value.Length * 2];
            int     cv   = 0;

            for (int i = 0; i < conv.Length; i += 2)
            {
                conv[i]     = value[cv].X;
                conv[i + 1] = value[cv].Y;
                cv++;
            }
            RenderDevice_SetUniform(Handle, uniform, conv, value.Length, sizeof(float) * conv.Length);
        }
コード例 #2
0
 static extern void RenderDevice_SetUniform(IntPtr handle, UniformName name, ref Matrix data, int count, int bytesize);
コード例 #3
0
 static extern void RenderDevice_DeclareUniform(IntPtr handle, UniformName name, string variablename, UniformType type);
コード例 #4
0
 public void SetUniform(UniformName uniform, Vector4i value)
 {
     RenderDevice_SetUniform(Handle, uniform, new int[] { value.X, value.Y, value.Z, value.W }, 1, sizeof(int) * 4);
 }
コード例 #5
0
 public void SetUniform(UniformName uniform, ref Matrix matrix)
 {
     RenderDevice_SetUniform(Handle, uniform, ref matrix, 1, sizeof(float) * 16);
 }
コード例 #6
0
 public void SetUniform(UniformName uniform, int value)
 {
     RenderDevice_SetUniform(Handle, uniform, new int[] { value }, 1, sizeof(int));
 }
コード例 #7
0
 public void SetUniform(UniformName uniform, Color4 value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value.Red, value.Green, value.Blue, value.Alpha }, 1, sizeof(float) * 4);
 }
コード例 #8
0
 public void SetUniform(UniformName uniform, Vector3f value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value.X, value.Y, value.Z }, 1, sizeof(float) * 3);
 }
コード例 #9
0
 public void SetUniform(UniformName uniform, float value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value }, 1, sizeof(float));
 }
コード例 #10
0
 public void SetUniform(UniformName uniform, bool value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value ? 1.0f : 0.0f }, 1, sizeof(float));
 }
コード例 #11
0
 public void DeclareUniform(UniformName name, string variablename, UniformType type)
 {
     RenderDevice_DeclareUniform(Handle, name, variablename, type);
 }