Class IrisBufferHelper
Когда НЕ использовать: При level render (RenderLevelStageEvent, block entities) с
включёнными шейдерами (ShaderCompatibilityDetector.isExternalShaderActive()).
В этом случае вызывайте buffer.begin(mode, DefaultVertexFormat.BLOCK) напрямую -
MixinBufferBuilder расширит формат до TERRAIN, и putBulkData будет дополняться extended data.
IrisBufferHelper отключает расширение и приведёт к stride mismatch.
Когда использовать: GUI, overlay, не-level рендер - когда нужен именно BLOCK без расширения. Iris предоставляет iris$beginWithoutExtending() - отключает расширение формата. Вызываем через reflection, т.к. Oculus - опциональная зависимость.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbegin(com.mojang.blaze3d.vertex.BufferBuilder buffer, com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) Универсальный begin с отключением Iris-расширения при необходимости.static voidbeginBlockQuads(com.mojang.blaze3d.vertex.BufferBuilder buffer) Начинает BufferBuilder с DefaultVertexFormat.BLOCK без расширения Iris.static voidbeginWithoutExtending(com.mojang.blaze3d.vertex.BufferBuilder buffer, com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) beginбез расширения Iris — дляPOSITION_TEX_COLORи прочих immediate-draw путей.
-
Constructor Details
-
IrisBufferHelper
public IrisBufferHelper()
-
-
Method Details
-
beginBlockQuads
public static void beginBlockQuads(com.mojang.blaze3d.vertex.BufferBuilder buffer) Начинает BufferBuilder с DefaultVertexFormat.BLOCK без расширения Iris. При активном Iris/Oculus предотвращает переключение на IrisVertexFormats.TERRAIN.Не использовать для level render с шейдерами - там нужен расширенный TERRAIN формат.
-
beginWithoutExtending
public static void beginWithoutExtending(com.mojang.blaze3d.vertex.BufferBuilder buffer, com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) beginбез расширения Iris — дляPOSITION_TEX_COLORи прочих immediate-draw путей. -
begin
public static void begin(com.mojang.blaze3d.vertex.BufferBuilder buffer, com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) Универсальный begin с отключением Iris-расширения при необходимости. Для BLOCK/NEW_ENTITY/POSITION_COLOR_TEX_LIGHTMAP вызывает iris$beginWithoutExtending.Не использовать при рендере block entities во время renderLevel с включёнными шейдерами.
-