Java 类org.newdawn.slick.opengl.renderer.Renderer 实例源码

项目:trashjam2017    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:Progetto-C    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:BaseClient    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:code404    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:fuzzy-octo-shame    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock()
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:GPVM    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:GPVM    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:SpaceStationAlpha    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:cretion    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:slick2d-maven    文件:SlickCallable.java   
/**
 * Enter a safe block ensuring that all the OpenGL state that slick 
 * uses is safe before touching the GL state directly.
 */
public static void enterSafeBlock() 
{
    if (inSafe) {
        return;
    }

    Renderer.get().flush();
    lastUsed = TextureImpl.getLastBind();
    TextureImpl.bindNone();
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPushMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);

    inSafe = true;
}
项目:trashjam2017    文件:GLUtils.java   
/**
 * Check that we're in the right place to be doing GL operations
 */
public static void checkGLContext() {
       try {
        Renderer.get().glGetError();
       } catch (NullPointerException e) {
        throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
       }
}
项目:trashjam2017    文件:GradientTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments to pass into the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GradientTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:trashjam2017    文件:GeomTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GeomTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:trashjam2017    文件:ShapeTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        AppGameContainer container = new AppGameContainer(new ShapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:trashjam2017    文件:InkscapeTest.java   
/**
 * Entry point to our simple test
 * 
 * @param argv The arguments passed in
 */
public static void main(String argv[]) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);

        AppGameContainer container = new AppGameContainer(new InkscapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:trashjam2017    文件:LineRenderTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);
        Renderer.getLineStripRenderer().setLineCaps(true);

        AppGameContainer container = new AppGameContainer(new LineRenderTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:trashjam2017    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:Progetto-C    文件:GLUtils.java   
/**
 * Check that we're in the right place to be doing GL operations
 */
public static void checkGLContext() {
       try {
        Renderer.get().glGetError();
       } catch (NullPointerException e) {
        throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
       }
}
项目:Progetto-C    文件:GradientTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments to pass into the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GradientTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:Progetto-C    文件:GeomTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GeomTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:Progetto-C    文件:ShapeTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        AppGameContainer container = new AppGameContainer(new ShapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:Progetto-C    文件:InkscapeTest.java   
/**
 * Entry point to our simple test
 * 
 * @param argv The arguments passed in
 */
public static void main(String argv[]) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);

        AppGameContainer container = new AppGameContainer(new InkscapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:Progetto-C    文件:LineRenderTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);
        Renderer.getLineStripRenderer().setLineCaps(true);

        AppGameContainer container = new AppGameContainer(new LineRenderTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:Progetto-C    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:BaseClient    文件:GLUtils.java   
/**
 * Check that we're in the right place to be doing GL operations
 */
public static void checkGLContext() {
       try {
        Renderer.get().glGetError();
       } catch (NullPointerException e) {
        throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
       }
}
项目:BaseClient    文件:GradientTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments to pass into the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GradientTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:BaseClient    文件:GeomTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GeomTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:BaseClient    文件:ShapeTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        AppGameContainer container = new AppGameContainer(new ShapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:BaseClient    文件:InkscapeTest.java   
/**
 * Entry point to our simple test
 * 
 * @param argv The arguments passed in
 */
public static void main(String argv[]) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);

        AppGameContainer container = new AppGameContainer(new InkscapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:BaseClient    文件:LineRenderTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);
        Renderer.getLineStripRenderer().setLineCaps(true);

        AppGameContainer container = new AppGameContainer(new LineRenderTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:BaseClient    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:code404    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:fuzzy-octo-shame    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:fractal-explorer    文件:PixelData.java   
/**
 * Uploads the pixel data to the given texture at the specified position.
 * This only needs to be called once, after the pixel data has changed.
 * 
 * @param texture the texture to modify
 * @param x the x position to place the pixel data on the texture
 * @param y the y position to place the pixel data on the texture
 */
public void apply(Texture texture, int x, int y) {
    if (x+width > texture.getTextureWidth() || y+height > texture.getTextureHeight())
        throw new IndexOutOfBoundsException("pixel data won't fit in given texture");
    position(length());
    pixels.flip();
    int glFmt = format.getOGLType();
    final SGL GL = Renderer.get();
    texture.bind();
    GL.glTexSubImage2D(SGL.GL_TEXTURE_2D, 0, x, y, width, height, 
            glFmt, SGL.GL_UNSIGNED_BYTE, pixels);
}
项目:GPVM    文件:GLUtils.java   
/**
 * Check that we're in the right place to be doing GL operations
 */
public static void checkGLContext() {
       try {
        Renderer.get().glGetError();
       } catch (NullPointerException e) {
        throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
       }
}
项目:GPVM    文件:Graphics.java   
/**
 * Reset the line width in use to the default for this graphics context
 */
public void resetLineWidth() {
    predraw();

    Renderer.getLineStripRenderer().setWidth(1.0f);
    GL.glLineWidth(1.0f);
    GL.glPointSize(1.0f);

    postdraw();
}
项目:GPVM    文件:GLUtils.java   
/**
 * Check that we're in the right place to be doing GL operations
 */
public static void checkGLContext() {
       try {
        Renderer.get().glGetError();
       } catch (NullPointerException e) {
        throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
       }
}
项目:GPVM    文件:GradientTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments to pass into the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GradientTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:GPVM    文件:GeomTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

        AppGameContainer container = new AppGameContainer(new GeomTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:GPVM    文件:ShapeTest.java   
/**
 * Entry point to our test
 * 
 * @param argv The arguments passed to the test
 */
public static void main(String[] argv) {
    try {
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);
        AppGameContainer container = new AppGameContainer(new ShapeTest());
        container.setDisplayMode(800,600,false);
        container.start();
    } catch (SlickException e) {
        e.printStackTrace();
    }
}