Record Class ShaderCompiler.CompileResult
java.lang.Object
java.lang.Record
dev.engine.graphics.shader.ShaderCompiler.CompileResult
- All Implemented Interfaces:
AutoCloseable
- Enclosing interface:
ShaderCompiler
public static record ShaderCompiler.CompileResult(String[] code, byte[][] codeBytes, int entryPointCount, Map<String, ShaderCompiler.ParameterInfo> parameters)
extends Record
implements AutoCloseable
Compiled shader result with code per entry point and optional binding metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionCompileResult(String[] code, byte[][] codeBytes, int entryPointCount) Convenience constructor without parameter info.CompileResult(String[] code, byte[][] codeBytes, int entryPointCount, Map<String, ShaderCompiler.ParameterInfo> parameters) Creates an instance of aCompileResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()String[]code()Returns the value of thecoderecord component.code(int index) byte[][]Returns the value of thecodeBytesrecord component.byte[]codeBytes(int index) intReturns the value of theentryPointCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theparametersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompileResult
Convenience constructor without parameter info. -
CompileResult
public CompileResult(String[] code, byte[][] codeBytes, int entryPointCount, Map<String, ShaderCompiler.ParameterInfo> parameters) Creates an instance of aCompileResultrecord class.- Parameters:
code- the value for thecoderecord componentcodeBytes- the value for thecodeBytesrecord componententryPointCount- the value for theentryPointCountrecord componentparameters- the value for theparametersrecord component
-
-
Method Details
-
code
-
codeBytes
public byte[] codeBytes(int index) -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
codeBytes
public byte[][] codeBytes()Returns the value of thecodeBytesrecord component.- Returns:
- the value of the
codeBytesrecord component
-
entryPointCount
public int entryPointCount()Returns the value of theentryPointCountrecord component.- Returns:
- the value of the
entryPointCountrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-