本文整理汇总了Java中org.lwjgl.opengl.Pbuffer.RENDER_TEXTURE_SUPPORTED属性的典型用法代码示例。如果您正苦于以下问题:Java Pbuffer.RENDER_TEXTURE_SUPPORTED属性的具体用法?Java Pbuffer.RENDER_TEXTURE_SUPPORTED怎么用?Java Pbuffer.RENDER_TEXTURE_SUPPORTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lwjgl.opengl.Pbuffer
的用法示例。
在下文中一共展示了Pbuffer.RENDER_TEXTURE_SUPPORTED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
/**
* Initialise offscreen rendering by checking what buffers are supported
* by the card
*
* @throws SlickException Indicates no buffers are supported
*/
private static void init() throws SlickException {
init = true;
if (fbo) {
fbo = GLContext.getCapabilities().GL_EXT_framebuffer_object;
}
pbuffer = (Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) != 0;
pbufferRT = (Pbuffer.getCapabilities() & Pbuffer.RENDER_TEXTURE_SUPPORTED) != 0;
if (!fbo && !pbuffer && !pbufferRT) {
throw new SlickException("Your OpenGL card does not support offscreen buffers and hence can't handle the dynamic images required for this application.");
}
Log.info("Offscreen Buffers FBO="+fbo+" PBUFFER="+pbuffer+" PBUFFERRT="+pbufferRT);
}
示例2: PBufferGraphics
/**
* Create a new graphics context around a pbuffer
*
* @param image The image we're rendering to
* @throws SlickException Indicates a failure to use pbuffers
*/
public PBufferGraphics(Image image) throws SlickException {
super(image.getTexture().getTextureWidth(), image.getTexture().getTextureHeight());
this.image = image;
Log.debug("Creating pbuffer(rtt) "+image.getWidth()+"x"+image.getHeight());
if ((Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0) {
throw new SlickException("Your OpenGL card does not support PBuffers and hence can't handle the dynamic images required for this application.");
}
if ((Pbuffer.getCapabilities() & Pbuffer.RENDER_TEXTURE_SUPPORTED) == 0) {
throw new SlickException("Your OpenGL card does not support Render-To-Texture and hence can't handle the dynamic images required for this application.");
}
init();
}
示例3: PBufferGraphics
/**
* Create a new graphics context around a pbuffer
*
* @param image The image we're rendering to
* @throws SlickException Indicates a failure to use pbuffers
*/
public PBufferGraphics(@Nonnull Image image) throws SlickException {
super(InternalTextureLoader.get2Fold(image.getWidth()), InternalTextureLoader.get2Fold(image.getHeight()));
this.image = image;
Log.debug("Creating pbuffer(rtt) "+image.getWidth()+"x"+image.getHeight());
if ((Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0) {
throw new SlickException("Your OpenGL card does not support PBuffers and hence can't handle the dynamic images required for this application.");
}
if ((Pbuffer.getCapabilities() & Pbuffer.RENDER_TEXTURE_SUPPORTED) == 0) {
throw new SlickException("Your OpenGL card does not support Render-To-Texture and hence can't handle the dynamic images required for this application.");
}
init();
}
示例4: init
/**
* Initialise offscreen rendering by checking what buffers are supported
* by the card.
*
* @throws SlickException Indicates no buffers are supported
*/
private static void init() throws SlickException {
if (fbo) {
fbo = GLContext.getCapabilities().GL_EXT_framebuffer_object;
}
pbuffer = (Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) != 0;
pbufferRT = (Pbuffer.getCapabilities() & Pbuffer.RENDER_TEXTURE_SUPPORTED) != 0;
if (!fbo && !pbuffer && !pbufferRT) {
throw new SlickException("Your OpenGL card does not support offscreen buffers and hence can't handle the "
+ "dynamic images required for this application.");
}
Log.info("Offscreen Buffers FBO="+fbo+" PBUFFER="+pbuffer+" PBUFFERRT="+pbufferRT);
}