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

56 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(int 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(int count)
{
return new VertexArray(count, gl);
}
/// <summary>
/// Create a sets of <see cref="Texture"/>
/// </summary>
/// <param name="count">Amount of textures to be crated.</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected Texture CreateTexture(int count)
{
return new Texture(count, 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(int count)
{
return new VertexBuffer(count, gl);
}
}
}