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

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

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

Minecraft.getFramebuffer介绍

暂无

代码示例

代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped

@Override
public void postInit(FMLPostInitializationEvent e) {
  super.postInit(e);
  Minecraft.getMinecraft().getFramebuffer().enableStencil();
  for (Module addon : ValkyrienWarfareMod.addons) {
    ModuleProxy proxy = addon.getClientProxy();
    if (proxy != null) {
      proxy.postInit(e);
    }
  }
}

代码示例来源:origin: TeamLapen/Vampirism

private void renderBloodVisionOutlines(float progress, float partialTicks) {
  if (!bloodVisionShaderInit) {
    makeBloodVisionShader();
    bloodVisionShaderInit = true;
  }
  if (!isRenderEntityOutlines()) {
    if (!showedShaderWarning) {
      shaderWarning = true;
    }
    return;
  }
  adjustBloodVisionShaders(progress);
  blurShader.render(partialTicks);
  if (!renderedEntitiesWithBlood.isEmpty() || this.bloodVision1Rendered) {
    bloodVision1Rendered = renderEntityOutlines(renderedEntitiesWithBlood, bloodVisionShader1, bloodVisionFrameBuffer1, partialTicks);
  }
  renderedEntitiesWithBlood.clear();
  if (!renderedEntitiesWithoutBlood.isEmpty() || this.bloodVision2Rendered) {
    bloodVision2Rendered = renderEntityOutlines(renderedEntitiesWithoutBlood, bloodVisionShader2, bloodVisionFrameBuffer2, partialTicks);
  }
  renderedEntitiesWithoutBlood.clear();
  GlStateManager.enableBlend();
  GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE);
  this.bloodVisionFrameBuffer1.framebufferRenderExt(this.mc.displayWidth, this.mc.displayHeight, false);
  //this.mc.getFramebuffer().bindFramebuffer(false);
  this.bloodVisionFrameBuffer2.framebufferRenderExt(this.mc.displayWidth, this.mc.displayHeight, false);
  this.mc.getFramebuffer().bindFramebuffer(false);
  GlStateManager.disableBlend();
}

代码示例来源:origin: TeamLapen/Vampirism

this.blurShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocationBlur);
Framebuffer swap = this.blurShader.getFramebufferRaw("swap");
blit0 = blurShader.addShader("blit", swap, this.mc.getFramebuffer());
blur1 = blurShader.addShader("blur", this.mc.getFramebuffer(), swap);
blur1.getShaderManager().getShaderUniform("BlurDir").set(1F, 0F);
blur2 = blurShader.addShader("blur", swap, this.mc.getFramebuffer());
blur2.getShaderManager().getShaderUniform("BlurDir").set(0F, 1F);
this.bloodVisionShader1 = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocationOutline);
swap = this.bloodVisionShader1.getFramebufferRaw("swap");
this.bloodVisionFrameBuffer1 = this.bloodVisionShader1.getFramebufferRaw("final");
this.bloodVisionShader2 = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocationOutline);
swap = this.bloodVisionShader2.getFramebufferRaw("swap");
this.bloodVisionFrameBuffer2 = this.bloodVisionShader2.getFramebufferRaw("final");

代码示例来源:origin: Vazkii/Quark

} else {
  if(panoramaStep > 0)
    saveScreenshot(currentDir, "panorama_" + (panoramaStep - 1) + ".png", mc.displayWidth, mc.displayHeight, mc.getFramebuffer());
  panoramaStep++;
  if(panoramaStep == 7) {

代码示例来源:origin: Funwayguy/BetterQuesting

if(!Minecraft.getMinecraft().getFramebuffer().isStencilEnabled())
  if(!Minecraft.getMinecraft().getFramebuffer().enableStencil())

代码示例来源:origin: TeamLapen/Vampirism

this.mc.getFramebuffer().bindFramebuffer(false);

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

public void init(World world, TextureManager textureManager) {
  matterScannerInfoHandler = new RenderMatterScannerInfoHandler();
  renderParticlesHandler = new RenderParticlesHandler(world, textureManager);
  renderWeaponsBeam = new RenderWeaponsBeam();
  statRenderRegistry = new AndroidStatRenderRegistry();
  starmapRenderRegistry = new StarmapRenderRegistry();
  renderDialogSystem = new RenderDialogSystem();
  bionicPartRenderRegistry = new AndroidBionicPartRenderRegistry();
  weaponModuleModelRegistry = new WeaponModuleModelRegistry();
  pipeRenderManager = new PipeRenderManager();
  dimensionalRiftsRender = new DimensionalRiftsRender();
  addCustomRenderer(matterScannerInfoHandler);
  addCustomRenderer(renderParticlesHandler);
  addCustomRenderer(renderWeaponsBeam);
  addCustomRenderer(renderDialogSystem);
  addCustomRenderer(dimensionalRiftsRender);
  MinecraftForge.EVENT_BUS.register(pipeRenderManager);
  MinecraftForge.EVENT_BUS.register(weaponRenderHandler);
  if (Minecraft.getMinecraft().getFramebuffer().enableStencil()) {
    stencilBuffer = MinecraftForgeClient.reserveStencilBit();
  }
}

相关文章