本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}