Files
stgsharp/源代码/StgSharp/Graphics/GL/GLresourceGenrator.cs
T

60 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Graphics
{
public partial class Form
{
/// <summary>
/// Create a set of <see cref="ElementBuffer"/>.
/// </summary>
/// <param name="count">Amount of EBO to be created.</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected ElementBuffer CreateElementBuffer(uint count)
{
return new ElementBuffer(count, this.gl);
}
/// <summary>
/// Create a set of <see cref="VertexArray"/>.
/// </summary>
/// <param name="count">Amount of VAO to be crated.</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected VertexArray CreateVertexArray(uint count)
{
return new VertexArray(count, gl);
}
/// <summary>
/// Create a sets of <see cref="Texture"/>
/// </summary>
/// <param name="n">Amount of textures to be crated.</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected Texture CreateTexture(uint n)
{
return new Texture(n, this.GL);
}
/// <summary>
/// Create aset of <see cref="VertexBuffer"/>.
/// </summary>
/// <param name="count">Amount of Object to be created.</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected VertexBuffer CreateVertexBuffer(uint count)
{
return new VertexBuffer(count, gl);
}
}
}