Class ShaderInstance

  • All Implemented Interfaces:
    java.lang.AutoCloseable, IShaderManager

    public class ShaderInstance
    extends java.lang.Object
    implements IShaderManager, java.lang.AutoCloseable
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • DUMMY_UNIFORM

        private static final ShaderDefault DUMMY_UNIFORM
      • lastProgramId

        private static int lastProgramId
      • samplerMap

        private final java.util.Map<java.lang.String,​java.util.function.IntSupplier> samplerMap
      • samplerNames

        private final java.util.List<java.lang.String> samplerNames
      • samplerLocations

        private final java.util.List<java.lang.Integer> samplerLocations
      • uniformLocations

        private final java.util.List<java.lang.Integer> uniformLocations
      • uniformMap

        private final java.util.Map<java.lang.String,​ShaderUniform> uniformMap
      • programId

        private final int programId
      • name

        private final java.lang.String name
      • dirty

        private boolean dirty
      • attributes

        private final java.util.List<java.lang.Integer> attributes
      • attributeNames

        private final java.util.List<java.lang.String> attributeNames
      • fragmentProgram

        private final ShaderLoader fragmentProgram
    • Constructor Detail

      • ShaderInstance

        public ShaderInstance​(IResourceManager p_i50988_1_,
                              java.lang.String p_i50988_2_)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • parseBlendNode

        public static JSONBlendingMode parseBlendNode​(com.google.gson.JsonObject p_216543_0_)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • clear

        public void clear()
      • apply

        public void apply()
      • getUniform

        @Nullable
        public ShaderUniform getUniform​(java.lang.String p_216539_1_)
      • safeGetUniform

        public ShaderDefault safeGetUniform​(java.lang.String p_216538_1_)
      • updateLocations

        private void updateLocations()
      • parseSamplerNode

        private void parseSamplerNode​(com.google.gson.JsonElement p_216541_1_)
      • setSampler

        public void setSampler​(java.lang.String p_216537_1_,
                               java.util.function.IntSupplier p_216537_2_)
      • parseUniformNode

        private void parseUniformNode​(com.google.gson.JsonElement p_216540_1_)
                               throws JSONException
        Throws:
        JSONException