Browse Source

fix build without freetype

David Rose 17 years ago
parent
commit
5e18148ee3
2 changed files with 8 additions and 1 deletions
  1. 6 1
      panda/src/text/geomTextGlyph.h
  2. 2 0
      panda/src/text/textAssembler.I

+ 6 - 1
panda/src/text/geomTextGlyph.h

@@ -16,10 +16,10 @@
 #define GEOMTEXTGLYPH_H
 #define GEOMTEXTGLYPH_H
 
 
 #include "pandabase.h"
 #include "pandabase.h"
+#include "geom.h"
 
 
 #ifdef HAVE_FREETYPE
 #ifdef HAVE_FREETYPE
 
 
-#include "geom.h"
 #include "dynamicTextGlyph.h"
 #include "dynamicTextGlyph.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -77,6 +77,11 @@ private:
 
 
 #include "geomTextGlyph.I"
 #include "geomTextGlyph.I"
 
 
+#else  // HAVE_FREETYPE
+
+// Without Freetype, a GeomTextGlyph is really just an ordinary Geom.
+typedef Geom GeomTextGlyph;
+
 #endif  // HAVE_FREETYPE
 #endif  // HAVE_FREETYPE
 
 
 #endif // GEOMTEXTGLYPH_H
 #endif // GEOMTEXTGLYPH_H

+ 2 - 0
panda/src/text/textAssembler.I

@@ -558,5 +558,7 @@ operator < (const TextAssembler::GeomCollectorKey &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void TextAssembler::GeomCollector::
 INLINE void TextAssembler::GeomCollector::
 count_geom(const Geom *geom) {
 count_geom(const Geom *geom) {
+#ifdef HAVE_FREETYPE
   _geom->count_geom(geom);
   _geom->count_geom(geom);
+#endif
 }
 }