Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

TextureParams Struct Reference

Parameters specifying how to construct a texture. More...

#include <StelTextureParams.hpp>

List of all members.

Public Member Functions

 TextureParams ()
 Construct TextureParams with default parameters.
TextureParamsgenerateMipmaps ()
 If specified, mipmaps will be generated.
TextureParamsfiltering (const TextureFiltering filtering)
 Set texture filtering mode.
TextureParamswrap (const TextureWrap wrap)
 Set texture wrapping mode.

Public Attributes

bool autoGenerateMipmaps
 Automatically generate mipmaps?
TextureFiltering filteringMode
 Texture filtering mode.
TextureWrap wrapMode
 Texture wrapping mode.

Detailed Description

Parameters specifying how to construct a texture.

These are passed to StelRenderer to create a texture.

This is a builder-style struct. Parameters can be specified like this:

 // Default parameters (no mipmaps, linear filtering, clamp to edge wrap mode).
 TextureParams a;
 // Generate mipmaps and use repeat wrap mode.
 TextureParams b = TextureParams().generateMipmaps().wrap(Repeat);
 // Generate mipmaps, use nearest-neighbor filtering and use repeat wrap mode.
 TextureParams c = TextureParams().generateMipmaps()
                   .filtering(TextureFiltering_Nearest).wrap(TextureWrap_Repeat);
See also:
StelTextureNew, StelRenderer

Definition at line 64 of file StelTextureParams.hpp.


Constructor & Destructor Documentation

TextureParams::TextureParams (  )  [inline]

Construct TextureParams with default parameters.

Default parameters are no mipmap generation, linear filtering and clamp to edge wrap mode.

Definition at line 69 of file StelTextureParams.hpp.


Member Function Documentation

TextureParams& TextureParams::filtering ( const TextureFiltering  filtering  )  [inline]

Set texture filtering mode.

Definition at line 84 of file StelTextureParams.hpp.

TextureParams& TextureParams::generateMipmaps (  )  [inline]

If specified, mipmaps will be generated.

Definition at line 77 of file StelTextureParams.hpp.

TextureParams& TextureParams::wrap ( const TextureWrap  wrap  )  [inline]

Set texture wrapping mode.

Definition at line 91 of file StelTextureParams.hpp.


Member Data Documentation

Automatically generate mipmaps?

Note that a StelRenderer backend might ignore this. (E.g. mipmaps might not be supported)

Definition at line 101 of file StelTextureParams.hpp.

TextureFiltering TextureParams::filteringMode

Texture filtering mode.

Note that a StelRenderer backend might ignore this. (E.g. linear filtering with software renderer might be too slow)

Definition at line 107 of file StelTextureParams.hpp.

Texture wrapping mode.

Definition at line 110 of file StelTextureParams.hpp.


The documentation for this struct was generated from the following file:
Generated on Thu Jan 31 14:05:47 2013 for Stellarium by  doxygen 1.6.3