NiTexture

 

NiTexture

: public NiObjectNet

<NiTexture.h>

Description

NiTexture 是纹理数据的基类吗。其任何子类都要有部分纹理操作。该类没有定义纹理数据怎样存放,如何更新或创建,这都由它的子类进行定义实现。

Constructors

抽象类没有构造函数提供。

Static Member Functions

static bool GetMipmapByDefault()

static void SetMipmapByDefault(bool bMipmap)

设置和获得全局的mipmapping flag.当NiTexture 的子类用MIP_DEFAULT 作为创建纹理的mipmapping 模式时,这个标志就用到了。如果它是True纹理就是mipmapped,反之则不是mipmapped的。

Supported Member Functions

virtual unsigned int GetWidth() const = 0

virtual unsigned int GetHeight() const = 0

获得宽和高

const FormatPrefs& GetFormatPreferences() const

返回在创建纹理时所选的格式项。这些格式选项要求渲染器找到一个最匹配该设置的选项或者被忽略。记住这个函数只有Get,,,没有Set。。因为纹理在创建时就被指定了格式,后期不能改变的。

Nested Classes

NiTexture::FormatPrefs

class FormatPrefs : public NiMemObject
{
public:
    // Creates a format preferences instance with DEFAULT values
    // for all data members
    FormatPrefs();

    PixelLayout m_ePixelLayout;
    MipFlag m_eMipMapped;
    AlphaFormat m_eAlphaFmt;
};

 

The FormatPrefs class represents a set of application preferences for texture formats.  These preferences are not direct texture format requests, but are only requests for general levels of pixel accuracy.  The format enumerations and their meanings are as follows:

PixelLayout Enum

Meaning

PALETTIZED_8

Texture prefers an 8 bit palettized format (with or without alpha).

HIGH_COLOR_16

Texture prefers a 16-bit per pixel RGB(A) format.

TRUE_COLOR_32

Texture prefers a 24/32-bit per pixel RGB(A) format.

COMPRESSED

Texture prefers a compressed format.

BUMPMAP

Texture prefers a Bump-map format.

PALETTIZED_4

Texture prefers an 4 bit palettized format (with or without alpha).

PIX_DEFAULT

Texture can use whatever format best matches the source data.

SINGLE_COLOR_8

Single 8-bit channel format

SINGLE_COLOR_16

Single 16-bit channel format.

SINGLE_COLOR_32

Single 32-bit channel format

DOUBLE_COLOR_32

Two channel format summing to 32 bits.

DOUBLE_COLOR_64

Two channel format summing to 64 bits.

FLOAT_COLOR_32

Floating point format summing to 32 bits.

FLOAT_COLOR_64

Floating point format summing to 64 bits.

FLOAT_COLOR_128

Floating point format summing to 128 bits.

 

MipFlag Enum

Meaning

NO

Texture prefers no mipmapping ("flat" image).

YES

Texture prefers mipmapping.

MIP_DEFAULT

Texture can use the default setting from NiTexture.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值