OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
Public Types | Public Member Functions | List of all members
Engine::FrameBuffer Class Reference

The FrameBuffer class. More...

#include <framebuffer.h>

Public Types

enum  {
  FB_TEXTURE_ARRAY0, FB_TEXTURE_ARRAY1, FB_TEXTURE_ARRAY2, FB_TEXTURE_ARRAY3,
  FB_TEXTURE_ARRAY4, FB_TEXTURE_ARRAY5, FB_TEXTURE_ARRAY6, FB_TEXTURE_ARRAY7,
  FB_TEXTURE_ARRAY8, FB_TEXTURE_ARRAY9, FB_TEXTURE_ARRAY10, FB_TEXTURE_ARRAY11,
  FB_TEXTURE_ARRAY12, FB_TEXTURE_ARRAY13, FB_TEXTURE_ARRAY14, FB_TEXTURE_ARRAY15
}
 

Public Member Functions

 FrameBuffer (int width, int height)
 
void ReadFrameBuffer (void)
 ReadFrameBuffer. More...
 
void DrawFrameBuffer (void)
 DrawFrameBuffer. More...
 
void BindFrameBuffer (void)
 BindFrameBuffer. More...
 
void Unbind ()
 Unbind.
 
void BindTextureArray (Texture *texture, GLenum attachment)
 FrameBuffer::BindTextureArray. More...
 
void AddTexture (Texture *texture, GLenum attachment)
 
void BindTextureLayer (Texture *texture, int layer, GLenum attachment)
 FrameBuffer::BindTextureLayer. More...
 
void BindTexture (Texture *texture, GLenum attachment)
 FrameBuffer::BindTexture. More...
 
void BindRenderBuffer (Texture *texture, GLenum attachment)
 FrameBuffer::BindRenderBuffer. More...
 
TexturegetRenderBuffer (GLenum attachment)
 getRenderBuffer More...
 
TexturegetTexture (GLenum attachment)
 getTexture More...
 
int getFrameWidth (void)
 getFrameWidth More...
 
int getFrameHeight (void)
 getFrameHeight More...
 

Detailed Description

The FrameBuffer class.

Member Function Documentation

void FrameBuffer::BindFrameBuffer ( void  )

BindFrameBuffer.

Bind Framebuffer - render to texture

void FrameBuffer::BindRenderBuffer ( Texture texture,
GLenum  attachment 
)

FrameBuffer::BindRenderBuffer.

Attachments:

-> diffuse : GL_COLOR_ATTACHMENT0 -> position : GL_COLOR_ATTACHMENT1 -> normals : GL_COLOR_ATTACHMENT2 -> depth : GL_DEPTH_ATTACHMENT

Parameters
texture
attachment-> diffuse : GL_COLOR_ATTACHMENT0 -> position : GL_COLOR_ATTACHMENT1 -> normals : GL_COLOR_ATTACHMENT2 -> depth : GL_DEPTH_ATTACHMENT
texture
attachment
void FrameBuffer::BindTexture ( Texture texture,
GLenum  attachment 
)

FrameBuffer::BindTexture.

Attachments:

-> diffuse : GL_COLOR_ATTACHMENT0 -> position : GL_COLOR_ATTACHMENT1 -> normals : GL_COLOR_ATTACHMENT2

Parameters
texture
attachment-> diffuse : GL_COLOR_ATTACHMENT0 -> position : GL_COLOR_ATTACHMENT1 -> normals : GL_COLOR_ATTACHMENT2 -> depth : GL_DEPTH_ATTACHMENT
texture
attachment
void FrameBuffer::BindTextureArray ( Texture texture,
GLenum  attachment 
)

FrameBuffer::BindTextureArray.

Texture : Texture Array Attachments : FB_TEXTURE_ARRAY0 + i

Parameters
texture
attachment
void FrameBuffer::BindTextureLayer ( Texture texture,
int  layer,
GLenum  attachment 
)

FrameBuffer::BindTextureLayer.

Texture : Texture Array Attachments : GL_COLOR_ATTACHMENT0 + i Layer : Texture Position from Array

Parameters
texture
attachment
layerTexture : Texture Array Attachments: GL_COLOR_ATTACHMENT0 + i Layer : Texture Position from Array
texture
attachment
layer
void FrameBuffer::DrawFrameBuffer ( void  )

DrawFrameBuffer.

Enable Draw Mode

int FrameBuffer::getFrameHeight ( void  )

getFrameHeight

Return Frame height size

Returns
int FrameBuffer::getFrameWidth ( void  )

getFrameWidth

Return Frame width size

Returns
Texture * FrameBuffer::getRenderBuffer ( GLenum  attachment)

getRenderBuffer

Return RenderBuffer when is Binded

Parameters
attachment
Returns
Texture * FrameBuffer::getTexture ( GLenum  attachment)

getTexture

Return Texture wen is Binded

Parameters
attachment
Returns
void FrameBuffer::ReadFrameBuffer ( void  )

ReadFrameBuffer.

Enable Read Mode


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