net.minecraft.client.Minecraft.getGLMaximumTextureSize()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中net.minecraft.client.Minecraft.getGLMaximumTextureSize()方法的一些代码示例,展示了Minecraft.getGLMaximumTextureSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.getGLMaximumTextureSize()方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:getGLMaximumTextureSize

Minecraft.getGLMaximumTextureSize介绍

暂无

代码示例

代码示例来源:origin: DimensionalDevelopment/VanillaFix

public void init() {
  deleteGlTexture();
  int maximumTextureSize = Minecraft.getGLMaximumTextureSize();
  stitcher = new DynamicStitcher(maximumTextureSize, maximumTextureSize, 0, mipmapLevels);
  listAnimatedSprites.clear();
  initMissingImage();
  missingImage.generateMipmaps(mipmapLevels);
  spritesNeedingUpload.add(missingImage);
  stitcher.addSprite(missingImage);
  TextureUtil.allocateTextureImpl(getGlTextureId(), mipmapLevels, stitcher.getImageWidth(), stitcher.getImageHeight());
  LOGGER.info("Created {}x{} '{}' atlas", stitcher.getImageWidth(), stitcher.getImageHeight(), basePath);
  EventUtil.postEventAllowingErrors(new TextureStitchEvent.Pre(this));
  ModelLoader.White.INSTANCE.register(this);
  mapRegisteredSprites.put("builtin/white", ModelLoader.White.INSTANCE); // TODO: why is this necessary
  ModelDynBucket.LoaderDynBucket.INSTANCE.register(this);
  EventUtil.postEventAllowingErrors(new TextureStitchEvent.Post(this));
}

代码示例来源:origin: mezz/JustEnoughItems

@Override
public void loadTextureAtlas(IResourceManager resourceManager) {
  int i = Minecraft.getGLMaximumTextureSize();
  Stitcher stitcher = new Stitcher(i, i, 0, 0);
  this.mapUploadedSprites.clear();

代码示例来源:origin: ForestryMC/ForestryMC

@Override
public void loadTextureAtlas(IResourceManager resourceManager) {
  int i = Minecraft.getGLMaximumTextureSize();
  Stitcher stitcher = new Stitcher(i, i, 0, 0);
  this.mapUploadedSprites.clear();

代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition

@Override
public void loadTextureAtlas(IResourceManager resourceManager) {
  int i = Minecraft.getGLMaximumTextureSize();
  Stitcher stitcher = new Stitcher(i, i, 0, 0);
  this.mapUploadedSprites.clear();

相关文章