FrameBufferGL.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __FRAME_BUFFER_GL_H
00004 #define __FRAME_BUFFER_GL_H
00005 
00006 #include <gra/framebuffer/FrameBuffer.h>
00007 #include <esg/Definitions.h>
00008 #include <GL/gl.h>
00009 
00010 using namespace esg;
00011 
00012 namespace gra {
00013 
00014 class GRA_EXPORT FrameBufferGL : public FrameBuffer {
00015 public:
00021     FrameBufferGL(unsigned mode) : FrameBuffer(mode) {}
00022         
00030     FrameBufferGL(unsigned width, unsigned height, unsigned mode)
00031         : FrameBuffer(width, height, mode) { glViewport(0, 0, width, height); }
00032     
00036     virtual ~FrameBufferGL() {}
00037 
00042     virtual void showContent() { glFlush(); }
00043 
00047     virtual void setWidth (unsigned);
00048     virtual void setHeight(unsigned);
00049 
00062     virtual void setColor(const Camera&  /* camera */,
00063                           unsigned       /* posX   */,
00064                           unsigned       /* posY   */,
00065                           float          /* depth  */,
00066                           const Color3f& /* color  */);
00067     
00068     virtual void setColor(const Camera&  /* camera */,
00069                           unsigned       /* posX   */,
00070                           unsigned       /* posY   */,
00071                           const Color3f& /* color  */);
00072 
00086     virtual void setColors(const Camera&    /* camera */,
00087                            unsigned         /* posX   */,
00088                            unsigned         /* posY   */,
00089                            float            /* depth  */,
00090                            const Color3f [] /* colors */,
00091                            unsigned         /* size   */);
00092     
00093     virtual void setColors(const Camera&    /* camera */,
00094                            unsigned         /* posX   */,
00095                            unsigned         /* posY   */,
00096                            const Color3f [] /* colors */,
00097                            unsigned         /* size   */);
00098 
00109     virtual Color3f getColor(unsigned /* posX */,
00110                              unsigned /* posY */) const;
00111 
00117     virtual void clearColor(const Color3f& /* color */);
00118 
00119 
00120 #if 0    
00121     virtual int      init      ();
00122     virtual int      showContent ();
00123     virtual int      getWidth  () const   = 0;
00124     virtual int      getHeight () const   = 0;
00125     virtual int      setWidth  (unsigned) = 0;
00126     virtual int      setHeight (unsigned) = 0;
00127     virtual int      setColor  (unsigned, unsigned, const Color3f&);
00128     virtual Color3f  getColor  (unsigned, unsigned) const { return Color3f(0,0,0); }
00129     virtual int      setActive ()         = 0;
00130     virtual int      clear     (const Color3f&);
00131 #endif
00132 };
00133 
00134 } // namespace
00135 
00136 #endif // __FRAME_BUFFER_GL_H

Generated on Tue Nov 21 15:11:42 2006 for gra by  doxygen 1.4.6