Preparing for texture mapping
Getting a texture requires:
A file to load from disk or the Web
A TextureLoader to load that file or directly a BufferedImage or a RenderedImage
The TextureLoader utility loads an image from a file or
URL, and returns an ImageComponent or Texture
An ImageComponent to hold the loaded image
Which in turn uses a standard BufferedImage
What is really important is to get an ImageComponent
ImageComponent is the base class for two image containers:
-
ImageComponent2D holds a 2D image
-
ImageComponent3D holds a 3D volume of images
Methods on ImageComponent2D set the image it is holding
Methods
-
ImageComponent2D( int format, BufferedImage image )
-
void set( BufferedImage image )