]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/text.h
Make Text more flexible about which texture slot it uses
[libs/gl.git] / source / render / text.h
index 40c9b8500097d1591f8be68b1ad6b3234870729b..cbcef957f8be9b0293f687732e6dfec72660a00c 100644 (file)
@@ -41,13 +41,14 @@ private:
        float width;
 
 public:
-       Text(const Font &, const Technique * = 0);
+       Text(const Font &, const Technique * = 0, const std::string & = std::string());
 
        const Mesh *get_mesh() const { return &mesh; }
 
-       /** Sets technique to render with.  It should have a texture slot named
-       "diffuse_map", which will be replaced with the font's texture. */
-       void set_technique(const Technique *);
+       /** Sets technique to render with, replacing the given texture slot with
+       the font texture.  If no texture slot is specified, heuristics are used to
+       choose a suitable one. */
+       void set_technique(const Technique *, const std::string & = std::string());
 
        const Technique *get_technique() const { return object.get_technique(); }