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


Java InternalTextureLoader.get2Fold方法代码示例

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


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

示例1: PBufferGraphics

import org.newdawn.slick.opengl.InternalTextureLoader; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:21,代码来源:PBufferGraphics.java

示例2: FBOGraphics

import org.newdawn.slick.opengl.InternalTextureLoader; //导入方法依赖的package包/类
/**
 * Create a new graphics context around an FBO
 *
 * @param image The image we're rendering to
 * @throws SlickException Indicates a failure to use pbuffers
 */
public FBOGraphics(@Nonnull Image image) throws SlickException {
    super(InternalTextureLoader.get2Fold(image.getWidth()), InternalTextureLoader.get2Fold(image.getHeight()));
    this.image = image;

    Log.debug("Creating FBO "+image.getWidth()+"x"+image.getHeight());

    boolean FBOEnabled = GLContext.getCapabilities().GL_EXT_framebuffer_object;
    if (!FBOEnabled) {
        throw new SlickException("Your OpenGL card does not support FBO and hence can't handle the dynamic images required for this application.");
    }

    init();
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:20,代码来源:FBOGraphics.java

示例3: PBufferUniqueGraphics

import org.newdawn.slick.opengl.InternalTextureLoader; //导入方法依赖的package包/类
/**
 * 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 PBufferUniqueGraphics(@Nonnull Image image) throws SlickException {
    super(InternalTextureLoader.get2Fold(image.getWidth()), InternalTextureLoader.get2Fold(image.getHeight()));
    this.image = image;

    Log.debug("Creating pbuffer(unique) "+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.");
    }

    init();
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:18,代码来源:PBufferUniqueGraphics.java

示例4: toPowerOfTwo

import org.newdawn.slick.opengl.InternalTextureLoader; //导入方法依赖的package包/类
public static int toPowerOfTwo(int n) {
	return InternalTextureLoader.get2Fold(n);
}
 
开发者ID:lucas-tulio,项目名称:fractal-explorer,代码行数:4,代码来源:PixelData.java


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