/[gzz]/gzz/gfx/libpaper/Paper.hxx
ViewVC logotype

Diff of /gzz/gfx/libpaper/Paper.hxx

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

revision 1.13 by humppake, Mon Sep 30 06:44:22 2002 UTC revision 1.14 by humppake, Thu Oct 10 06:28:53 2002 UTC
# Line 19  using namespace CallGL; Line 19  using namespace CallGL;
19   * backgrounds.   * backgrounds.
20   */   */
21  namespace Paper {  namespace Paper {
       
   /** Toggles (after 0.8Alpha4) the use of vertex program extension. */  
   extern bool useVertexProgram;  
   
22      using namespace Vec23;      using namespace Vec23;
23    
24      /** Specifies texture coordinate system and      /** Specifies texture coordinate system and
# Line 100  namespace Paper { Line 96  namespace Paper {
96      float tex_mat[16];      float tex_mat[16];
97            
98    public:    public:
99      /** Pointer to current translation matrix used in vertex_explicit(). */      /** Pointer to current translation matrix used in texcoords_explicit(). */
100      const float *explicit_mat;      const float *explicit_mat;
101                
102      /** Creates a new TexGen.      /** Creates a new TexGen.
# Line 130  namespace Paper { Line 126  namespace Paper {
126    protected:    protected:
127      /** Amount to shift the texture towards the light. */      /** Amount to shift the texture towards the light. */
128      float eps;      float eps;
129      /**  When embossing (depends of LightParam), vertex_explicit() needs      /**  When embossing (depends of LightParam), texcoords_explicit() needs
130       * a different matrix to transform paper position into texture coordinates.       * a different matrix to transform paper position into embossed
131         * texture coordinates.
132       */       */
133      float explicit_tmp_mat[16];      float explicit_tmp_mat[16];
134    
# Line 188  namespace Paper { Line 185  namespace Paper {
185       *       *
186       *   3) using explicit coordinates       *   3) using explicit coordinates
187       *     - call setUp_explicit with LightParam to use       *     - call setUp_explicit with LightParam to use
188       *     - call vertex_explicit() with paper coordinates in       *     - call texcoords_explicit() with paper coordinates in
189       *       arrays of 4 floats and call glVertex*() directly       *       arrays of 4 floats and call glVertex*() directly
190       *       from the context.       *       from the context.
191       *     - call teardown_explicit()       *     - call teardown_explicit()
# Line 244  namespace Paper { Line 241  namespace Paper {
241       * @param ppos position within paper (array of 4 floats)       * @param ppos position within paper (array of 4 floats)
242       */       */
243      void vertex_VP(float *pos, float *ppos) {      void vertex_VP(float *pos, float *ppos) {
244        vertex_VP(ppos);        texcoords_VP(ppos);
245        glVertex4fv(pos);        glVertex4fv(pos);
246      }      }
247      void vertex_VP(float *ppos) {      void texcoords_VP(float *ppos) {
248        glTexCoord4fv(ppos);        glTexCoord4fv(ppos);
249      }      }
250                        
# Line 262  namespace Paper { Line 259  namespace Paper {
259       */       */
260      void tearDown_explicit () { teardowncode(); }      void tearDown_explicit () { teardowncode(); }
261    
262      /** Explicit version of the PaperPass vertex.      /** Explicit version of the PaperPass texcoords.
263       */       */
264      void vertex_explicit(float *ppos);      void texcoords_explicit(float *ppos);
265                        
266    protected:    protected:
267      /* Vertex program code. */      /* Vertex program code. */

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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