Changeset 2593


Ignore:
Timestamp:
Mar 15, 2013, 11:14:16 AM (10 years ago)
Author:
sam
Message:

gpu: rename FrameBuffer to Framebuffer.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/framebuffer.cpp

    r2592 r2593  
    3434
    3535//
    36 // The FrameBufferData class
     36// The FramebufferData class
    3737// -------------------------
    3838//
    3939
    40 class FrameBufferData
    41 {
    42     friend class FrameBuffer;
     40class FramebufferData
     41{
     42    friend class Framebuffer;
    4343
    4444    ivec2 m_size;
     
    5656
    5757//
    58 // The FrameBufferFormat struct
     58// The FramebufferFormat struct
    5959// ----------------------
    6060//
    6161
    62 uint32_t FrameBufferFormat::GetFormat()
     62uint32_t FramebufferFormat::GetFormat()
    6363{
    6464    switch (m_format)
     
    157157}
    158158
    159 uint32_t FrameBufferFormat::GetFormatOrder()
     159uint32_t FramebufferFormat::GetFormatOrder()
    160160{
    161161    switch (m_format)
     
    227227
    228228//
    229 // The FrameBuffer class
     229// The Framebuffer class
    230230// ----------------------
    231231//
    232232
    233 FrameBuffer::FrameBuffer(ivec2 size, FrameBufferFormat fbo_format)
    234   : m_data(new FrameBufferData)
     233Framebuffer::Framebuffer(ivec2 size, FramebufferFormat fbo_format)
     234  : m_data(new FramebufferData)
    235235{
    236236    m_data->m_size = size;
     
    318318}
    319319
    320 FrameBuffer::~FrameBuffer()
     320Framebuffer::~Framebuffer()
    321321{
    322322#if defined USE_D3D9 || defined _XBOX
     
    338338}
    339339
    340 ShaderTexture FrameBuffer::GetTexture() const
     340ShaderTexture Framebuffer::GetTexture() const
    341341{
    342342    ShaderTexture ret;
     
    349349}
    350350
    351 ivec2 FrameBuffer::GetSize() const
     351ivec2 Framebuffer::GetSize() const
    352352{
    353353    return m_data->m_size;
    354354}
    355355
    356 void FrameBuffer::Bind()
     356void Framebuffer::Bind()
    357357{
    358358#if defined USE_D3D9 || defined _XBOX
     
    372372}
    373373
    374 void FrameBuffer::Unbind()
     374void Framebuffer::Unbind()
    375375{
    376376#if defined USE_D3D9
  • trunk/src/lol/gpu/framebuffer.h

    r2592 r2593  
    1010
    1111//
    12 // The FrameBuffer class
     12// The Framebuffer class
    1313// ---------------------
    1414//
     
    2222{
    2323
    24 struct FrameBufferFormat
     24struct FramebufferFormat
    2525{
    2626    enum Value
     
    8989    bool m_invert_rgb;
    9090
    91     inline FrameBufferFormat(Value format=RGBA_8, bool invert_rgb=true)
     91    inline FramebufferFormat(Value format=RGBA_8, bool invert_rgb=true)
    9292            : m_format(format), m_invert_rgb(invert_rgb) {}
    9393    inline uint32_t GetFormat();
     
    9696};
    9797
    98 class FrameBuffer
     98class Framebuffer
    9999{
    100100public:
    101     FrameBuffer(ivec2 size, FrameBufferFormat fbo_format=FrameBufferFormat());
    102     ~FrameBuffer();
     101    Framebuffer(ivec2 size, FramebufferFormat fbo_format = FramebufferFormat());
     102    ~Framebuffer();
    103103
    104104    ShaderTexture GetTexture() const;
     
    109109
    110110private:
    111     class FrameBufferData *m_data;
     111    class FramebufferData *m_data;
    112112};
    113113
  • trunk/src/lol/gpu/shader.h

    r2354 r2593  
    5050{
    5151    friend class Shader;
    52     friend class FrameBuffer;
     52    friend class Framebuffer;
    5353    friend class Texture;
    5454
  • trunk/tools/neercs/video/render.cpp

    r2587 r2593  
    842842              shader_radial_radial;
    843843
    844 FrameBuffer *fbo_back, *fbo_front, *fbo_screen;
    845 FrameBuffer *fbo_blur_h, *fbo_blur_v;
    846 FrameBuffer *fbo_tmp, *fbo_buffer;
     844Framebuffer *fbo_back, *fbo_front, *fbo_screen;
     845Framebuffer *fbo_blur_h, *fbo_blur_v;
     846Framebuffer *fbo_tmp, *fbo_buffer;
    847847
    848848void Render::TraceQuad()
     
    852852}
    853853
    854 void Render::ShaderSimple(FrameBuffer *fbo_output, int n)
     854void Render::ShaderSimple(Framebuffer *fbo_output, int n)
    855855{
    856856    shader_simple->Bind();
     
    866866    glCullFace(GL_BACK);      // don't draw front face
    867867    /* initialise framebuffer objects */
    868     fbo_back = new FrameBuffer(screen_size);
    869     fbo_screen = new FrameBuffer(screen_size);
    870     fbo_front = new FrameBuffer(screen_size);
    871     fbo_buffer = new FrameBuffer(screen_size);
    872     fbo_blur_h = new FrameBuffer(screen_size);
    873     fbo_blur_v = new FrameBuffer(screen_size);
    874     fbo_tmp = new FrameBuffer(screen_size);
     868    fbo_back = new Framebuffer(screen_size);
     869    fbo_screen = new Framebuffer(screen_size);
     870    fbo_front = new Framebuffer(screen_size);
     871    fbo_buffer = new Framebuffer(screen_size);
     872    fbo_blur_h = new Framebuffer(screen_size);
     873    fbo_blur_v = new Framebuffer(screen_size);
     874    fbo_tmp = new Framebuffer(screen_size);
    875875    // shader simple
    876876    shader_simple = Shader::Create(LOLFX_RESOURCE_NAME(simple));
  • trunk/tools/neercs/video/render.h

    r2051 r2593  
    2424    int CreateGLWindow();
    2525    int InitDraw();
    26     void ShaderSimple(FrameBuffer *fbo_output, int n);
     26    void ShaderSimple(Framebuffer *fbo_output, int n);
    2727    void TraceQuad();
    2828    void Pause();
  • trunk/tools/neercs/video/text-render.cpp

    r2318 r2593  
    8888#endif
    8989
    90     m_fbo = new FrameBuffer(m_fbo_size);
     90    m_fbo = new Framebuffer(m_fbo_size);
    9191}
    9292
  • trunk/tools/neercs/video/text-render.h

    r2318 r2593  
    2929    VertexBuffer *m_vbo1, *m_vbo2, *m_vbo3;
    3030
    31     FrameBuffer *m_fbo;
     31    Framebuffer *m_fbo;
    3232};
    3333
  • trunk/tutorial/08_fbo.cpp

    r2277 r2593  
    7171            m_vbo->Unlock();
    7272
    73             m_fbo = new FrameBuffer(Video::GetSize());
     73            m_fbo = new Framebuffer(Video::GetSize());
    7474            m_fbo->Bind();
    7575            Video::SetClearColor(vec4(0.f, 0.f, 0.f, 1.f));
     
    9191        /* FIXME: the Xbox enforces full EDRAM clears on each frame, so
    9292         * we cannot expect the render target contents to be preserved.
    93          * This code snippet should be moved inside the FrameBuffer class. */
     93         * This code snippet should be moved inside the Framebuffer class. */
    9494        m_shader->SetUniform(m_uni_flag, 1.f);
    9595        m_shader->SetUniform(m_uni_texture, m_fbo->GetTexture(), 0);
     
    127127    VertexDeclaration *m_vdecl;
    128128    VertexBuffer *m_vbo;
    129     FrameBuffer *m_fbo;
     129    Framebuffer *m_fbo;
    130130    double m_time;
    131131    vec3 m_hotspot, m_color;
  • trunk/tutorial/12_voronoi.cpp

    r2590 r2593  
    9595            for (int i = 0; i < MaxFboType; ++i)
    9696            {
    97                 m_fbos.Push(new FrameBuffer(Video::GetSize()), 0, Array<ShaderUniform>(), Array<ShaderAttrib>() );
     97                m_fbos.Push(new Framebuffer(Video::GetSize()), 0, Array<ShaderUniform>(), Array<ShaderAttrib>() );
    9898
    9999                if (i == SrcVoronoiFbo)
     
    129129            }
    130130
    131             temp_buffer = new FrameBuffer(Video::GetSize());
     131            temp_buffer = new Framebuffer(Video::GetSize());
    132132            temp_buffer->Bind();
    133133            Video::SetClearColor(vec4(0.f, 0.f, 0.f, 1.f));
     
    224224            for (int j = 0; j < voronoi_points.Count(); ++j)
    225225            {
    226                 FrameBuffer *dst_buf;
    227                 FrameBuffer *src_buf;
     226                Framebuffer *dst_buf;
     227                Framebuffer *src_buf;
    228228               
    229229                if (buf)
     
    276276            while (1)
    277277            {
    278                 FrameBuffer *dst_buf;
    279                 FrameBuffer *src_buf;
     278                Framebuffer *dst_buf;
     279                Framebuffer *src_buf;
    280280                Shader *shader;
    281281
     
    306306                /* FIXME: the Xbox enforces full EDRAM clears on each frame, so
    307307                * we cannot expect the render target contents to be preserved.
    308                 * This code snippet should be moved inside the FrameBuffer class. */
     308                * This code snippet should be moved inside the Framebuffer class. */
    309309                //m_fbos[m_cur_fbo].m2->SetUniform(m_uni_flag, 1.f);
    310310                //m_fbos[m_cur_fbo].m2->SetUniform(m_uni_texture, m_fbo->GetTexture(), 0);
     
    366366    VertexBuffer *m_vbo;
    367367
    368     Array<FrameBuffer *, Shader *, Array<ShaderUniform>, Array<ShaderAttrib> > m_fbos;
    369     FrameBuffer *temp_buffer;
     368    Array<Framebuffer *, Shader *, Array<ShaderUniform>, Array<ShaderAttrib> > m_fbos;
     369    Framebuffer *temp_buffer;
    370370
    371371    int mode;
Note: See TracChangeset for help on using the changeset viewer.