Пример #1
0
 /// <summary>
 /// Sets a texture to use for drawing primitives.
 /// </summary>
 /// <param name="textureUnit">The texture unit to set.</param>
 /// <param name="sampler">The sampler uniform.</param>
 /// <param name="texture">The texture to set.</param>
 /// <param name="flags">Sampling flags that override the default flags in the texture itself.</param>
 public static void SetTexture(byte textureUnit, Uniform sampler, Texture texture, TextureFlags flags)
 {
     NativeMethods.bgfx_set_texture(textureUnit, sampler.handle, texture.handle, (uint)flags);
 }
Пример #2
0
 /// <summary>
 /// Sets a texture mip as a compute image.
 /// </summary>
 /// <param name="stage">The buffer stage to set.</param>
 /// <param name="sampler">The sampler uniform.</param>
 /// <param name="texture">The texture to set.</param>
 /// <param name="mip">The index of the mip level within the texture to set.</param>
 /// <param name="format">The format of the buffer data.</param>
 /// <param name="access">Access control flags.</param>
 public static void SetComputeImage(byte stage, Uniform sampler, Texture texture, byte mip, ComputeBufferAccess access, TextureFormat format = TextureFormat.Unknown)
 {
     NativeMethods.bgfx_set_image(stage, sampler.handle, texture.handle, mip, format, access);
 }
Пример #3
0
 /// <summary>
 /// Sets a texture to use for drawing primitives.
 /// </summary>
 /// <param name="textureUnit">The texture unit to set.</param>
 /// <param name="sampler">The sampler uniform.</param>
 /// <param name="texture">The texture to set.</param>
 public static void SetTexture(byte textureUnit, Uniform sampler, Texture texture)
 {
     NativeMethods.bgfx_set_texture(textureUnit, sampler.handle, texture.handle, uint.MaxValue);
 }