/[glmosaictext]/glmosaictext/include/GLMosaicText.hxx
ViewVC logotype

Diff of /glmosaictext/include/GLMosaicText.hxx

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

revision 1.4 by tjl, Tue Apr 8 20:22:22 2003 UTC revision 1.5 by tjl, Fri Aug 15 18:38:52 2003 UTC
# Line 287  namespace GLMosaicText { Line 287  namespace GLMosaicText {
287          }          }
288          /** Initialize OpenGL state for rendering.          /** Initialize OpenGL state for rendering.
289           */           */
290          void startRendering() {          template<class TexBind> void startRendering(TexBind t) {
291              glBegin(GL_QUADS);              glBegin(GL_QUADS);
292              curtex = Mosaic::Id(); // clear.              curtex = Mosaic::Id(); // clear. Id() constructs texid 0.
293          }          }
294          /** Render a single character.          /** Render a single character.
295           * @return New x position.           * @return New x position.
# Line 310  namespace GLMosaicText { Line 310  namespace GLMosaicText {
310          }          }
311          /** Finish OpenGL state for rendering.          /** Finish OpenGL state for rendering.
312           */           */
313          void endRendering() {          template<class TexBind> void endRendering(TexBind t) {
314              glEnd();              glEnd();
315                t(Mosaic::Id()); // clear the bound texture - bind zero.
316          }          }
317    
318      };      };
# Line 327  namespace GLMosaicText { Line 328  namespace GLMosaicText {
328                  Iterator begin, Iterator end,                  Iterator begin, Iterator end,
329                  float x, float y,                  float x, float y,
330                  Vertex &vertex, TexBind t) {                  Vertex &vertex, TexBind t) {
331          r.startRendering();          r.startRendering(t);
332          while(begin != end) {          while(begin != end) {
333              x = r.renderChar(*begin, x, y, vertex, t);              x = r.renderChar(*begin, x, y, vertex, t);
334              begin++;              begin++;
335          }          }
336          r.endRendering();          r.endRendering(t);
337          return x;          return x;
338      }      }
339    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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