Complete Texture API IntroductionHaving got the basic texturing example to work, now you need to get familiar with the rest of the texturing APIs and what they can do for you. In general, Aviatrix3D presents all of the normal texturing options that you can use at the OpenGL level, by bundling them into a couple of classes. This tutorial will be about walking you through the various classes that can contribute to the texturing look rather than as a complete end to end application demo.
If you would like to see the some code that uses a reasonable number of these
options then go to the examples/texture directory and look at
Boundary ModesSpecifying boundary modes is a capability of the
To set the boundary mode, you need to find the appropriate method call. Since
textures can have varying number of dimensions, you won't find all the methods
on the base
Texture FunctionsTexture functions control how the texture image is applied to the object and the underlying object colour and lighting model. Control over this ability is found in the
TextureAttributes attr = new TextureAttributes(); attr.setTextureMode(TextureAttributes.MODE_REPLACE);Making use of the texture combiner modes and methods are covered in the Multitexturing tutorial, so we won't cover them in detail here.
If your texturing needs to make use of explicit blend colour, such as using
attr.setBlendColor(0, 0, 1, 1);
FilteringTexture filtering can be used with the same set of capabilities as that provided by OpenGL. The same restrictions also apply - such as attempting to use mipmap filter modes without providing mip maps will disable texturing. The library is just a thin layer based on the requested modes, the real visual behaviour is defined by the OpenGL specification.
Three filter capabilities are defined - minification, magnification and anisotropic. Each have their own methods. Separate constant sets are defined for each filter as although some options look common, the underlying OpenGL calls use different constants to describe each filter type. It also helps us internally work out quickly whether you've passed us a dodgy value or not.
Each of the filter setting methods are found on the base class
Texture Coordinate GenerationAutomatic texture coordinate generation is used in a lot of places, particularly for the various forms of environment mapping. All of the available options are wrapped up into the class
All settings are performed through the
Parameter values are only needed if you are using one of the eye or object
linear generation modes. For any other mode, we don't look at it internally,
so you'll be safe to pass a
Current Limitations and Missing CapabilitiesThe following capabilities cannot be used or expressed through the various APIs available in Aviatrix3D. We're considering designs for them, but have nothing solid yet.
[ Home ]
[ License ]
[ javadoc ]
[ Online Examples ]
[ Download ]
[ j3d.org ] [ Aviatrix3D ] [ Code Repository ] [ Java3D ] [ OpenGL ] [ Books ] [ Contact Us ]
Last Updated: $Date: 2010-05-01 04:20:35 -0700 (Sat, 01 May 2010) $