Powertek.OpenGl.PtTexture2d Class Reference

PtTexture2d. More...

Inherited by Powertek.OpenGl.PtPixelTexture.

List of all members.

Public Member Functions

 PtTexture2d ()
virtual bool LoadFromFile (String filename)
virtual bool LoadFromFile (String filename, int WRAP_S, int WRAP_T, int MIN_FILTER, int MAG_FILTER, bool useMipMaps, bool flipTextureY, int aniosotropicLevel)
void CreateEmptyTexture (int width, int height, int internalFormat, int format, int type, int WRAP_S, int WRAP_T, int MIN_FILTER, int MAG_FILTER)
void Bind ()
void UnBind ()
void Clear ()
void SetViewportToTexture ()
int GetTextureID ()
void SetTextureID (int newID)
void ExchangeTextureID (ref PtTexture2d texture)
void GetTextureData (out Bitmap bmp)
void GetTextureData (out float[] pixels, out int width, out int height)

Protected Member Functions

void SetDefaultParams ()
Bitmap LoadBitmapFromFile ()
bool GenTextureFromBitmap (Bitmap bmp)
void GenEmptyTexture ()
void DetectTextureFormat (ref Bitmap bmp)

Protected Attributes

int[] _texture = null
int _width = 0
int _height = 0
int _internalFormat = 0
int _format = 0
int _wrapS = 0
int _wrapT = 0
int _minFilter = 0
int _magFilter = 0
String _filename = ""
bool _flipTextureY = true
bool _autoDetectTextureFormat = false
int _type = 0
bool _useMipMaps = true
int _aniosotropicLevel = 0
bool _isBumpMap = false

Properties

int Width [get]
int Height [get]
String Filename [get]


Detailed Description


Constructor & Destructor Documentation

Powertek.OpenGl.PtTexture2d.PtTexture2d (  ) 


Member Function Documentation

void Powertek.OpenGl.PtTexture2d.Bind (  ) 

Bind Texture.

void Powertek.OpenGl.PtTexture2d.Clear (  ) 

Clear Texture.

void Powertek.OpenGl.PtTexture2d.CreateEmptyTexture ( int  width,
int  height,
int  internalFormat,
int  format,
int  type,
int  WRAP_S,
int  WRAP_T,
int  MIN_FILTER,
int  MAG_FILTER 
)

Create an empty OpenGL Texture.

Parameters:
width 
height 
internalFormat 
format 
type 
WRAP_S 
WRAP_T 
MIN_FILTER 
MAG_FILTER 

void Powertek.OpenGl.PtTexture2d.DetectTextureFormat ( ref Bitmap  bmp  )  [protected]

DetectTextureFormat.

Parameters:
bmp 

void Powertek.OpenGl.PtTexture2d.ExchangeTextureID ( ref PtTexture2d  texture  ) 

exchange the opengl texture id between 2 textures

Parameters:
texture 

void Powertek.OpenGl.PtTexture2d.GenEmptyTexture (  )  [protected]

generate an empty gl texture

bool Powertek.OpenGl.PtTexture2d.GenTextureFromBitmap ( Bitmap  bmp  )  [protected]

upload our bitmap to opengl

Parameters:
bmp 
Returns:

void Powertek.OpenGl.PtTexture2d.GetTextureData ( out float[]  pixels,
out int  width,
out int  height 
)

Return texture data as float array.

Parameters:
pixels 4 * Width * height float array
width 
height 

void Powertek.OpenGl.PtTexture2d.GetTextureData ( out Bitmap  bmp  ) 

Return Texture Data as Bitmap.

Parameters:
bmp 

int Powertek.OpenGl.PtTexture2d.GetTextureID (  ) 

return opengl texture Id

Returns:

Bitmap Powertek.OpenGl.PtTexture2d.LoadBitmapFromFile (  )  [protected]

Load from file.

Returns:

virtual bool Powertek.OpenGl.PtTexture2d.LoadFromFile ( String  filename,
int  WRAP_S,
int  WRAP_T,
int  MIN_FILTER,
int  MAG_FILTER,
bool  useMipMaps,
bool  flipTextureY,
int  aniosotropicLevel 
) [virtual]

Load Texture from file.

Parameters:
filename 
WRAP_S 
WRAP_T 
MIN_FILTER 
MAG_FILTER 
useMipMaps 
flipTextureY 
aniosotropicLevel 
Returns:

Reimplemented in Powertek.OpenGl.PtPixelTexture.

virtual bool Powertek.OpenGl.PtTexture2d.LoadFromFile ( String  filename  )  [virtual]

Load Texture from file.

Parameters:
filename 
Returns:

Reimplemented in Powertek.OpenGl.PtPixelTexture.

void Powertek.OpenGl.PtTexture2d.SetDefaultParams (  )  [protected]

Set Default Texture Params.

void Powertek.OpenGl.PtTexture2d.SetTextureID ( int  newID  ) 

Set new texure ID, use this with caution...

Parameters:
newID 

void Powertek.OpenGl.PtTexture2d.SetViewportToTexture (  ) 

SetViewportToTexture.

void Powertek.OpenGl.PtTexture2d.UnBind (  ) 

Remove Texture Bind.


Member Data Documentation

Aniosotropic Texture Filtering Level, 0 = off.

Use Autodetection of Texture Format.

String Powertek.OpenGl.PtTexture2d._filename = "" [protected]

Texture Filename.

Flip Texture Vertically.

Texture Format.

Texture Height.

Internal Texture Format.

bool Powertek.OpenGl.PtTexture2d._isBumpMap = false [protected]

Indicates a bumpMap.

Max Filter.

Min Filter.

int [] Powertek.OpenGl.PtTexture2d._texture = null [protected]

Texure ID.

int Powertek.OpenGl.PtTexture2d._type = 0 [protected]

Internal Type.

bool Powertek.OpenGl.PtTexture2d._useMipMaps = true [protected]

Use MipMap Generation.

Texture Width.

Texture Wrap S.

Texture Wrap T.


Property Documentation

String Powertek.OpenGl.PtTexture2d.Filename [get]

Texture Filename.

int Powertek.OpenGl.PtTexture2d.Height [get]

Texture Height.

int Powertek.OpenGl.PtTexture2d.Width [get]

Texture Width.


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

Generated on Thu Nov 20 04:46:33 2008 for Powertek.OpenGl, 2.0.6.64 by  doxygen 1.5.7.1