Exemplo n.º 1
0
 public bool Compile()
 {
     GlHelper.ThrowNullException(Id);
     Gl.CompileShader(Id);
     GlHelper.GetError();
     return(Status);
 }
Exemplo n.º 2
0
 public bool Link()
 {
     GlHelper.ThrowNullException(Id);
     Gl.LinkProgram(Id);
     GlHelper.GetError();
     return(Status);
 }
Exemplo n.º 3
0
 public override bool Equals(object obj)
 {
     GlHelper.ThrowNullException(Id);
     if (obj is Shader)
     {
         return(Equals((Shader)obj));
     }
     return(false);
 }
Exemplo n.º 4
0
 public override bool Equals(object obj)
 {
     GlHelper.ThrowNullException(Id);
     if (obj is VertexArray)
     {
         return(Equals((VertexArray)obj));
     }
     return(false);
 }
Exemplo n.º 5
0
 public override bool Equals(object obj)
 {
     GlHelper.ThrowNullException(Target);
     if (obj is TextureBinding)
     {
         return(Equals((TextureBinding)obj));
     }
     return(false);
 }
Exemplo n.º 6
0
 public override bool Equals(object obj)
 {
     GlHelper.ThrowNullException(Handle);
     if (obj is Sync)
     {
         return(Equals((Sync)obj));
     }
     return(false);
 }
Exemplo n.º 7
0
 public void Delete()
 {
     GlHelper.ThrowNullException(Id);
     unsafe
     {
         uint id = Id;
         Gl.DeleteBuffers(1, &id);
     }
 }
Exemplo n.º 8
0
 public void Delete()
 {
     GlHelper.ThrowNullException(Id);
     unsafe
     {
         uint id = Id;
         Gl.DeleteVertexArrays(1, &id);
     }
 }
Exemplo n.º 9
0
 public void Delete()
 {
     unsafe
     {
         GlHelper.ThrowNullException(Handle);
         Gl.DeleteSync(Handle.ToPointer());
         Handle = IntPtr.Zero;
         GlHelper.GetError();
     }
 }
Exemplo n.º 10
0
        public int GetUniformLocation(string name)
        {
            GlHelper.ThrowNullException(Id);
            unsafe
            {
                int   bytes = Encoding.ASCII.GetByteCount(name);
                byte *str   = stackalloc byte[bytes + 1];
                str[bytes] = 0; //null terminated string

                fixed(char *name_ptr = name)
                {
                    Encoding.ASCII.GetBytes(name_ptr, name.Length, str, bytes);
                }

                var location = Gl.GetUniformLocation(Id, str);
                GlHelper.GetError();
                return(location);
            }
        }
Exemplo n.º 11
0
 public override string ToString()
 {
     GlHelper.ThrowNullException(Target);
     return(string.Format("TextureBinding: {0}", Target.ToString()));
 }
Exemplo n.º 12
0
 public override int GetHashCode()
 {
     GlHelper.ThrowNullException(Id);
     return(Id.GetHashCode());
 }
Exemplo n.º 13
0
 public void Delete()
 {
     GlHelper.ThrowNullException(Id);
     Gl.DeleteShader(Id);
 }
Exemplo n.º 14
0
 public bool Equals(TextureBinding other)
 {
     GlHelper.ThrowNullException(Target);
     return(Target == other.Target);
 }
Exemplo n.º 15
0
 public void DetachShader(Shader shader)
 {
     GlHelper.ThrowNullException(Id);
     Gl.DetachShader(Id, shader.Id);
     GlHelper.GetError();
 }
Exemplo n.º 16
0
 public bool Equals(Program other)
 {
     GlHelper.ThrowNullException(Id);
     return(Id == other.Id);
 }
Exemplo n.º 17
0
 public void Delete()
 {
     GlHelper.ThrowNullException(Id);
     Gl.DeleteProgram(Id);
 }
Exemplo n.º 18
0
 public void Bind(Texture texture)
 {
     GlHelper.ThrowNullException(Target);
     Gl.BindTexture(Target, texture.Id);
     GlHelper.GetError();
 }
Exemplo n.º 19
0
 public bool Equals(Shader other)
 {
     GlHelper.ThrowNullException(Id);
     return(Id == other.Id);
 }
Exemplo n.º 20
0
 public override string ToString()
 {
     GlHelper.ThrowNullException(Handle);
     return(string.Format("Sync: {0}", Handle.ToString()));
 }
Exemplo n.º 21
0
 public bool Equals(Sync other)
 {
     GlHelper.ThrowNullException(Handle);
     return(Handle == other.Handle);
 }
Exemplo n.º 22
0
 public bool Equals(VertexArray other)
 {
     GlHelper.ThrowNullException(Id);
     return(Id == other.Id);
 }
Exemplo n.º 23
0
 public override string ToString()
 {
     GlHelper.ThrowNullException(Id);
     return(string.Format("Shader: {0}", Id.ToString()));
 }
Exemplo n.º 24
0
 public void Counter()
 {
     GlHelper.ThrowNullException(Id);
     Gl.QueryCounter(Id, Gl.TIMESTAMP);
     GlHelper.GetError();
 }