]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/text.cpp
Use constructor delegation instead of init functions when possible
[libs/gl.git] / source / render / text.cpp
index b43061c522a5addbbf2ff474742efd97fb78fbef..5305de4bd5b46db5f12874aa9a03ec73e27bcd8c 100644 (file)
@@ -1,6 +1,7 @@
 #include "meshbuilder.h"
 #include "program.h"
 #include "renderer.h"
+#include "technique.h"
 #include "text.h"
 #include "texture2d.h"
 
@@ -102,7 +103,7 @@ void Text::set_alignment(float h, float v)
        unsigned n_vertices = mesh.get_n_vertices();
        for(unsigned i=0; i<n_vertices; ++i)
        {
-               float *pos = mesh.modify_vertex(i)+pos_offset;
+               float *pos = reinterpret_cast<float *>(mesh.modify_vertex(i)+pos_offset);
                pos[0] += horz_adjust;
                pos[1] += vert_adjust;
        }