Ignore:
Timestamp:
Aug 24, 2012, 3:28:43 PM (8 years ago)
Author:
sam
Message:

tutorial: fix the FBO demo on the Xbox360.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/08_fbo.cpp

    r1773 r1813  
    9191        Video::Clear(ClearMask::Depth);
    9292        m_shader->Bind();
     93
     94#if _XBOX
     95        /* FIXME: the Xbox enforces full EDRAM clears on each frame, so
     96         * we cannot expect the render target contents to be preserved.
     97         * This code snippet should be moved inside the FrameBuffer class. */
     98        m_shader->SetUniform(m_uni_flag, 1.f);
     99        m_shader->SetUniform(m_uni_texture, m_fbo->GetTexture(), 0);
     100        m_vdecl->SetStream(m_vbo, m_coord);
     101        m_vdecl->Bind();
     102        m_vdecl->DrawElements(MeshPrimitive::Triangles, 0, 2);
     103        m_vdecl->Unbind();
     104#endif
     105
    93106        m_shader->SetUniform(m_uni_flag, 0.f);
    94107        m_shader->SetUniform(m_uni_point, m_hotspot);
Note: See TracChangeset for help on using the changeset viewer.