[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] glmosaictext/include GLMosaicText.hxx
From: |
Tuomas J. Lukka |
Subject: |
[ff-cvs] glmosaictext/include GLMosaicText.hxx |
Date: |
Fri, 15 Aug 2003 14:38:52 -0400 |
CVSROOT: /cvsroot/glmosaictext
Module name: glmosaictext
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/08/15 14:38:52
Modified files:
include : GLMosaicText.hxx
Log message:
Unbind texture at end of rendering
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/glmosaictext/glmosaictext/include/GLMosaicText.hxx.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: glmosaictext/include/GLMosaicText.hxx
diff -u glmosaictext/include/GLMosaicText.hxx:1.4
glmosaictext/include/GLMosaicText.hxx:1.5
--- glmosaictext/include/GLMosaicText.hxx:1.4 Tue Apr 8 16:22:22 2003
+++ glmosaictext/include/GLMosaicText.hxx Fri Aug 15 14:38:52 2003
@@ -287,9 +287,9 @@
}
/** Initialize OpenGL state for rendering.
*/
- void startRendering() {
+ template<class TexBind> void startRendering(TexBind t) {
glBegin(GL_QUADS);
- curtex = Mosaic::Id(); // clear.
+ curtex = Mosaic::Id(); // clear. Id() constructs texid 0.
}
/** Render a single character.
* @return New x position.
@@ -310,8 +310,9 @@
}
/** Finish OpenGL state for rendering.
*/
- void endRendering() {
+ template<class TexBind> void endRendering(TexBind t) {
glEnd();
+ t(Mosaic::Id()); // clear the bound texture - bind zero.
}
};
@@ -327,12 +328,12 @@
Iterator begin, Iterator end,
float x, float y,
Vertex &vertex, TexBind t) {
- r.startRendering();
+ r.startRendering(t);
while(begin != end) {
x = r.renderChar(*begin, x, y, vertex, t);
begin++;
}
- r.endRendering();
+ r.endRendering(t);
return x;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ff-cvs] glmosaictext/include GLMosaicText.hxx,
Tuomas J. Lukka <=