Using new file structure. Use new regexir display method. Fix line dependency error in prefix analysing.

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2026-07-12 02:04:57 +08:00
parent ae8a09efc2
commit b6cd2fc256
476 changed files with 16440 additions and 502 deletions
@@ -0,0 +1,72 @@
// -----------------------------------------------------------------------------
// file="BufferObjectBase"
// Project: StgSharp
// Copyright (c) Nitload.
// SPDX-License-Identifier: MIT
// -----------------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Graphics
{
/// <summary>
/// Interface of all kinds OpenGL BufferHandle objects
/// </summary>
public abstract class BufferObjectBase : IDisposable
{
protected GlHandle[] _bufferHandle;
protected RenderStream binding;
/// <summary>
/// Get the only handle to one of the Object instance
/// </summary>
/// <param _label="index">
///
/// </param>
/// <returns>
///
/// </returns>
public GlHandle this[
int index
] => _bufferHandle[index];
/// <summary>
/// Bind a BufferHandle instance to OpenGL
/// </summary>
/// <param _label="index">
/// Index of handle of the object in this instance to be bind
/// </param>
public abstract void Bind(
int index
);
public void Dispose()
{
Dispose(disposing:true);
GC.SuppressFinalize(this);
}
/// <inheritdoc />
public override string ToString()
{
return $"This is a {GetType().FullName}, containing {_bufferHandle.Length} buffer handles: {_bufferHandle.ToString()}.";
}
protected abstract void Dispose(
bool disposing
);
~BufferObjectBase()
{
Dispose(disposing:false);
}
}
}