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
Modifier and TypeFieldDescriptionfinal ByteBuffer[]
int
final net.minecraft.resources.ResourceLocation
int
int
Fields inherited from class net.minecraft.client.renderer.texture.SimpleTexture
location
Fields inherited from class net.minecraft.client.renderer.texture.AbstractTexture
blur, id, mipmap, NOT_ASSIGNED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
begin
(net.minecraft.resources.ResourceLocation resLoc) runs the OpenGL that enables the cubemap.static void
debugResourceStuff
(net.minecraft.resources.ResourceLocation resLoc) void
end()
Performs the necessary steps to ensure that the next thing rendered does not also have aCubeMap
applied to it, assuming it isn't supposed to.protected void
initBuffers
(BufferedImage fullImg, String fileLoc) protected void
void
start()
toString()
Methods inherited from class net.minecraft.client.renderer.texture.SimpleTexture
getTextureImage, load
Methods 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
- AResourceLocation
denoting 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 aCubeMap
applied to it, assuming it isn't supposed to. -
debugResourceStuff
public static void debugResourceStuff(net.minecraft.resources.ResourceLocation resLoc) -
toString
-