示例#1
0
 internal ShaderParameter(string name)
 {
     this.Uniform = GraphicsContext.CreateUniform(name, UniformType.Vec4, 4);
 }
示例#2
0
 /// <summary>
 /// Gets the available space in the global transient index buffer.
 /// </summary>
 /// <param name="count">The number of 16-bit indices required.</param>
 /// <returns>The number of available indices.</returns>
 public static int GetAvailableSpace(int count)
 {
     return(GraphicsContext.GetAvailableTransientIndexBuffers(count));
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransientIndexBuffer"/> struct.
 /// </summary>
 /// <param name="indexCount">The number of 16-bit indices that fit in the buffer.</param>
 private TransientIndexBuffer(int indexCount)
 {
     GraphicsContext.AllocTransientIndexBuffer(out this, indexCount);
 }
示例#4
0
 private RenderTarget(Texture2D texture, TextureFormat format, TextureFlags flags)
 {
     handle = GraphicsContext.CreateFrameBuffer(texture, format, flags);
     internal_texture = texture;
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderTarget"/> struct.
 /// </summary>
 /// <param name="width">The width of the render target.</param>
 /// <param name="height">The height of the render target.</param>
 /// <param name="format">The format of the new surface.</param>
 /// <param name="flags">Texture sampling flags.</param>
 private RenderTarget(int width, int height, TextureFormat format, TextureFlags flags)
 {
     handle = GraphicsContext.CreateFrameBuffer(width, height, format, flags);
     internal_texture = new Texture2D(GraphicsContext.GetFrameBufferTexture(handle, 0), width, height, false, false);
 }
示例#6
0
 public void Update(int startVertex, VertexPositionColorTexture[] vertices)
 {
     GraphicsContext.UpdateDynamicVertexBuffer(this.Handle, startVertex, vertices);
 }