void reloadTextureImage( Canvas3D cv, int face, int level, ImageComponentRetained image, int numLevels) { /* System.err.println("Texture3D.reloadTextureImage: level= " + level + " image.imageYup= " + image.imageYup + " w= " + image.width + " h= " + image.height + " d= " + depth + " numLevels= " + numLevels); */ // Texture3D does not need to support Raster ImageComponentRetained.ImageData imageData = image.getImageData(false); updateTextureImage( cv, 0, numLevels, level, format, image.getImageFormatTypeIntValue(false), image.width, image.height, depth, boundaryWidth, image.getImageDataTypeIntValue(), imageData.get()); }
void reloadTextureSubImage( Canvas3D cv, int level, int face, ImageComponentUpdateInfo info, ImageComponentRetained image) { int x = info.x, y = info.y, z = info.z, width = info.width, height = info.height; int xoffset = x; int yoffset = y; // Texture3D does not need to support Raster ImageComponentRetained.ImageData imageData = image.getImageData(false); updateTextureSubImage( cv, 0, level, xoffset, yoffset, z, format, image.getImageFormatTypeIntValue(false), xoffset, yoffset, z, image.width, image.height, width, height, 1, image.getImageDataTypeIntValue(), imageData.get()); }
/* * @exception IllegalSharingException if this NodeComponent is live and * the specified image is being used by a Canvas3D as an off-screen buffer. * * @exception IllegalSharingException if this NodeComponent is * being used by an immediate mode context and * the specified image is being used by a Canvas3D as an off-screen buffer. */ void validateImageIllegalSharing(ImageComponent image) { // Do illegal sharing check if (image != null) { ImageComponentRetained imageRetained = (ImageComponentRetained) image.retained; NodeComponentRetained ncRetained = (NodeComponentRetained) this.retained; if (imageRetained.getUsedByOffScreen()) { if (isLive()) { throw new IllegalSharingException(J3dI18N.getString("NodeComponent2")); } if (ncRetained.getInImmCtx()) { throw new IllegalSharingException(J3dI18N.getString("NodeComponent3")); } } } }