renderstack::renderbuffer Class Reference

can be attached to render_target

#include <texture.hpp>

Public Member Functions

 renderbuffer ()
 renderbuffer (int gl_renderbuffer_object)
 renderbuffer (int width, int height, int gl_format, int sample_count)
void set (int gl_renderbuffer_object)
void set (int width, int height, int gl_format, int sample_count)
unsigned int gl_renderbuffer_object () const

Detailed Description

Definition at line 36 of file texture.hpp.


Constructor & Destructor Documentation

renderstack::renderbuffer::renderbuffer (  ) 

Definition at line 32 of file texture.cpp.

00033 {
00034     m_gl_renderbuffer_object = (unsigned int)(~0);
00035 }

renderstack::renderbuffer::renderbuffer ( int  gl_renderbuffer_object  ) 

Definition at line 37 of file texture.cpp.

00038 :   m_gl_renderbuffer_object(gl_renderbuffer_object)
00039 {
00040 }

renderstack::renderbuffer::renderbuffer ( int  width,
int  height,
int  gl_format,
int  sample_count 
)

Definition at line 42 of file texture.cpp.

00043 {
00044     m_gl_renderbuffer_object = (unsigned int)(~0);
00045     set(width, height, gl_format, sample_count);
00046 }


Member Function Documentation

void renderstack::renderbuffer::set ( int  gl_renderbuffer_object  ) 

Definition at line 48 of file texture.cpp.

00049 {
00050     ::GLboolean is_renderbuffer = ::rs_gl_is_renderbuffer(m_gl_renderbuffer_object);
00051     if(is_renderbuffer)
00052     {
00053         ::rs_gl_delete_renderbuffers(1, &m_gl_renderbuffer_object);
00054     }
00055     m_gl_renderbuffer_object = gl_renderbuffer_object;
00056 }

void renderstack::renderbuffer::set ( int  width,
int  height,
int  gl_format,
int  sample_count 
)

Definition at line 58 of file texture.cpp.

00059 {
00060     ::GLboolean is_renderbuffer = ::rs_gl_is_renderbuffer(m_gl_renderbuffer_object);
00061     if(is_renderbuffer)
00062     {
00063         ::rs_gl_delete_renderbuffers(1, &m_gl_renderbuffer_object);
00064     }
00065     ::rs_gl_gen_renderbuffers(1, &m_gl_renderbuffer_object);
00066 
00067     ::rs_gl_bind_renderbuffer(GL_RENDERBUFFER, m_gl_renderbuffer_object);
00068 
00069     ::rs_gl_renderbuffer_storage_multisample(
00070         GL_RENDERBUFFER,    /*  target              */ 
00071         sample_count,       /*  samples             */ 
00072         gl_format,          /*  internal format     */ 
00073         width,              /*  width               */ 
00074         height              /*  height              */ 
00075     );
00076 }

unsigned int renderstack::renderbuffer::gl_renderbuffer_object (  )  const [inline]

Definition at line 46 of file texture.hpp.

00046 { return m_gl_renderbuffer_object; }


The documentation for this class was generated from the following files:
Generated on Sun Apr 11 12:23:12 2010 for RenderStack by  doxygen 1.6.3