Class MinecraftGlStateCache
java.lang.Object
lol.trq.helios.minecraft.MinecraftGlStateCache
- All Implemented Interfaces:
GlStateCache
Routes cached state changes through Minecraft 1.8.9's
GlStateManager, so its cache, and OptiFine's
additions to it, stay true.
Methods are found by their SRG names (what Forge uses at run time) and, failing that, by their MCP names (a deobfuscated development workspace).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactiveTexture(int unit) Selects the active texture unit.voidbindTexture(int texture) Binds a 2D texture on the active unit.voidblend(boolean on) Enables or disables blending.voidblendFunc(int srcRgb, int dstRgb, int srcAlpha, int dstAlpha) Sets the separate blend factors.voidcolorMask(boolean r, boolean g, boolean b, boolean a) Sets which colour channels are written.voidcull(boolean on) Enables or disables face culling.voiddepthMask(boolean write) Sets the depth write mask.voiddepthTest(boolean on) Enables or disables the depth test.
-
Constructor Details
-
MinecraftGlStateCache
ResolvesGlStateManager.- Parameters:
loader- the class loader Minecraft's classes load through- Throws:
IllegalStateException- if the class or one of its methods cannot be found
-
-
Method Details
-
blend
public void blend(boolean on) Description copied from interface:GlStateCacheEnables or disables blending.- Specified by:
blendin interfaceGlStateCache- Parameters:
on- whether blending is on
-
blendFunc
public void blendFunc(int srcRgb, int dstRgb, int srcAlpha, int dstAlpha) Description copied from interface:GlStateCacheSets the separate blend factors.- Specified by:
blendFuncin interfaceGlStateCache- Parameters:
srcRgb- source RGB factordstRgb- destination RGB factorsrcAlpha- source alpha factordstAlpha- destination alpha factor
-
depthTest
public void depthTest(boolean on) Description copied from interface:GlStateCacheEnables or disables the depth test.- Specified by:
depthTestin interfaceGlStateCache- Parameters:
on- whether the depth test is on
-
depthMask
public void depthMask(boolean write) Description copied from interface:GlStateCacheSets the depth write mask.- Specified by:
depthMaskin interfaceGlStateCache- Parameters:
write- whether depth writes are on
-
cull
public void cull(boolean on) Description copied from interface:GlStateCacheEnables or disables face culling.- Specified by:
cullin interfaceGlStateCache- Parameters:
on- whether culling is on
-
activeTexture
public void activeTexture(int unit) Description copied from interface:GlStateCacheSelects the active texture unit.- Specified by:
activeTexturein interfaceGlStateCache- Parameters:
unit-GL_TEXTURE0plus the unit number
-
bindTexture
public void bindTexture(int texture) Description copied from interface:GlStateCacheBinds a 2D texture on the active unit.- Specified by:
bindTexturein interfaceGlStateCache- Parameters:
texture- the texture
-
colorMask
public void colorMask(boolean r, boolean g, boolean b, boolean a) Description copied from interface:GlStateCacheSets which colour channels are written.- Specified by:
colorMaskin interfaceGlStateCache- Parameters:
r- redg- greenb- bluea- alpha
-