Inherited by Powertek.OpenGl.PtPixelTexture.
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] |
| Powertek.OpenGl.PtTexture2d.PtTexture2d | ( | ) |
| 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.
| width | ||
| height | ||
| internalFormat | ||
| format | ||
| type | ||
| WRAP_S | ||
| WRAP_T | ||
| MIN_FILTER | ||
| MAG_FILTER |
| void Powertek.OpenGl.PtTexture2d.DetectTextureFormat | ( | ref Bitmap | bmp | ) | [protected] |
DetectTextureFormat.
| bmp |
| void Powertek.OpenGl.PtTexture2d.ExchangeTextureID | ( | ref PtTexture2d | texture | ) |
exchange the opengl texture id between 2 textures
| 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
| bmp |
| void Powertek.OpenGl.PtTexture2d.GetTextureData | ( | out float[] | pixels, | |
| out int | width, | |||
| out int | height | |||
| ) |
Return texture data as float array.
| pixels | 4 * Width * height float array | |
| width | ||
| height |
| void Powertek.OpenGl.PtTexture2d.GetTextureData | ( | out Bitmap | bmp | ) |
Return Texture Data as Bitmap.
| bmp |
| int Powertek.OpenGl.PtTexture2d.GetTextureID | ( | ) |
return opengl texture Id
| Bitmap Powertek.OpenGl.PtTexture2d.LoadBitmapFromFile | ( | ) | [protected] |
Load from file.
| 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.
| filename | ||
| WRAP_S | ||
| WRAP_T | ||
| MIN_FILTER | ||
| MAG_FILTER | ||
| useMipMaps | ||
| flipTextureY | ||
| aniosotropicLevel |
Reimplemented in Powertek.OpenGl.PtPixelTexture.
| virtual bool Powertek.OpenGl.PtTexture2d.LoadFromFile | ( | String | filename | ) | [virtual] |
Load Texture from file.
| filename |
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...
| newID |
| void Powertek.OpenGl.PtTexture2d.SetViewportToTexture | ( | ) |
SetViewportToTexture.
| void Powertek.OpenGl.PtTexture2d.UnBind | ( | ) |
Remove Texture Bind.
int Powertek.OpenGl.PtTexture2d._aniosotropicLevel = 0 [protected] |
Aniosotropic Texture Filtering Level, 0 = off.
bool Powertek.OpenGl.PtTexture2d._autoDetectTextureFormat = false [protected] |
Use Autodetection of Texture Format.
String Powertek.OpenGl.PtTexture2d._filename = "" [protected] |
Texture Filename.
bool Powertek.OpenGl.PtTexture2d._flipTextureY = true [protected] |
Flip Texture Vertically.
int Powertek.OpenGl.PtTexture2d._format = 0 [protected] |
Texture Format.
int Powertek.OpenGl.PtTexture2d._height = 0 [protected] |
Texture Height.
int Powertek.OpenGl.PtTexture2d._internalFormat = 0 [protected] |
Internal Texture Format.
bool Powertek.OpenGl.PtTexture2d._isBumpMap = false [protected] |
Indicates a bumpMap.
int Powertek.OpenGl.PtTexture2d._magFilter = 0 [protected] |
Max Filter.
int Powertek.OpenGl.PtTexture2d._minFilter = 0 [protected] |
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.
int Powertek.OpenGl.PtTexture2d._width = 0 [protected] |
Texture Width.
int Powertek.OpenGl.PtTexture2d._wrapS = 0 [protected] |
Texture Wrap S.
int Powertek.OpenGl.PtTexture2d._wrapT = 0 [protected] |
Texture Wrap T.
String Powertek.OpenGl.PtTexture2d.Filename [get] |
Texture Filename.
int Powertek.OpenGl.PtTexture2d.Height [get] |
Texture Height.
int Powertek.OpenGl.PtTexture2d.Width [get] |
Texture Width.
1.5.7.1