Bind() public method

public Bind ( ) : void
return void
Beispiel #1
0
 public void LoadTexture(Texture Texture)
 {
     Texture.Bind();
     GL.Uniform1(location, 0);
 }
Beispiel #2
0
 public void LoadTexture(Texture Texture)
 {
     Texture.Bind();
     GL.Uniform1(location, 0);
 }
Beispiel #3
0
 public void CopyFrom(Texture source)
 {
     source.Bind();
     GL.BindBuffer(BufferTarget.PixelUnpackBuffer, pixelBuffer);
     GL.BufferData(BufferTarget.PixelUnpackBuffer, new IntPtr((int)source.Width * (int)source.Height * 4), IntPtr.Zero, BufferUsageHint.StaticDraw);
     var pointer = GL.MapBuffer(BufferTarget.PixelUnpackBuffer, BufferAccess.WriteOnly);
     GL.GetTexImage(TextureTarget.Texture2D, 0, PixelFormat.Rgba, PixelType.Byte, pointer);
     GL.UnmapBuffer(BufferTarget.PixelUnpackBuffer);
     Bind();
     Width = source.Width;
     Height = source.Height;
     GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, (int)source.Width, (int)source.Height, PixelFormat.Rgba, PixelType.Byte, IntPtr.Zero);
     GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
 }