Class GLShader
- Namespace
- Gsk
- Assembly
- Gsk-4.0.dll
public class GLShader : Object, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
GLShader
- Implements
-
- Inherited Members
-
Constructors
GLShader(params ConstructArgument[])
public GLShader(params ConstructArgument[] constructArguments)
Parameters
constructArguments ConstructArgument[]
GLShader(GLShaderHandle)
public GLShader(GLShaderHandle handle)
Parameters
handle GLShaderHandle
Fields
ResourcePropertyDefinition
public static readonly Property<string?, GLShader> ResourcePropertyDefinition
Field Value
- Property<string, GLShader>
SourcePropertyDefinition
public static readonly Property<Bytes, GLShader> SourcePropertyDefinition
Field Value
- Property<Bytes, GLShader>
Properties
Resource
public string? Resource { get; }
Property Value
- string
Source
public Bytes Source { get; }
Property Value
- Bytes
Methods
Compile(Renderer)
public bool Compile(Renderer renderer)
Parameters
renderer Renderer
Returns
- bool
public int FindUniformByName(string name)
Parameters
name string
Returns
- int
public Bytes FormatArgsVa(nint uniforms)
Parameters
uniforms nint
Returns
- Bytes
GetArgBool(Bytes, int)
public bool GetArgBool(Bytes args, int idx)
Parameters
args Bytes
idx int
Returns
- bool
GetArgFloat(Bytes, int)
public float GetArgFloat(Bytes args, int idx)
Parameters
args Bytes
idx int
Returns
- float
GetArgInt(Bytes, int)
public int GetArgInt(Bytes args, int idx)
Parameters
args Bytes
idx int
Returns
- int
GetArgUint(Bytes, int)
public uint GetArgUint(Bytes args, int idx)
Parameters
args Bytes
idx int
Returns
- uint
GetArgVec2(Bytes, int, Vec2)
public void GetArgVec2(Bytes args, int idx, Vec2 outValue)
Parameters
args Bytes
idx int
outValue Vec2
GetArgVec3(Bytes, int, Vec3)
public void GetArgVec3(Bytes args, int idx, Vec3 outValue)
Parameters
args Bytes
idx int
outValue Vec3
GetArgVec4(Bytes, int, Vec4)
public void GetArgVec4(Bytes args, int idx, Vec4 outValue)
Parameters
args Bytes
idx int
outValue Vec4
GetArgsSize()
public nuint GetArgsSize()
Returns
- nuint
GetGType()
public static Type GetGType()
Returns
- Type
GetNTextures()
public int GetNTextures()
Returns
- int
public int GetNUniforms()
Returns
- int
GetResource()
public string? GetResource()
Returns
- string
GetSource()
Returns
- Bytes
public string GetUniformName(int idx)
Parameters
idx int
Returns
- string
public int GetUniformOffset(int idx)
Parameters
idx int
Returns
- int
public GLUniformType GetUniformType(int idx)
Parameters
idx int
Returns
- GLUniformType
NewFromBytes(Bytes)
public static GLShader NewFromBytes(Bytes sourcecode)
Parameters
sourcecode Bytes
Returns
- GLShader
NewFromResource(string)
public static GLShader NewFromResource(string resourcePath)
Parameters
resourcePath string
Returns
- GLShader