Examples of glCopyTexSubImage2D()


Examples of javax.media.opengl.GL.glCopyTexSubImage2D()

        final GL gl = GLContext.getCurrentGL();

        JoglTextureStateUtil.doTextureBind(tex, 0, true);

        if (tex.getType() == Type.TwoDimensional) {
            gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, xoffset, yoffset, x, y, width, height);
        } else if (tex.getType() == Type.CubeMap) {
            gl.glCopyTexSubImage2D(JoglTextureStateUtil.getGLCubeMapFace(((TextureCubeMap) tex).getCurrentRTTFace()),
                    0, xoffset, yoffset, x, y, width, height);
        } else {
            throw new IllegalArgumentException("Invalid texture type: " + tex.getType());
View Full Code Here

Examples of javax.media.opengl.GL.glCopyTexSubImage2D()

        JoglTextureStateUtil.doTextureBind(tex, 0, true);

        if (tex.getType() == Type.TwoDimensional) {
            gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, xoffset, yoffset, x, y, width, height);
        } else if (tex.getType() == Type.CubeMap) {
            gl.glCopyTexSubImage2D(JoglTextureStateUtil.getGLCubeMapFace(((TextureCubeMap) tex).getCurrentRTTFace()),
                    0, xoffset, yoffset, x, y, width, height);
        } else {
            throw new IllegalArgumentException("Invalid texture type: " + tex.getType());
        }
    }
View Full Code Here

Examples of javax.media.opengl.GL.glCopyTexSubImage2D()

            final int xoffset, final int yoffset) {
        final GL gl = GLContext.getCurrentGL();

        JoglTextureStateUtil.doTextureBind(tex, 0, true);

        gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, xoffset, yoffset, x, y, width, height);
    }

    @Override
    protected void clearBuffers(final int clear) {
        final GL gl = GLContext.getCurrentGL();
View Full Code Here

Examples of javax.media.opengl.GL2.glCopyTexSubImage2D()

      }

      image.texture.enable(gl);
      image.texture.bind(gl)
      // copy buffer to image
      gl.glCopyTexSubImage2D(image.texture.getTarget(), 0, 0, 0, 0, 0, image.getWidth(), image.getHeight());
      image.texture.disable(gl);
     
      endDrawing();
    }
    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.