本文整理汇总了Java中org.newdawn.slick.opengl.TextureImpl.unbind方法的典型用法代码示例。如果您正苦于以下问题:Java TextureImpl.unbind方法的具体用法?Java TextureImpl.unbind怎么用?Java TextureImpl.unbind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.newdawn.slick.opengl.TextureImpl
的用法示例。
在下文中一共展示了TextureImpl.unbind方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enable
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.Graphics#enable()
*/
protected void enable() {
SlickCallable.enterSafeBlock();
try {
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
init();
}
pbuffer.makeCurrent();
} catch (Exception e) {
Log.error("Failed to recreate the PBuffer");
throw new RuntimeException(e);
}
// Put the renderer contents to the texture
GL.glBindTexture(GL11.GL_TEXTURE_2D, image.getTexture().getTextureID());
pbuffer.releaseTexImage(Pbuffer.FRONT_LEFT_BUFFER);
TextureImpl.unbind();
initGL();
}
示例2: enable
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.Graphics#enable()
*/
protected void enable() {
SlickCallable.enterSafeBlock();
try {
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
init();
}
pbuffer.makeCurrent();
} catch (Exception e) {
Log.error("Failed to recreate the PBuffer");
Log.error(e);
throw new RuntimeException(e);
}
// Put the renderer contents to the texture
TextureImpl.unbind();
initGL();
}
示例3: enable
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.Graphics#enable()
*/
protected void enable() {
SlickCallable.enterSafeBlock();
try {
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
init();
}
pbuffer.makeCurrent();
} catch (Exception e) {
Log.error("Failed to recreate the PBuffer");
throw new RuntimeException(e);
}
// Put the renderer contents to the texture
GL.glBindTexture(GL11.GL_TEXTURE_2D, image.getTexture().getTextureID());
pbuffer.releaseTexImage(Pbuffer.FRONT_LEFT_BUFFER);
TextureImpl.unbind();
initGL();
}
示例4: enable
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.Graphics#enable()
*/
protected void enable() {
SlickCallable.enterSafeBlock();
try {
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
init();
}
pbuffer.makeCurrent();
} catch (Exception e) {
Log.error("Failed to recreate the PBuffer");
Log.error(e);
throw new RuntimeException(e);
}
// Put the renderer contents to the texture
TextureImpl.unbind();
initGL();
}
示例5: renderPlayerText
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
public void renderPlayerText(@Nonnull String text, int x, int y, @Nonnull Color color)
{
if (playerFont == null || nifty == null)
{
// Without nifty, use slick with its default font
Graph.g.setColor(new org.newdawn.slick.Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()));
Graph.g.drawString(text, x, y);
}
else
{
TextureImpl.unbind();
nifty.getRenderEngine().setColor(color);
nifty.getRenderEngine().setFont(playerFont);
nifty.getRenderEngine().renderText(text, x, y, -1, -1, Color.NONE);
nifty.getRenderEngine().setColor(Color.WHITE);
Graph.g.setColor(org.newdawn.slick.Color.white);
TextureImpl.unbind();
}
}
示例6: Init
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
@Override
protected void Init() {
try {
GL11.glEnable(GL11.GL_TEXTURE_2D);
Texture button1 = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/Buttons/Button1.png"), false, GL11.GL_NEAREST);
GUI.AddButton(460, 154, button1.getImageWidth(), button1.getImageHeight(), button1);
BackGroundImage = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/Menus/Menu.png"), false, GL11.GL_NEAREST);
TextureImpl.unbind();
} catch (IOException e) {
System.out.println("ERROR: Failed to load image @ Menu");
e.printStackTrace();
}
}
示例7: drawString
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
public static void drawString(double x, double y, String string) {
glPushMatrix();
glScaled(1, -1, 1);
glTranslated(0, -18 + -2 * y, 0);
TextureImpl.bindNone();
Color fontColour = Colour.getCurrentColour();
font.drawString((float)x, (float)y, string, fontColour);
TextureImpl.unbind();
glDisable(GL_TEXTURE_2D);
glPopMatrix();
}
示例8: unbind
import org.newdawn.slick.opengl.TextureImpl; //导入方法依赖的package包/类
/** Clear the bind cache. Call me at the start of each render loop.
*/
public static void unbind()
{
TextureImpl.unbind();
}