Public Member Functions | |
PtFBOData () | |
PtFBOData (String bufferName) | |
void | CreateBuffer (int width, int height, int numRenderTargets, PtFBOBufferMode fboBufferMode) |
void | ReleaseBuffer () |
void | CheckFrameBufferStatus (String phase) |
void | ActivateFrameBuffer (bool setViewPortToBuffer) |
void | DeActivateFrameBuffer () |
void | BindTexture () |
void | BindAndActivateTexture (int target) |
void | BindBackTexture () |
void | BindDepthTexture () |
void | UnBindTexture () |
void | UnBindAndDeactivateTexture (int target) |
void | ClearBuffer (Vertex3f clearColor) |
void | RenderTextureToViewPort (int width, int height) |
float[] | GetTextureData () |
void | GetTextureData (out float[] data, out int width, out int height) |
Byte[] | GetTextureDataBytes () |
void | CopyTextureFromFBO (int fromFrameBufferId) |
void | SetTextureData (float[] data) |
float[] | GetDepthTextureData (bool activeBuffer) |
Properties | |
int | FrameBufferID [get] |
int | Width [get] |
int | Height [get] |
Powertek.OpenGl.PtFBOData.PtFBOData | ( | ) |
Powertek.OpenGl.PtFBOData.PtFBOData | ( | String | bufferName | ) |
void Powertek.OpenGl.PtFBOData.ActivateFrameBuffer | ( | bool | setViewPortToBuffer | ) |
Activate the framebuffer.
setViewPortToBuffer |
void Powertek.OpenGl.PtFBOData.BindAndActivateTexture | ( | int | target | ) |
Bind Framebuffer Texture and actiave the Texture unit (GL_TEXTURE0 etc).
target |
void Powertek.OpenGl.PtFBOData.BindBackTexture | ( | ) |
BindBackTexture.
void Powertek.OpenGl.PtFBOData.BindDepthTexture | ( | ) |
Bind Depthbuffer Texture.
void Powertek.OpenGl.PtFBOData.BindTexture | ( | ) |
Bind Framebuffer Texture.
void Powertek.OpenGl.PtFBOData.CheckFrameBufferStatus | ( | String | phase | ) |
Check the Status of the buffer.
phase |
void Powertek.OpenGl.PtFBOData.ClearBuffer | ( | Vertex3f | clearColor | ) |
Erase the BufferTexture with the given color.
clearColor |
void Powertek.OpenGl.PtFBOData.CopyTextureFromFBO | ( | int | fromFrameBufferId | ) |
both buffers must have the same dimensions and configurations (textures + depth)
fromFrameBufferId |
void Powertek.OpenGl.PtFBOData.CreateBuffer | ( | int | width, | |
int | height, | |||
int | numRenderTargets, | |||
PtFBOBufferMode | fboBufferMode | |||
) |
Default min mag = Gl.GL_NEAREST, for depthbuffer or shadowMapping use Gl.GL_NEAREST.
width | ||
height | ||
numRenderTargets | ||
fboBufferMode |
void Powertek.OpenGl.PtFBOData.DeActivateFrameBuffer | ( | ) |
Deactivate the buffer.
float [] Powertek.OpenGl.PtFBOData.GetDepthTextureData | ( | bool | activeBuffer | ) |
This will read the content of the depth buffer We can only read the buffer if it is enabled, if it isnt set active to true.
activeBuffer | we can only read the buffer |
void Powertek.OpenGl.PtFBOData.GetTextureData | ( | out float[] | data, | |
out int | width, | |||
out int | height | |||
) |
Return Buffer Texture Data as float.
data | 4 * Width * Height as float | |
width | ||
height |
float [] Powertek.OpenGl.PtFBOData.GetTextureData | ( | ) |
Return Buffer Texture Data as float.
Byte [] Powertek.OpenGl.PtFBOData.GetTextureDataBytes | ( | ) |
Return Buffer Texture Data as Byte (will be converted from internally float 0..1 to 0..255).
void Powertek.OpenGl.PtFBOData.ReleaseBuffer | ( | ) |
Release the FrameBuffer.
void Powertek.OpenGl.PtFBOData.RenderTextureToViewPort | ( | int | width, | |
int | height | |||
) |
RenderTextureToViewPort.
width | ||
height |
void Powertek.OpenGl.PtFBOData.SetTextureData | ( | float[] | data | ) |
Set Texture Data.
data |
void Powertek.OpenGl.PtFBOData.UnBindAndDeactivateTexture | ( | int | target | ) |
UnBindAndDeactivateTexture.
target |
void Powertek.OpenGl.PtFBOData.UnBindTexture | ( | ) |
UnBind Depthbuffer Texture.
int Powertek.OpenGl.PtFBOData.FrameBufferID [get] |
Return the OpenGL Id of the framebuffer.
int Powertek.OpenGl.PtFBOData.Height [get] |
Framebuffer Height.
int Powertek.OpenGl.PtFBOData.Width [get] |
Framebuffer Width.