PixelLightAPI  .
Public Member Functions | Protected Member Functions | Protected Attributes
PLRenderer::TextureBufferRectangle Class Reference

Abstract renderer rectangle texture buffer resource. More...

#include <TextureBufferRectangle.h>

Inheritance diagram for PLRenderer::TextureBufferRectangle:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PLRENDERER_API ~TextureBufferRectangle ()
 Destructor.
const PLMath::Vector2iGetSize () const
 Returns the texture buffer size.
virtual PLRENDERER_API
PLCore::uint32 
GetNumOfPixels (PLCore::uint32 nMipmap=0) const override
 Returns the number of pixels of a certain mipmap level.
virtual PLRENDERER_API
PLCore::uint32 
GetNumOfBytes (PLCore::uint32 nMipmap=0, EPixelFormat nFormat=Unknown) const override
 Returns the number of bytes required to hold certain mipmap level texture buffer data.

Protected Member Functions

PLRENDERER_API TextureBufferRectangle (Renderer &cRenderer, PLCore::uint32 nFlags)
 Constructor.

Protected Attributes

PLMath::Vector2i m_vSize

Detailed Description

Abstract renderer rectangle texture buffer resource.

Remarks:
The hardware texturing is limited to images with power-of-two dimensions and an optional 1-texel border. But there’s also an special kind of texture buffers called ’rectangle textures’ without requiring power-of-two dimensions.
Non-power-of-two dimensioned texture buffers are useful for storing video images that do not have power-of-two dimensions. Re-sampling artifacts are avoided and less texture buffer memory may be required by using non-power-of-two dimensioned texture buffers. Non-power-of-two dimensioned texture buffers are also useful for shadow maps and window-space texturing.
However, non-power-of-two dimensioned (NPOTD) texture buffers have limitations that do not apply to power-of-two dimensioned (POT) texture buffers. NPOTD texture buffers may not use mipmap filtering; POTD texture buffers support both mipmapped and non-mipmapped filtering. NPOTD texture buffers support only the CLAMP, CLAMP TO EDGE, and CLAMP TO BORDER wrap modes; POTD texture buffers support CLAMP TO EDGE, REPEAT, CLAMP, MIRRORED REPEAT, and CLAMP TO BORDER. NPOTD texture buffers do not support an optional 1- texel border; POTD texture buffers do support an optional 1-texel border.

Constructor & Destructor Documentation

Destructor.

PLRENDERER_API PLRenderer::TextureBufferRectangle::TextureBufferRectangle ( Renderer cRenderer,
PLCore::uint32  nFlags 
) [protected]

Constructor.

Parameters:
[in]cRendererOwner renderer
[in]nFlagsTexture buffer flags (see EFlags)

Member Function Documentation

Returns the texture buffer size.

Returns:
Texture buffer size
virtual PLRENDERER_API PLCore::uint32 PLRenderer::TextureBufferRectangle::GetNumOfPixels ( PLCore::uint32  nMipmap = 0) const [override, virtual]

Returns the number of pixels of a certain mipmap level.

Parameters:
[in]nMipmapMipmap level (0 - GetNumOfMipmaps())
Returns:
The number of pixels of a certain mipmap level
Note:
  • If this is a cube texture, the number of pixels of all faces together will be returned

Implements PLRenderer::TextureBuffer.

virtual PLRENDERER_API PLCore::uint32 PLRenderer::TextureBufferRectangle::GetNumOfBytes ( PLCore::uint32  nMipmap = 0,
EPixelFormat  nFormat = Unknown 
) const [override, virtual]

Returns the number of bytes required to hold certain mipmap level texture buffer data.

Parameters:
[in]nMipmapMipmap level (0 - GetNumOfMipmaps())
[in]nFormatTarget texture buffer pixel format, if Unknown, the format of THIS texture buffer is chosen automatically
Returns:
The number of bytes required to hold certain mipmap level texture buffer data
Note:
  • If 'nFormat' is a compressed format, compression is also taken into account
  • If this is a cube texture, the number of bytes of all faces together will be returned

Implements PLRenderer::TextureBuffer.


Member Data Documentation

Texture buffer size


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:23
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported