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


Java GL4.glNamedFramebufferTexture方法代码示例

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


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

示例1: initFramebuffer

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initFramebuffer(GL4 gl4) {

        gl4.glCreateFramebuffers(Framebuffer.MAX, framebufferName);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RENDER), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.MULTISAMPLE), 0);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RESOLVE), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.COLORBUFFER), 0);

        if (gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RENDER), GL_FRAMEBUFFER)
                != GL_FRAMEBUFFER_COMPLETE) {
            return false;
        }
        if (gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RESOLVE), GL_FRAMEBUFFER)
                != GL_FRAMEBUFFER_COMPLETE) {
            return false;
        }

        IntBuffer params = GLBuffers.newDirectIntBuffer(1);
        gl4.glGetNamedFramebufferParameteriv(framebufferName.get(Framebuffer.RENDER), GL_SAMPLES, params);
        int samples = params.get(0);
        BufferUtils.destroyDirectBuffer(params);
        return samples == 4;

    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:25,代码来源:Gl_450_direct_state_access.java

示例2: initFramebuffer

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initFramebuffer(GL4 gl4) {

        gl4.glCreateFramebuffers(Framebuffer.MAX, framebufferName);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RENDER), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.MULTISAMPLE), 0);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RESOLVE), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.COLORBUFFER), 0);

        if (gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RENDER), GL_FRAMEBUFFER)
                != GL_FRAMEBUFFER_COMPLETE) {
            return false;
        }
        if (gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RESOLVE), GL_FRAMEBUFFER)
                != GL_FRAMEBUFFER_COMPLETE) {
            return false;
        }

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:20,代码来源:Gl_500_direct_state_access_gtc.java

示例3: initFramebuffer

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initFramebuffer(GL4 gl4) {

        gl4.glCreateFramebuffers(Framebuffer.MAX, framebufferName);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RENDER), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.MULTISAMPLE), 0);
        gl4.glNamedFramebufferTexture(framebufferName.get(Framebuffer.RESOLVE), GL_COLOR_ATTACHMENT0,
                textureName.get(Texture.COLORBUFFER), 0);

        if (gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RENDER), GL_FRAMEBUFFER)
                != GL_FRAMEBUFFER_COMPLETE) {
            return false;
        }
        return gl4.glCheckNamedFramebufferStatus(framebufferName.get(Framebuffer.RESOLVE), GL_FRAMEBUFFER)
                == GL_FRAMEBUFFER_COMPLETE;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:16,代码来源:Gl_430_direct_state_access_ext.java

示例4: initFramebuffer

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initFramebuffer(GL4 gl4) {

        gl4.glCreateFramebuffers(1, framebufferName);
        gl4.glNamedFramebufferTexture(framebufferName.get(0), GL_COLOR_ATTACHMENT0, textureName.get(Texture.COLORBUFFER),
                0);

        return isFramebufferComplete(gl4, framebufferName.get(0));
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:9,代码来源:Gl_500_conservative_raster_nv.java

示例5: initFramebuffer

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initFramebuffer(GL4 gl4) {

        gl4.glCreateFramebuffers(1, framebufferName);
        gl4.glNamedFramebufferTexture(framebufferName.get(0), GL_COLOR_ATTACHMENT0, textureName.get(Texture.COLORBUFFER),
                0);
        gl4.glNamedFramebufferTexture(framebufferName.get(0), GL_DEPTH_ATTACHMENT, textureName.get(Texture.RENDERBUFFER),
                0);

        return gl4.glCheckNamedFramebufferStatus(framebufferName.get(0), GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:11,代码来源:Gl_500_shader_group_nv.java


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