Class GLShader
- Namespace
- Gsk
- Assembly
- Gsk-4.0.dll
public class GLShader : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
GLShader
- Implements
- Inherited Members
Constructors
GLShader(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public GLShader(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
GLShader(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected GLShader(CreationData data)
Parameters
dataCreationData
GLShader(GLShaderHandle)
protected GLShader(GLShaderHandle handle)
Parameters
handleGLShaderHandle
Fields
ResourcePropertyDefinition
public static readonly Property<string?, GLShader> ResourcePropertyDefinition
Field Value
SourcePropertyDefinition
public static readonly Property<Bytes, GLShader> SourcePropertyDefinition
Field Value
Properties
Resource
public string? Resource { get; }
Property Value
Source
public Bytes Source { get; }
Property Value
Methods
Compile(Renderer)
public bool Compile(Renderer renderer)
Parameters
rendererRenderer
Returns
FindUniformByName(string)
public int FindUniformByName(string name)
Parameters
namestring
Returns
FormatArgsVa(nint)
public Bytes FormatArgsVa(nint uniforms)
Parameters
uniformsnint
Returns
GetArgBool(Bytes, int)
public bool GetArgBool(Bytes args, int idx)
Parameters
Returns
GetArgFloat(Bytes, int)
public float GetArgFloat(Bytes args, int idx)
Parameters
Returns
GetArgInt(Bytes, int)
public int GetArgInt(Bytes args, int idx)
Parameters
Returns
GetArgUint(Bytes, int)
public uint GetArgUint(Bytes args, int idx)
Parameters
Returns
GetArgVec2(Bytes, int, Vec2)
public void GetArgVec2(Bytes args, int idx, Vec2 outValue)
Parameters
GetArgVec3(Bytes, int, Vec3)
public void GetArgVec3(Bytes args, int idx, Vec3 outValue)
Parameters
GetArgVec4(Bytes, int, Vec4)
public void GetArgVec4(Bytes args, int idx, Vec4 outValue)
Parameters
GetArgsSize()
public nuint GetArgsSize()
Returns
GetGType()
public static Type GetGType()
Returns
GetNTextures()
public int GetNTextures()
Returns
GetNUniforms()
public int GetNUniforms()
Returns
GetResource()
public string? GetResource()
Returns
GetSource()
public Bytes GetSource()
Returns
GetUniformName(int)
public string GetUniformName(int idx)
Parameters
idxint
Returns
GetUniformOffset(int)
public int GetUniformOffset(int idx)
Parameters
idxint
Returns
GetUniformType(int)
public GLUniformType GetUniformType(int idx)
Parameters
idxint
Returns
NewFromBytes(Bytes)
public static GLShader NewFromBytes(Bytes sourcecode)
Parameters
sourcecodeBytes
Returns
NewFromPointer(nint, bool)
Creates a new managed GLShader instance for a given pointer.
public static GLShader NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewFromResource(string)
public static GLShader NewFromResource(string resourcePath)
Parameters
resourcePathstring
Returns
NewWithProperties(ConstructArgument[])
Creates a new GLShader and sets the properties specified by the construct arguments.
public static GLShader NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.