All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TextureOptions Class Reference

#include <texture.h>

Public Types

enum  Wrap {
  WrapDefault, WrapBlack, WrapClamp, WrapPeriodic,
  WrapMirror, WrapPeriodicPow2, WrapPeriodicSharedBorder, WrapLast
enum  MipMode {
  MipModeDefault, MipModeNoMIP, MipModeOneLevel, MipModeTrilinear,
enum  InterpMode { InterpClosest, InterpBilinear, InterpBicubic, InterpSmartBicubic }

Public Member Functions

 TextureOptions ()
 TextureOptions (const TextureOpt &opt)

Static Public Member Functions

static Wrap decode_wrapmode (const char *name)
static Wrap decode_wrapmode (ustring name)
static void parse_wrapmodes (const char *wrapmodes, TextureOptions::Wrap &swrapcode, TextureOptions::Wrap &twrapcode)

Public Attributes

int firstchannel
 First channel of the lookup. More...
int subimage
 Subimage or face ID. More...
ustring subimagename
 Subimage name. More...
Wrap swrap
 Wrap mode in the s direction. More...
Wrap twrap
 Wrap mode in the t direction. More...
MipMode mipmode
 Mip mode. More...
InterpMode interpmode
 Interpolation mode. More...
int anisotropic
 Maximum anisotropic ratio. More...
bool conservative_filter
 True == over-blur rather than alias. More...
VaryingRef< float > sblur
VaryingRef< float > tblur
 Blur amount. More...
VaryingRef< float > swidth
VaryingRef< float > twidth
 Multiplier for derivatives. More...
VaryingRef< float > time
 Time. More...
VaryingRef< float > bias
 Bias. More...
VaryingRef< float > fill
 Fill value for missing channels. More...
VaryingRef< float > missingcolor
 Color for missing texture. More...
VaryingRef< intsamples
 Number of samples. More...
Wrap rwrap
 Wrap mode in the r direction. More...
VaryingRef< float > rblur
 Blur amount in the r direction. More...
VaryingRef< float > rwidth
 Multiplier for derivatives in r direction. More...


class pvt::TextureSystemImpl
class TextureOpt

Detailed Description

DEPRECATED(1.8) Encapsulate all the options needed for texture lookups. Making these options all separate parameters to the texture API routines is very ugly and also a big pain whenever we think of new options to add. So instead we collect all those little options into one structure that can just be passed by reference to the texture API routines.

Definition at line 339 of file texture.h.

Member Enumeration Documentation

Interp mode determines how we sample within a mipmap level


Force closest texel.


Force bilinear lookup within a mip level.


Force cubic lookup within a mip level.


Bicubic when maxifying, else bilinear.

Definition at line 366 of file texture.h.

Mip mode determines if/how we use mipmaps


Default high-quality lookup.


Just use highest-res image, no MIP mapping.


Use just one mipmap level.


Use two MIPmap levels (trilinear)


Use two MIPmap levels w/ anisotropic.

Definition at line 356 of file texture.h.

Wrap mode describes what happens when texture coordinates describe a value outside the usual [0,1] range where a texture is defined.


Use the default found in the file.


Black outside [0..1].


Clamp to [0..1].


Periodic mod 1.


Mirror the image.


Periodic, but only for powers of 2!!!


Periodic with shared border (env)


Mark the end – don't use this!

Definition at line 343 of file texture.h.

Constructor & Destructor Documentation

TextureOptions::TextureOptions ( )

Create a TextureOptions with all fields initialized to reasonable defaults.

TextureOptions::TextureOptions ( const TextureOpt opt)

Convert a TextureOpt for one point into a TextureOptions with uninform values.

Member Function Documentation

static Wrap TextureOptions::decode_wrapmode ( const char *  name)

Utility: Return the Wrap enum corresponding to a wrap name: "default", "black", "clamp", "periodic", "mirror".

Definition at line 408 of file texture.h.

static Wrap TextureOptions::decode_wrapmode ( ustring  name)

Definition at line 412 of file texture.h.

static void TextureOptions::parse_wrapmodes ( const char *  wrapmodes,
TextureOptions::Wrap swrapcode,
TextureOptions::Wrap twrapcode 

Utility: Parse a single wrap mode (e.g., "periodic") or a comma-separated wrap modes string (e.g., "black,clamp") into separate Wrap enums for s and t.

Definition at line 420 of file texture.h.

Friends And Related Function Documentation

friend class pvt::TextureSystemImpl

Definition at line 431 of file texture.h.

friend class TextureOpt

Definition at line 432 of file texture.h.

Member Data Documentation

int TextureOptions::anisotropic

Maximum anisotropic ratio.

Definition at line 389 of file texture.h.

VaryingRef<float> TextureOptions::bias


Definition at line 396 of file texture.h.

bool TextureOptions::conservative_filter

True == over-blur rather than alias.

Definition at line 390 of file texture.h.

VaryingRef<float> TextureOptions::fill

Fill value for missing channels.

Definition at line 397 of file texture.h.

int TextureOptions::firstchannel

First channel of the lookup.

Definition at line 382 of file texture.h.

InterpMode TextureOptions::interpmode

Interpolation mode.

Definition at line 388 of file texture.h.

MipMode TextureOptions::mipmode

Mip mode.

Definition at line 387 of file texture.h.

VaryingRef<float> TextureOptions::missingcolor

Color for missing texture.

Definition at line 398 of file texture.h.

VaryingRef<float> TextureOptions::rblur

Blur amount in the r direction.

Definition at line 403 of file texture.h.

VaryingRef<float> TextureOptions::rwidth

Multiplier for derivatives in r direction.

Definition at line 404 of file texture.h.

Wrap TextureOptions::rwrap

Wrap mode in the r direction.

Definition at line 402 of file texture.h.

VaryingRef<int> TextureOptions::samples

Number of samples.

Definition at line 399 of file texture.h.

VaryingRef<float> TextureOptions::sblur

Definition at line 393 of file texture.h.

int TextureOptions::subimage

Subimage or face ID.

Definition at line 383 of file texture.h.

ustring TextureOptions::subimagename

Subimage name.

Definition at line 384 of file texture.h.

VaryingRef<float> TextureOptions::swidth

Definition at line 394 of file texture.h.

Wrap TextureOptions::swrap

Wrap mode in the s direction.

Definition at line 385 of file texture.h.

VaryingRef<float> TextureOptions::tblur

Blur amount.

Definition at line 393 of file texture.h.

VaryingRef<float> TextureOptions::time


Definition at line 395 of file texture.h.

VaryingRef<float> TextureOptions::twidth

Multiplier for derivatives.

Definition at line 394 of file texture.h.

Wrap TextureOptions::twrap

Wrap mode in the t direction.

Definition at line 386 of file texture.h.

The documentation for this class was generated from the following file: