## Hardware Rendering

A lot of work has been done to the hardware rendering support for this release.

### Added features

- Translucent texturing with alpha blending support.
- Added support for texture objects which have ubyte or float colors.
- Support for texture wrapping.
- Texture maps are registered via gluBuild2DMipmaps removing the restriction that texture maps must have the number of pixels in each direction as a power of 2.
- Made it possible to control texture mode.
- Activated linear interpolation and mipmaping texture filters.
- Made it possible to change some lighting and culling options.
- Can now specify object colors and opacities (via the "colors" and "opacities" component) to light and modulate a hardware rendered textured object, instead of accepting the hard-coded solid white.

#### Translucent Texturing

Translucent textures are represented as image fields with opacities components–either float opacities, or ubyte opacities and a float opacity map. As with opacities objects, translucent textured objects aren't meshed, but are tossed into the translucent sort-list, sorted by depth, and rendered.

Translucent textures can be impored into DX with the ReadImage module, as long as ImageMagick support was included, using image formats that support opacity masks.

#### Texture Wrapping

To activate texture wrapping, add to the field to be textured one or both of the attributes "texture wrap s" and "texture wrap t" with the Options module. Valid values for these attributes are "clamp to border", "clamp", "repeat", or "clamp to edge". This affects how the texture is to be distributed over the object. s and t are coordinate directions of the texture map.

#### Texture Mipmapping

Mipmapping is the process of creating a set of filtered texture maps of decreasing resolution generated from a single high resolution texture and used to improve accuracy during texture mapping. This filtering process allows OpenGL to apply an appropriate level of detail to an object depending on the objects viewable size, thus reducing aliasing and flickering. The filter to apply to a texture can be set by adding the attribute "texture min filter" with values "nearest", "linear", "nearest_mipmap_nearest", "nearest_mipmap_linear", "linear_mipmap_nearest", or "linear_mipmap_linear" and the attribute "texture mag filter" with the values "nearest" or "linear" to the object to be textured.

Note that the default OpenGL state when none of these attributes are specified is the same as it was in the previous release except for colors. Previously, the texture was only modulated with white not with the object's color. Now, the color modulated is the object's color. In order to produce the previous behavior, run the textured object through Color("white") before rendering.For more information on these attributes, see the added documentation on the Display module in the User's Reference.

[ OpenDX Home at IBM | OpenDX.org ]