daily update on 20240203 by nitloadd youmu. New glhandle setup.
This commit is contained in:
@@ -36,11 +36,14 @@ namespace StgSharp.Graphics
|
||||
void AlignFrame(Form form);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucntion as OpenGL api glAttachShader
|
||||
/// Same fucntion as OpenGL api glAttachShader.
|
||||
/// Only the first <see href="shader"/> in handle
|
||||
/// will be attached to the first <see href="program"/> in handle.
|
||||
/// The rest shader and program will be ignored.
|
||||
/// </summary>
|
||||
/// <param name="program">Shader program to be attachec</param>
|
||||
/// <param name="shader">A shader part to attach</param>
|
||||
void AttachShader(uint program, uint shader);
|
||||
void AttachShader(glHandle program, glHandle shader);
|
||||
|
||||
/// <summary>
|
||||
/// Bind the indexed buffer object to certain type of buffer
|
||||
@@ -87,19 +90,25 @@ namespace StgSharp.Graphics
|
||||
/// <param name="shaderCode">A string represent the shader's code</param>
|
||||
/// <param name="shaderType">An <see cref="ShaderType"/> enum represent the type of the shader to
|
||||
/// conpile, including vertex shader and fragment shader.</param>
|
||||
/// <returns>An uint value as the only mark of conpiled shader</returns>
|
||||
uint CompileShader(string shaderCode, ShaderType shaderType);
|
||||
/// <returns>An handle of conpiled shader</returns>
|
||||
glHandle CompileShader(string shaderCode, ShaderType shaderType);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glCreateProgram
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
uint CreateProgram();
|
||||
/// <returns>A handle representing a single shader program</returns>
|
||||
glHandle CreateProgram();
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glCreateProgram.
|
||||
/// Used for creating multiple shader program.
|
||||
/// </summary>
|
||||
/// <returns>A handle representing all shader programs</returns>
|
||||
glHandle CreateProgram(int count);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a form and its associated
|
||||
/// </summary>
|
||||
/// <param name="handle">The instance of created form</param>
|
||||
/// <param name="width">Required width</param>
|
||||
/// <param name="height">Required width</param>
|
||||
/// <param name="tittle">Tittle of the window </param>
|
||||
@@ -108,7 +117,7 @@ namespace StgSharp.Graphics
|
||||
/// <exception cref="Exception"></exception>
|
||||
IntPtr CreateWindowHandle(int width, int height, string tittle, IntPtr monitor, Form share);
|
||||
|
||||
uint CreatGraphicProgram();
|
||||
glHandle CreatGraphicProgram();
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call
|
||||
@@ -119,17 +128,22 @@ namespace StgSharp.Graphics
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call.
|
||||
/// </summary>
|
||||
/// <param name="count">Amount of bufferd to be deleted</param>
|
||||
/// <param name="handle">Array of buffers to be deleted</param>
|
||||
unsafe void DeleteBuffers(uint count, uint[] handle);
|
||||
unsafe void DeleteBuffers(glHandle handle);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glDeleteVertexArrays
|
||||
/// </summary>
|
||||
/// <param name="count">Amount of vao to be deleted</param>
|
||||
/// <param name="arrays">A array representing a colletion of vertex objects.</param>
|
||||
unsafe void DeleteVertexArrays(uint count, uint[] arrays);
|
||||
/// <param name="handle">Handle of vertex objects.</param>
|
||||
unsafe void DeleteVertexArrays(glHandle handle);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="mode"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="ptr"></param>
|
||||
void DrawElements(GepmetryType mode, uint count, Type type, IntPtr ptr);
|
||||
|
||||
/// <summary>
|
||||
@@ -137,21 +151,21 @@ namespace StgSharp.Graphics
|
||||
/// </summary>
|
||||
/// <param name="count"></param>
|
||||
/// <param name="ptr"></param>
|
||||
unsafe void GenBuffers(uint count, uint* ptr);
|
||||
unsafe void GenBuffers(uint count, glHandle ptr);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucnction as OpenGL api glGenTextures.
|
||||
/// </summary>
|
||||
/// <param name="count">amount of textures to generate</param>
|
||||
/// <param name="ptr">pointer to texture signs' array</param>
|
||||
unsafe void GenTextures(uint count, uint* ptr);
|
||||
/// <param name="handle">Handle of texture</param>
|
||||
unsafe void GenTextures(uint count, glHandle handle);
|
||||
|
||||
/// <summary>
|
||||
/// Same fucntion as OpenGL api, glGenVertexArray
|
||||
/// </summary>
|
||||
/// <param name="count">Amount of vao to be generated</param>
|
||||
/// <param name="ptr">Pointer of vao sign array</param>
|
||||
unsafe void GenVertexArrays(uint count, uint* ptr);
|
||||
/// <param name="handle">Handle of vao sign array</param>
|
||||
unsafe void GenVertexArrays(uint count, glHandle handle);
|
||||
|
||||
void GetGraphicError();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user