Package com.jme.image

Examples of com.jme.image.Image


        // Create the buffered image using dummy data to initialize it
        // TODO: change this after by ref textures are implemented
        ByteBuffer data =
                BufferUtils.createByteBuffer(roundedWidth * roundedHeight * 4);
        Image image =
                new Image(Image.Format.RGB8, roundedWidth, roundedHeight, data);

        // Create the texture which wraps the image
        texture = new Texture2D();
        logger.fine("Created new texture " + texture);
        texture.setImage(image);
View Full Code Here


        }

        final float width3D = getPixelScaleCurrent().x * width;
        final float height3D = getPixelScaleCurrent().y * height;

        Image image = getWindow().getTexture().getImage();
        final float widthRatio = (float)width / image.getWidth();
        final float heightRatio = (float)height / image.getHeight();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                geometryNode.setLocalTranslation(trans);
                geometryNode.setSize(width3D, height3D);
View Full Code Here

            // TODO: for now, texcoords only depend on app size. Eventually this should
            // be the effective aperture rectangle width and height
            float width = (float) sizeApp.width;   
            float height = (float) sizeApp.height;
            if (getWindow() != null && getWindow().getTexture() != null) {
                Image image = getWindow().getTexture().getImage();
                float widthRatio = width / image.getWidth();
                float heightRatio = height / image.getHeight();
                sgChangeGeometryTexCoordsSet(geometryNode, widthRatio, heightRatio);
                windowNeedsValidate = true;
            }
        }
View Full Code Here

TOP

Related Classes of com.jme.image.Image

Copyright © 2018 www.massapicom. 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.