X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilders%2Ffont.cpp;h=44ffafa176142300c2e0eb07aab74290541bd904;hb=cd5f37b066352119cf92d53d0001af7ff99be437;hp=5990c57d7223771410edadcfb69a9df13ea39fe0;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/builders/font.cpp b/source/builders/font.cpp index 5990c57d..44ffafa1 100644 --- a/source/builders/font.cpp +++ b/source/builders/font.cpp @@ -1,6 +1,6 @@ #include #include -#include "bindable.h" +#include #include "gl.h" #include "font.h" #include "primitivebuilder.h" @@ -26,7 +26,6 @@ Font::~Font() void Font::set_texture(const Texture2D &t) { texture = &t; - texture.keep(); } const Texture2D &Font::get_texture() const @@ -193,13 +192,13 @@ void Font::Loader::texture() { RefPtr tex = new Texture2D; load_sub(*tex); - obj.texture = tex; + get_collection().add(FS::basename(get_source())+".tex2d", tex.get()); + obj.texture = tex.release(); } void Font::Loader::texture_ref(const string &name) { obj.texture = &get_collection().get(name); - obj.texture.keep(); }