/[libvob]/libvob/include/vob/paper/Paper.hxx
ViewVC logotype

Diff of /libvob/include/vob/paper/Paper.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Wed Mar 26 13:15:03 2003 UTC revision 1.2 by tjl, Fri Oct 10 13:52:20 2003 UTC
# Line 41  using boost::shared_ptr; Line 41  using boost::shared_ptr;
41  #include "callgl.hxx"  #include "callgl.hxx"
42  #include "callgl_objects.hxx"  #include "callgl_objects.hxx"
43    
44  #include "vob/Vec23.hxx"  #include <vob/Vec23.hxx>
45    
46    #include <vob/IndirectTexture.hxx>
47    
48  namespace Vob {  namespace Vob {
49    
# Line 57  namespace Paper { Line 59  namespace Paper {
59       */       */
60      class LightParam {      class LightParam {
61      public:      public:
62        /** Paper coordinate system basis vectors and origin in object coordinates.        /** Paper coordinate system basis vectors and origin in object
63           * coordinates.
64         * Paper coordinates x, y, (and z) are mapped to         * Paper coordinates x, y, (and z) are mapped to
65         * object position (orig + x e0 + y e1 + z e2).         * object position (orig + x e0 + y e1 + z e2).
66         * For the eye-linear TexGens, the basis and origin vectors are transformed         * For the eye-linear TexGens, the basis and origin vectors
67         * to eye coordinates using the modelview matrix in effect at the time the         * are transformed
68           * to eye coordinates using the modelview matrix in effect
69           * at the time the
70         * TexGen::setUp method is called.         * TexGen::setUp method is called.
71         * Thus, after setup, the user can switch to a different coordinate         * Thus, after setup, the user can switch to a different coordinate
72         * system for drawing the paper vertices.         * system for drawing the paper vertices.
# Line 96  namespace Paper { Line 101  namespace Paper {
101      class BlendColorSetup : public LightSetup {      class BlendColorSetup : public LightSetup {
102      public:      public:
103        virtual void setUp(LightParam *param) {        virtual void setUp(LightParam *param) {
104          glBlendColor(param->color[0], param->color[1], param->color[2], param->color[3]);          glBlendColor(param->color[0],
105                         param->color[1],
106                         param->color[2],
107                         param->color[3]);
108        }        }
109      };      };
110    
# Line 126  namespace Paper { Line 134  namespace Paper {
134      float tex_mat[16];      float tex_mat[16];
135            
136    public:    public:
137      /** Pointer to current translation matrix used in texcoords_explicit(). */      /** Pointer to current translation matrix used in
138         * texcoords_explicit().
139         */
140      const float *explicit_mat;      const float *explicit_mat;
141                
142      /** Creates a new TexGen.      /** Creates a new TexGen.
# Line 227  namespace Paper { Line 237  namespace Paper {
237       * unless it's  already loaded.       * unless it's  already loaded.
238       */       */
239      void loadVP();      void loadVP();
240    
241        /** Call setupcode and indirect texture binds.
242         */
243        void independentSetup();
244        /** Call teardown and indirect texture binds.
245         */
246        void independentTeardown();
247            
248    public:    public:
249      /** The code to call before beginning to render the pass. */      /** The code to call before beginning to render the pass. */
250      CallGLCode setupcode;      CallGLCode setupcode;
251      /** The code to call after rendering the pass. */      /** The code to call after rendering the pass. */
252      CallGLCode teardowncode;      CallGLCode teardowncode;
253    
254            
255        /** The indirect textures to be bound for this pass.
256         */
257        vector<shared_ptr<IndirectTextureBind> > indirectTextureBinds;
258    
259      /** The TexGen objects for the different texture units. */      /** The TexGen objects for the different texture units. */
260      vector<shared_ptr<TexGen> > texgen;      vector<shared_ptr<TexGen> > texgen;
261      /** The non-texgen light setup routines. */      /** The non-texgen light setup routines. */
# Line 248  namespace Paper { Line 270  namespace Paper {
270    
271      /** Calls teardowncode.      /** Calls teardowncode.
272       */       */
273      void tearDown_texgen () { teardowncode(); }      void tearDown_texgen () { independentTeardown(); }
274    
275      /*** Vertex program version of the rendering interface. */      /*** Vertex program version of the rendering interface. */
276      /** Calls setupcode, texgen and setup for the texture.      /** Calls setupcode, texgen and setup for the texture.
# Line 287  namespace Paper { Line 309  namespace Paper {
309    
310      /** Calls teardowncode.      /** Calls teardowncode.
311       */       */
312      void tearDown_explicit () { teardowncode(); }      void tearDown_explicit () { independentTeardown(); }
313    
314      /** Explicit version of the PaperPass texcoords.      /** Explicit version of the PaperPass texcoords.
315       */       */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26