daily update on 2024.03.18 by itload youmu
This commit is contained in:
@@ -1,4 +1,34 @@
|
||||
using StgSharp.Math;
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="IglFunc.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
@@ -8,6 +38,12 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
public interface IglFunc
|
||||
{
|
||||
|
||||
internal unsafe GLcontext* Context
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api glActiveTexture
|
||||
/// </summary>
|
||||
@@ -86,18 +122,14 @@ namespace StgSharp.Graphics
|
||||
|
||||
void ClearGraphicError();
|
||||
|
||||
void CompileShader(glHandle shaderhandle);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glCreateProgram
|
||||
/// </summary>
|
||||
/// <returns>A handle representing a single shader program</returns>
|
||||
glHandle CreateProgram();
|
||||
|
||||
glHandleSet CreateShaderSet(int count, ShaderType type);
|
||||
|
||||
void LoadShaderSource(glHandle shaderHandle, string codeStream);
|
||||
|
||||
void CompileShader(glHandle shaderhandle);
|
||||
|
||||
/// <summary>
|
||||
/// Same function as OpenGL api, glCreateProgram.
|
||||
/// Used for creating multiple shader program.
|
||||
@@ -105,6 +137,8 @@ namespace StgSharp.Graphics
|
||||
/// <returns>A handle representing all shader programs</returns>
|
||||
glHandleSet CreateProgram(int count);
|
||||
|
||||
glHandleSet CreateShaderSet(int count, ShaderType type);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a form and its associated
|
||||
/// </summary>
|
||||
@@ -174,6 +208,8 @@ namespace StgSharp.Graphics
|
||||
|
||||
bool GetWindowShouldClose(Form form);
|
||||
|
||||
void LoadShaderSource(glHandle shaderHandle, string codeStream);
|
||||
|
||||
/// <summary>
|
||||
/// Make the OpenGL context of a certain <see cref="Form"/> as the activated OpenGL context.
|
||||
/// </summary>
|
||||
@@ -184,17 +220,6 @@ namespace StgSharp.Graphics
|
||||
|
||||
void SetBufferData<T>(BufferType bufferType, T[] bufferArray, BufferUsage usage) where T : struct, IConvertible;
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U,V,W}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U,V,W}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
/// <param name="v2">The third value to be set</param>
|
||||
/// <param name="v3">The forth value to be set</param>
|
||||
void SetValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U,V,W}"/>,
|
||||
/// all types of parameters are float.
|
||||
@@ -203,25 +228,6 @@ namespace StgSharp.Graphics
|
||||
/// <param name="vec">A <see cref="Vec4d"/> packing four parameters of the uniform </param>
|
||||
void SetValue(Uniform<float, float, float, float> uniform, Vec4d vec);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U,V}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U,V}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
/// <param name="v2">The third value to be set</param>
|
||||
void SetValue(Uniform<float, float, float> uniform, float v0, float v1, float v2);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
void SetValue(Uniform<float, float> uniform, float v0, float v1);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T}"/>,
|
||||
/// all types of parameters are float.
|
||||
@@ -246,6 +252,36 @@ namespace StgSharp.Graphics
|
||||
/// <param name="vec">A <see cref="Vec4d"/> value of the uniform </param>
|
||||
void SetValue(Uniform<Vec4d> uniform, Vec4d vec);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
void SetValue(Uniform<float, float> uniform, float v0, float v1);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U,V}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U,V}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
/// <param name="v2">The third value to be set</param>
|
||||
void SetValue(Uniform<float, float, float> uniform, float v0, float v1, float v2);
|
||||
|
||||
/// <summary>
|
||||
/// Set data value to a float <see cref="Uniform{T,U,V,W}"/>,
|
||||
/// all types of parameters are float.
|
||||
/// </summary>
|
||||
/// <param name="uniform">The <see cref="Uniform{T,U,V,W}"/> target</param>
|
||||
/// <param name="v0">The first value to be set</param>
|
||||
/// <param name="v1">The second value to be set</param>
|
||||
/// <param name="v2">The third value to be set</param>
|
||||
/// <param name="v3">The forth value to be set</param>
|
||||
void SetValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3);
|
||||
|
||||
/// <summary>
|
||||
/// Set how a shader parameter read data from a VBO.
|
||||
/// </summary>
|
||||
@@ -293,13 +329,9 @@ namespace StgSharp.Graphics
|
||||
/// <param name="height"></param>
|
||||
void Viewport(int x, int y, uint width, uint height);
|
||||
|
||||
internal void frameworkHandleEnqueue(IntPtr handle, params M128[] param);
|
||||
|
||||
internal void SwitchContext();
|
||||
|
||||
internal unsafe GLcontext* Context
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
internal void frameworkHandleEnqueue(IntPtr handle, params M128[] param);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user