Derm.Render.Texture Class Reference

Texture. More...

Inheritance diagram for Derm.Render.Texture:
Derm.Render.RenderObject Derm.Render.IRenderObject Derm.Render.IReferenced Derm.Render.Texture1d Derm.Render.Texture2d Derm.Render.Texture3d Derm.Render.TextureCube Derm.Render.TextureRectangle

List of all members.

Public Types

enum  Filter {
  Nearest,
  Linear
}
 

Texture filter.

More...
enum  Wrap {
  Clamp,
  Repeat,
  MirroredRepeat
}
 

Texture wrapping mode.

More...

Public Member Functions

abstract void Bind (RenderContext ctx)
 Bind this Texture.
override void Create (RenderContext ctx)
 Create this Texture.
override void Delete (RenderContext ctx)
 Delete this Texture.
void RequestMipmapsCreation ()
 Request the creation of this Texture mipmaps.
abstract void Unbind (RenderContext ctx)
 Unbind this Texture.

Protected Member Functions

void ApplyParameters (RenderContext ctx, int target)
 Apply Texture parameters of specific target.
void Bind (RenderContext ctx, int target)
 Bind this Texture on specific target.
void GenerateMipmaps (RenderContext ctx, int target)
 Generate mipmaps for this Texture.
void Unbind (RenderContext ctx, int target)
 Unbind this Texture on specific target.

Protected Attributes

Filter mMagFilter = Filter.Linear
 Magnification filter.
Filter mMinFilter = Filter.Linear
 Minification filter.
Wrap mWrapS = Wrap.Repeat
 Wrapping on S coordinate.
Wrap mWrapT = Wrap.Repeat
 Wrapping on S coordinate.

Properties

bool HasMipmaps [get, set]
 Flag indicating whether this Texture has mipmaps definition.
int InternalFormat [get, set]
 Texture internal format.
Filter MagFilter [get, set]
 Magnification filter property.
Filter MinFilter [get, set]
 Minification filter property.
Pixel.Type PixelFormat [get, set]
 Texture source pixel format.
int TextelDataType [get]
 Texture data type.
int TextelFormat [get]
 Texture data format.
Wrap WrapCoordS [get, set]
 Wrapping on texture S coordinate.
Wrap WrapCoordT [get, set]
 Wrapping on texture T coordinate.

Detailed Description

Texture.

Textures are object holding a set of data, that can be accessed within a shader using a set of coordinates. Textures classes derives from Texture, which define a base implementation without specifying the texture dimensionality.

Texture can be one dimensional (Texture1d), two dimensional (Texture2d), three dimensional (Texture3d), cube mapped (TextureCube).


Member Enumeration Documentation

Texture filter.

Enumerator:
Nearest 

Keep the nearest pixel.

Linear 

Linearly interpolate pixels in neightboor.

Texture wrapping mode.

Enumerator:
Clamp 
Repeat 
MirroredRepeat 

Member Function Documentation

void Derm.Render.Texture.ApplyParameters ( RenderContext  ctx,
int  target 
) [protected]

Apply Texture parameters of specific target.

Parameters:
ctx A RenderContext used for setting texture parameter.
target A System.Int32 specifying the Texture target.
void Derm.Render.Texture.Bind ( RenderContext  ctx,
int  target 
) [protected]

Bind this Texture on specific target.

Parameters:
ctx A RenderContext used for binding this Texture.
target A System.Int32 specifying the texture target. It could be one of the following:

  • Gl.TEXTURE_1D
  • Gl.TEXTURE_2D
  • Gl.TEXTURE_RECTANGLE
  • Gl.TEXTURE_3D
  • Gl.TEXTURE_CUBE_MAP
abstract void Derm.Render.Texture.Bind ( RenderContext  ctx  )  [pure virtual]

Bind this Texture.

Parameters:
ctx A RenderContext used for binding this Texture.

To call this routine the condition IsCreated shall be true.

Implemented in Derm.Render.Texture1d, Derm.Render.Texture2d, Derm.Render.Texture3d, Derm.Render.TextureCube, and Derm.Render.TextureRectangle.

override void Derm.Render.Texture.Create ( RenderContext  ctx  )  [virtual]
override void Derm.Render.Texture.Delete ( RenderContext  ctx  )  [virtual]

Delete this Texture.

Parameters:
ctx 

Implements Derm.Render.RenderObject.

void Derm.Render.Texture.GenerateMipmaps ( RenderContext  ctx,
int  target 
) [protected]

Generate mipmaps for this Texture.

Parameters:
ctx A RenderContext used for mipmapping definition.
target A System.Int32 indicating the target for generating bitmaps.
void Derm.Render.Texture.RequestMipmapsCreation (  ) 

Request the creation of this Texture mipmaps.

void Derm.Render.Texture.Unbind ( RenderContext  ctx,
int  target 
) [protected]

Unbind this Texture on specific target.

Parameters:
ctx A RenderContext used for binding this Texture.
target A System.Int32 specifying the texture target. It could be one of the following:

  • Gl.TEXTURE_1D
  • Gl.TEXTURE_2D
  • Gl.TEXTURE_RECTANGLE
  • Gl.TEXTURE_3D
  • Gl.TEXTURE_CUBE_MAP
abstract void Derm.Render.Texture.Unbind ( RenderContext  ctx  )  [pure virtual]

Unbind this Texture.

Parameters:
ctx A RenderContext used for binding this Texture.

To call this routine the condition IsCreated shall be true.

Implemented in Derm.Render.Texture1d, Derm.Render.Texture2d, Derm.Render.Texture3d, Derm.Render.TextureCube, and Derm.Render.TextureRectangle.


Member Data Documentation

Filter Derm.Render.Texture.mMagFilter = Filter.Linear [protected]

Magnification filter.

Filter Derm.Render.Texture.mMinFilter = Filter.Linear [protected]

Minification filter.

Wrap Derm.Render.Texture.mWrapS = Wrap.Repeat [protected]

Wrapping on S coordinate.

Wrap Derm.Render.Texture.mWrapT = Wrap.Repeat [protected]

Wrapping on S coordinate.


Property Documentation

bool Derm.Render.Texture.HasMipmaps [get, set]

Flag indicating whether this Texture has mipmaps definition.

This flag specify whether this Texture has mipmaps, or not. By

int Derm.Render.Texture.InternalFormat [get, set, protected]

Texture internal format.

Depending on the pixel data format, a default internal format is determined. It's possible to force the internal format by setting this property to a correct value. To default the internal format assign 0 to this property.

Filter Derm.Render.Texture.MagFilter [get, set]

Magnification filter property.

Filter Derm.Render.Texture.MinFilter [get, set]

Minification filter property.

Pixel.Type Derm.Render.Texture.PixelFormat [get, set, protected]

Texture source pixel format.

int Derm.Render.Texture.TextelDataType [get, protected]

Texture data type.

int Derm.Render.Texture.TextelFormat [get, protected]

Texture data format.

Wrap Derm.Render.Texture.WrapCoordS [get, set]

Wrapping on texture S coordinate.

Wrap Derm.Render.Texture.WrapCoordT [get, set]

Wrapping on texture T coordinate.



Services powered by Get Deus Ex Render Machina at SourceForge.net. Fast, secure and Free Open Source software downloads