Class Cubemap
java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
net.minecraft.client.renderer.texture.SimpleTexture
com.pixelmonmod.pixelmon.client.materials.Cubemap
- All Implemented Interfaces:
AutoCloseable
public class Cubemap
extends net.minecraft.client.renderer.texture.SimpleTexture
Cubemaps draw simulated reflections via a texture. The width:height ratio of an
image must be exactly 3:4 to be used as a cubemap. Cubemaps currently override
standard textures completely: if a model that normally has a regular texture
applied to it starts a cubemap, the regular texture will not be used.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.renderer.texture.SimpleTexture
net.minecraft.client.renderer.texture.SimpleTexture.TextureImage -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ByteBuffer[]intfinal net.minecraft.resources.ResourceLocationintintFields inherited from class net.minecraft.client.renderer.texture.SimpleTexture
locationFields inherited from class net.minecraft.client.renderer.texture.AbstractTexture
blur, id, mipmap, NOT_ASSIGNED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbegin(net.minecraft.resources.ResourceLocation resLoc) runs the OpenGL that enables the cubemap.static voiddebugResourceStuff(net.minecraft.resources.ResourceLocation resLoc) voidend()Performs the necessary steps to ensure that the next thing rendered does not also have aCubeMapapplied to it, assuming it isn't supposed to.protected voidinitBuffers(BufferedImage fullImg, String fileLoc) protected voidvoidstart()toString()Methods inherited from class net.minecraft.client.renderer.texture.SimpleTexture
getTextureImage, loadMethods inherited from class net.minecraft.client.renderer.texture.AbstractTexture
bind, close, getId, releaseId, reset, restoreLastBlurMipmap, setBlurMipmap, setFilter
-
Field Details
-
sqr
public int sqr -
width
public int width -
height
public int height -
buffers
-
cubemaps
-
resourceLoc
public final net.minecraft.resources.ResourceLocation resourceLoc
-
-
Constructor Details
-
Cubemap
- Parameters:
resLoc- AResourceLocationdenoting the location of the Image file.- Throws:
IOException- If the file could not be found, or if the width-to-height ratio is not 3:4
-
-
Method Details
-
initBuffers
- Throws:
IOException
-
begin
public static void begin(net.minecraft.resources.ResourceLocation resLoc) runs the OpenGL that enables the cubemap. this will do nothing if "advanced OpenGL" is disabled. This should be run before rendering anything to be cubemapped, then Cubemap.end() should be called to disable the cubemap, otherwise everything on the screen will be cubemapped!- Parameters:
resLoc- - the name of the cubemap, this would be the same name that was used in "preloadCubemap"
-
newBinding
protected void newBinding() -
start
public void start() -
end
public void end()Performs the necessary steps to ensure that the next thing rendered does not also have aCubeMapapplied to it, assuming it isn't supposed to. -
debugResourceStuff
public static void debugResourceStuff(net.minecraft.resources.ResourceLocation resLoc) -
toString
-