当前位置: 首页>>代码示例>>Java>>正文


Java OpenGlHelper.glBindFramebuffer方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.OpenGlHelper.glBindFramebuffer方法的典型用法代码示例。如果您正苦于以下问题:Java OpenGlHelper.glBindFramebuffer方法的具体用法?Java OpenGlHelper.glBindFramebuffer怎么用?Java OpenGlHelper.glBindFramebuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.OpenGlHelper的用法示例。


在下文中一共展示了OpenGlHelper.glBindFramebuffer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBindFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void createBindFramebuffer(int width, int height)
{
    if (!OpenGlHelper.isFramebufferEnabled())
    {
        this.framebufferWidth = width;
        this.framebufferHeight = height;
    }
    else
    {
        GlStateManager.enableDepth();

        if (this.framebufferObject >= 0)
        {
            this.deleteFramebuffer();
        }

        this.createFramebuffer(width, height);
        this.checkFramebufferComplete();
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, 0);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:22,代码来源:Framebuffer.java

示例2: bindFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void bindFramebuffer(boolean p_147610_1_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, this.framebufferObject);

        if (p_147610_1_)
        {
            GlStateManager.viewport(0, 0, this.framebufferWidth, this.framebufferHeight);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:13,代码来源:Framebuffer.java

示例3: deleteFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void deleteFramebuffer()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        this.unbindFramebufferTexture();
        this.unbindFramebuffer();

        if (this.depthBuffer > -1)
        {
            OpenGlHelper.glDeleteRenderbuffers(this.depthBuffer);
            this.depthBuffer = -1;
        }

        if (this.framebufferTexture > -1)
        {
            TextureUtil.deleteTexture(this.framebufferTexture);
            this.framebufferTexture = -1;
        }

        if (this.framebufferObject > -1)
        {
            OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, 0);
            OpenGlHelper.glDeleteFramebuffers(this.framebufferObject);
            this.framebufferObject = -1;
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:Framebuffer.java

示例4: createFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void createFramebuffer(int width, int height)
{
    this.framebufferWidth = width;
    this.framebufferHeight = height;
    this.framebufferTextureWidth = width;
    this.framebufferTextureHeight = height;

    if (!OpenGlHelper.isFramebufferEnabled())
    {
        this.framebufferClear();
    }
    else
    {
        this.framebufferObject = OpenGlHelper.glGenFramebuffers();
        this.framebufferTexture = TextureUtil.glGenTextures();

        if (this.useDepth)
        {
            this.depthBuffer = OpenGlHelper.glGenRenderbuffers();
        }

        this.setFramebufferFilter(9728);
        GlStateManager.bindTexture(this.framebufferTexture);
        GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, this.framebufferTextureWidth, this.framebufferTextureHeight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)((ByteBuffer)null));
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, this.framebufferObject);
        OpenGlHelper.glFramebufferTexture2D(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_COLOR_ATTACHMENT0, 3553, this.framebufferTexture, 0);

        if (this.useDepth)
        {
            OpenGlHelper.glBindRenderbuffer(OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
            OpenGlHelper.glRenderbufferStorage(OpenGlHelper.GL_RENDERBUFFER, 33190, this.framebufferTextureWidth, this.framebufferTextureHeight);
            OpenGlHelper.glFramebufferRenderbuffer(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_DEPTH_ATTACHMENT, OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
        }

        this.framebufferClear();
        this.unbindFramebufferTexture();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:39,代码来源:Framebuffer.java

示例5: unbindFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void unbindFramebuffer()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, 0);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:Framebuffer.java

示例6: createFramebuffer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void createFramebuffer(int width, int height)
{
    this.framebufferWidth = width;
    this.framebufferHeight = height;
    this.framebufferTextureWidth = width;
    this.framebufferTextureHeight = height;

    if (!OpenGlHelper.isFramebufferEnabled())
    {
        this.framebufferClear();
    }
    else
    {
        this.framebufferObject = OpenGlHelper.glGenFramebuffers();
        this.framebufferTexture = TextureUtil.glGenTextures();

        if (this.useDepth)
        {
            this.depthBuffer = OpenGlHelper.glGenRenderbuffers();
        }

        this.setFramebufferFilter(9728);
        GlStateManager.bindTexture(this.framebufferTexture);
        GlStateManager.glTexImage2D(3553, 0, 32856, this.framebufferTextureWidth, this.framebufferTextureHeight, 0, 6408, 5121, (IntBuffer)null);
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, this.framebufferObject);
        OpenGlHelper.glFramebufferTexture2D(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_COLOR_ATTACHMENT0, 3553, this.framebufferTexture, 0);

        if (this.useDepth)
        {
            OpenGlHelper.glBindRenderbuffer(OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
            OpenGlHelper.glRenderbufferStorage(OpenGlHelper.GL_RENDERBUFFER, 33190, this.framebufferTextureWidth, this.framebufferTextureHeight);
            OpenGlHelper.glFramebufferRenderbuffer(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_DEPTH_ATTACHMENT, OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
        }

        this.framebufferClear();
        this.unbindFramebufferTexture();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:39,代码来源:Framebuffer.java


注:本文中的net.minecraft.client.renderer.OpenGlHelper.glBindFramebuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。