Record Class IntermediaryShaderModule
java.lang.Object
java.lang.Record
com.mojang.blaze3d.vulkan.glsl.IntermediaryShaderModule
- All Implemented Interfaces:
AutoCloseable
public record IntermediaryShaderModule(String name, @Nullable ByteBuffer spirv, List<SpvUniformBuffer> uniformBuffers, List<SpvSampler> samplers, List<SpvVariable> outputs, List<SpvVariable> inputs)
extends Record
implements AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<SpvVariable> The field for theinputsrecord component.static final IntermediaryShaderModuleprivate final StringThe field for thenamerecord component.private final List<SpvVariable> The field for theoutputsrecord component.private final List<SpvSampler> The field for thesamplersrecord component.private final @Nullable ByteBufferThe field for thespirvrecord component.private final List<SpvUniformBuffer> The field for theuniformBuffersrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIntermediaryShaderModule(String name, @Nullable ByteBuffer spirv, List<SpvUniformBuffer> uniformBuffers, List<SpvSampler> samplers, List<SpvVariable> outputs, List<SpvVariable> inputs) Creates an instance of aIntermediaryShaderModulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static IntermediaryShaderModulecreateFromSpirv(String filename, ByteBuffer spirv) longcreateVulkanShaderModule(VulkanDevice device) final booleanIndicates whether some other object is "equal to" this one.private static intgetDecorationOffset(long compiler, org.lwjgl.util.spvc.SpvcReflectedResource resource, int decoration, IntBuffer returnBuffer) private @Nullable SpvVariablegetInputVariable(String name) private @Nullable SpvSamplergetSampler(String name) private @Nullable SpvUniformBuffergetUniformBuffer(String name) final inthashCode()Returns a hash code value for this object.inputs()Returns the value of theinputsrecord component.name()Returns the value of thenamerecord component.outputs()Returns the value of theoutputsrecord component.voidrebind(List<String> inputVariables, List<VulkanBindGroupLayout.Entry> entries) samplers()Returns the value of thesamplersrecord component.spirv()Returns the value of thespirvrecord component.private static voidthrowIfError(int result, String message) final StringtoString()Returns a string representation of this record class.Returns the value of theuniformBuffersrecord component.
-
Field Details
-
name
The field for thenamerecord component. -
spirv
The field for thespirvrecord component. -
uniformBuffers
The field for theuniformBuffersrecord component. -
samplers
The field for thesamplersrecord component. -
outputs
The field for theoutputsrecord component. -
inputs
The field for theinputsrecord component. -
INVALID
-
-
Constructor Details
-
IntermediaryShaderModule
public IntermediaryShaderModule(String name, @Nullable ByteBuffer spirv, List<SpvUniformBuffer> uniformBuffers, List<SpvSampler> samplers, List<SpvVariable> outputs, List<SpvVariable> inputs) Creates an instance of aIntermediaryShaderModulerecord class.- Parameters:
name- the value for thenamerecord componentspirv- the value for thespirvrecord componentuniformBuffers- the value for theuniformBuffersrecord componentsamplers- the value for thesamplersrecord componentoutputs- the value for theoutputsrecord componentinputs- the value for theinputsrecord component
-
-
Method Details
-
createFromSpirv
public static IntermediaryShaderModule createFromSpirv(String filename, ByteBuffer spirv) throws ShaderCompileException - Throws:
ShaderCompileException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
rebind
public void rebind(List<String> inputVariables, List<VulkanBindGroupLayout.Entry> entries) throws ShaderCompileException - Throws:
ShaderCompileException
-
createVulkanShaderModule
-
getUniformBuffer
-
getSampler
-
getInputVariable
-
throwIfError
- Throws:
ShaderCompileException
-
getDecorationOffset
private static int getDecorationOffset(long compiler, org.lwjgl.util.spvc.SpvcReflectedResource resource, int decoration, IntBuffer returnBuffer) throws ShaderCompileException - Throws:
ShaderCompileException
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
spirv
Returns the value of thespirvrecord component.- Returns:
- the value of the
spirvrecord component
-
uniformBuffers
Returns the value of theuniformBuffersrecord component.- Returns:
- the value of the
uniformBuffersrecord component
-
samplers
Returns the value of thesamplersrecord component.- Returns:
- the value of the
samplersrecord component
-
outputs
Returns the value of theoutputsrecord component.- Returns:
- the value of the
outputsrecord component
-
inputs
Returns the value of theinputsrecord component.- Returns:
- the value of the
inputsrecord component
-