# SoTextureScalePolicy Class Reference
[Nodes]

`#include <Inventor/nodes/SoTextureScalePolicy.h>`

Inheritance diagram for SoTextureScalePolicy:

List of all members.

## Detailed Description

The SoTextureScalePolicy class is a node for controlling the texture scale policy.

If a texture map is of size != 2^n, it must be scaled before OpenGL can handle it. This node enables you to control how/if textures are scaled before it is sent to OpenGL.

Also, if a texture map is bigger than the maximum OpenGL texture size (implementation and context dependent), it will be scaled down to the maximum size. You can avoid this by setting the texture policy to FRACTURE, in which case the texture will be split into several small subtextures before the geometry using the texture is rendered.

Since:
  Coin 2.0

## Public Types

enum | Policy { USE_TEXTURE_QUALITY, SCALE_DOWN, SCALE_UP, FRACTURE }

## Public Member Functions

| SoTextureScalePolicy (void)
virtual void | GLRender (SoGLRenderAction *action)

## Static Public Member Functions

void | initClass (void)

## Public Attributes

SoSFEnum | policy
SoSFFloat | quality

## Protected Member Functions

virtual | ~SoTextureScalePolicy ()

## Member Enumeration Documentation

enum SoTextureScalePolicy::Policy

Enumerates the available policy settings.

Enumeration values:

  USE_TEXTURE_QUALITY | Uses the texture quality to decide whether to scale up or down.
  SCALE_DOWN | Always scales down.
  SCALE_UP | Always scales up.
  FRACTURE | Splits the texture into several subtextures, and clips the geometry into each subtexture. This makes it possible to have textures with almost unlimted size (the only real limit is the amount on memory on the system, since the entire texture most fit into memory). Be aware that the rendering is quite slow if you have lots of triangles.

## Constructor & Destructor Documentation

SoTextureScalePolicy::SoTextureScalePolicy | ( | void |  | ) |

| Constructor.

SoTextureScalePolicy::~SoTextureScalePolicy | ( |  | ) | `[protected, virtual]`

| Destructor.

## Member Function Documentation

void SoTextureScalePolicy::initClass | ( | void |  | ) | `[static]`

| Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoNode.

void SoTextureScalePolicy::GLRender | ( | SoGLRenderAction * | action | ) | `[virtual]`

| Action method for the SoGLRenderAction. This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. Reimplemented from SoNode.

## Member Data Documentation

SoSFEnum SoTextureScalePolicy::policy

| The policy setting. Default value is USE_TEXTURE_QUALITY.

SoSFFloat SoTextureScalePolicy::quality

| The texture scale/resize quality. Default value is 0.5.

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

- SoTextureScalePolicy.h
- SoTextureScalePolicy.cpp