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


Java TextureImpl.unbind方法代码示例

本文整理汇总了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();
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:25,代码来源:PBufferGraphics.java

示例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();
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:24,代码来源:PBufferUniqueGraphics.java

示例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();
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:25,代码来源:PBufferGraphics.java

示例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();
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:24,代码来源:PBufferUniqueGraphics.java

示例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();
        }
}
 
开发者ID:Periapsis,项目名称:aphelion,代码行数:20,代码来源:Camera.java

示例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();
	}	
}
 
开发者ID:Glynn-Taylor,项目名称:Heightmap-Renderer,代码行数:16,代码来源:State_MENU.java

示例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();
}
 
开发者ID:bartvbl,项目名称:pixeltoy,代码行数:12,代码来源:GraphicsController.java

示例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();
}
 
开发者ID:Periapsis,项目名称:aphelion,代码行数:7,代码来源:AsyncTexture.java


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