Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5347 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Oct 10, 2005, 3:07:04 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: building Graphics as a lib names libORXgraphics.a

Location:
trunk/src/lib/graphics
Files:
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/Makefile.am

    r5342 r5347  
     1MAINSRCDIR=../..
     2include $(MAINSRCDIR)/defs/include_paths.am
     3
     4noinst_LIBRARIES = libORXgraphics.a
     5
     6libORXgraphics_a_SOURCES = graphics_engine.cc \
     7                           light.cc \
     8                           shader.cc \
     9                           render2D/render_2d.cc \
     10                           render2D/element_2d.cc \
     11                           text_engine/text_engine.cc \
     12                           text_engine/text.cc \
     13                           text_engine/font.cc
     14
     15noinst_HEADERS = graphics_engine.h \
     16                 light.h \
     17                 shader.h \
     18                 render2D/render_2d.h \
     19                 render2D/element_2d.h \
     20                 text_engine/text_engine.h \
     21                 text_engine/text.h \
     22                 text_engine/font.h
     23
     24
    125SUBDIRS = importer \
    226          spatial_separation
    327
    4 EXTRA_DIST = text_engine/font.xpm
     28EXTRA_DIST = text_engine/default_font.xpm
  • trunk/src/lib/graphics/Makefile.in

    r5342 r5347  
    1414
    1515@SET_MAKE@
     16
     17
     18SOURCES = $(libORXgraphics_a_SOURCES)
     19
    1620srcdir = @srcdir@
    1721top_srcdir = @top_srcdir@
     
    3640host_triplet = @host@
    3741subdir = src/lib/graphics
    38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     43        $(srcdir)/Makefile.in
    3944ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4045am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    4449CONFIG_HEADER = $(top_builddir)/config.h
    4550CONFIG_CLEAN_FILES =
    46 SOURCES =
    47 DIST_SOURCES =
     51LIBRARIES = $(noinst_LIBRARIES)
     52AR = ar
     53ARFLAGS = cru
     54libORXgraphics_a_AR = $(AR) $(ARFLAGS)
     55libORXgraphics_a_LIBADD =
     56am_libORXgraphics_a_OBJECTS = graphics_engine.$(OBJEXT) \
     57        light.$(OBJEXT) shader.$(OBJEXT) render_2d.$(OBJEXT) \
     58        element_2d.$(OBJEXT) text_engine.$(OBJEXT) text.$(OBJEXT) \
     59        font.$(OBJEXT)
     60libORXgraphics_a_OBJECTS = $(am_libORXgraphics_a_OBJECTS)
     61DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
     62depcomp = $(SHELL) $(top_srcdir)/depcomp
     63am__depfiles_maybe = depfiles
     64@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/element_2d.Po ./$(DEPDIR)/font.Po \
     65@AMDEP_TRUE@    ./$(DEPDIR)/graphics_engine.Po \
     66@AMDEP_TRUE@    ./$(DEPDIR)/light.Po ./$(DEPDIR)/render_2d.Po \
     67@AMDEP_TRUE@    ./$(DEPDIR)/shader.Po ./$(DEPDIR)/text.Po \
     68@AMDEP_TRUE@    ./$(DEPDIR)/text_engine.Po
     69CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     70        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     71CXXLD = $(CXX)
     72CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     73        -o $@
     74SOURCES = $(libORXgraphics_a_SOURCES)
     75DIST_SOURCES = $(libORXgraphics_a_SOURCES)
    4876RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
    4977        html-recursive info-recursive install-data-recursive \
     
    5280        pdf-recursive ps-recursive uninstall-info-recursive \
    5381        uninstall-recursive
     82HEADERS = $(noinst_HEADERS)
    5483ETAGS = etags
    5584CTAGS = ctags
     
    164193target_os = @target_os@
    165194target_vendor = @target_vendor@
     195MAINSRCDIR = ../..
     196noinst_LIBRARIES = libORXgraphics.a
     197libORXgraphics_a_SOURCES = graphics_engine.cc \
     198                           light.cc \
     199                           shader.cc \
     200                           render2D/render_2d.cc \
     201                           render2D/element_2d.cc \
     202                           text_engine/text_engine.cc \
     203                           text_engine/text.cc \
     204                           text_engine/font.cc
     205
     206noinst_HEADERS = graphics_engine.h \
     207                 light.h \
     208                 shader.h \
     209                 render2D/render_2d.h \
     210                 render2D/element_2d.h \
     211                 text_engine/text_engine.h \
     212                 text_engine/text.h \
     213                 text_engine/font.h
     214
    166215SUBDIRS = importer \
    167216          spatial_separation
    168217
    169 EXTRA_DIST = text_engine/font.xpm
     218EXTRA_DIST = text_engine/default_font.xpm
    170219all: all-recursive
    171220
    172221.SUFFIXES:
     222.SUFFIXES: .cc .o .obj
    173223$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
    174224        @for dep in $?; do \
     
    200250$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
    201251        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     252
     253clean-noinstLIBRARIES:
     254        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
     255libORXgraphics.a: $(libORXgraphics_a_OBJECTS) $(libORXgraphics_a_DEPENDENCIES)
     256        -rm -f libORXgraphics.a
     257        $(libORXgraphics_a_AR) libORXgraphics.a $(libORXgraphics_a_OBJECTS) $(libORXgraphics_a_LIBADD)
     258        $(RANLIB) libORXgraphics.a
     259
     260mostlyclean-compile:
     261        -rm -f *.$(OBJEXT)
     262
     263distclean-compile:
     264        -rm -f *.tab.c
     265
     266@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element_2d.Po@am__quote@
     267@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font.Po@am__quote@
     268@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@
     269@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@
     270@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render_2d.Po@am__quote@
     271@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shader.Po@am__quote@
     272@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@
     273@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
     274
     275.cc.o:
     276@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
     277@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
     278@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     279@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     280@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     281@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ $<
     282
     283.cc.obj:
     284@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
     285@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
     286@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     287@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     288@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     289@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     290
     291render_2d.o: render2D/render_2d.cc
     292@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT render_2d.o -MD -MP -MF "$(DEPDIR)/render_2d.Tpo" -c -o render_2d.o `test -f 'render2D/render_2d.cc' || echo '$(srcdir)/'`render2D/render_2d.cc; \
     293@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/render_2d.Tpo" "$(DEPDIR)/render_2d.Po"; else rm -f "$(DEPDIR)/render_2d.Tpo"; exit 1; fi
     294@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='render2D/render_2d.cc' object='render_2d.o' libtool=no @AMDEPBACKSLASH@
     295@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/render_2d.Po' tmpdepfile='$(DEPDIR)/render_2d.TPo' @AMDEPBACKSLASH@
     296@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     297@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o render_2d.o `test -f 'render2D/render_2d.cc' || echo '$(srcdir)/'`render2D/render_2d.cc
     298
     299render_2d.obj: render2D/render_2d.cc
     300@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT render_2d.obj -MD -MP -MF "$(DEPDIR)/render_2d.Tpo" -c -o render_2d.obj `if test -f 'render2D/render_2d.cc'; then $(CYGPATH_W) 'render2D/render_2d.cc'; else $(CYGPATH_W) '$(srcdir)/render2D/render_2d.cc'; fi`; \
     301@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/render_2d.Tpo" "$(DEPDIR)/render_2d.Po"; else rm -f "$(DEPDIR)/render_2d.Tpo"; exit 1; fi
     302@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='render2D/render_2d.cc' object='render_2d.obj' libtool=no @AMDEPBACKSLASH@
     303@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/render_2d.Po' tmpdepfile='$(DEPDIR)/render_2d.TPo' @AMDEPBACKSLASH@
     304@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     305@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o render_2d.obj `if test -f 'render2D/render_2d.cc'; then $(CYGPATH_W) 'render2D/render_2d.cc'; else $(CYGPATH_W) '$(srcdir)/render2D/render_2d.cc'; fi`
     306
     307element_2d.o: render2D/element_2d.cc
     308@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT element_2d.o -MD -MP -MF "$(DEPDIR)/element_2d.Tpo" -c -o element_2d.o `test -f 'render2D/element_2d.cc' || echo '$(srcdir)/'`render2D/element_2d.cc; \
     309@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/element_2d.Tpo" "$(DEPDIR)/element_2d.Po"; else rm -f "$(DEPDIR)/element_2d.Tpo"; exit 1; fi
     310@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='render2D/element_2d.cc' object='element_2d.o' libtool=no @AMDEPBACKSLASH@
     311@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/element_2d.Po' tmpdepfile='$(DEPDIR)/element_2d.TPo' @AMDEPBACKSLASH@
     312@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     313@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o element_2d.o `test -f 'render2D/element_2d.cc' || echo '$(srcdir)/'`render2D/element_2d.cc
     314
     315element_2d.obj: render2D/element_2d.cc
     316@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT element_2d.obj -MD -MP -MF "$(DEPDIR)/element_2d.Tpo" -c -o element_2d.obj `if test -f 'render2D/element_2d.cc'; then $(CYGPATH_W) 'render2D/element_2d.cc'; else $(CYGPATH_W) '$(srcdir)/render2D/element_2d.cc'; fi`; \
     317@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/element_2d.Tpo" "$(DEPDIR)/element_2d.Po"; else rm -f "$(DEPDIR)/element_2d.Tpo"; exit 1; fi
     318@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='render2D/element_2d.cc' object='element_2d.obj' libtool=no @AMDEPBACKSLASH@
     319@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/element_2d.Po' tmpdepfile='$(DEPDIR)/element_2d.TPo' @AMDEPBACKSLASH@
     320@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     321@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o element_2d.obj `if test -f 'render2D/element_2d.cc'; then $(CYGPATH_W) 'render2D/element_2d.cc'; else $(CYGPATH_W) '$(srcdir)/render2D/element_2d.cc'; fi`
     322
     323text_engine.o: text_engine/text_engine.cc
     324@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.o -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.o `test -f 'text_engine/text_engine.cc' || echo '$(srcdir)/'`text_engine/text_engine.cc; \
     325@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     326@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/text_engine.cc' object='text_engine.o' libtool=no @AMDEPBACKSLASH@
     327@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     328@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     329@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.o `test -f 'text_engine/text_engine.cc' || echo '$(srcdir)/'`text_engine/text_engine.cc
     330
     331text_engine.obj: text_engine/text_engine.cc
     332@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.obj -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.obj `if test -f 'text_engine/text_engine.cc'; then $(CYGPATH_W) 'text_engine/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/text_engine.cc'; fi`; \
     333@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     334@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/text_engine.cc' object='text_engine.obj' libtool=no @AMDEPBACKSLASH@
     335@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     336@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     337@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.obj `if test -f 'text_engine/text_engine.cc'; then $(CYGPATH_W) 'text_engine/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/text_engine.cc'; fi`
     338
     339text.o: text_engine/text.cc
     340@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text.o -MD -MP -MF "$(DEPDIR)/text.Tpo" -c -o text.o `test -f 'text_engine/text.cc' || echo '$(srcdir)/'`text_engine/text.cc; \
     341@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text.Tpo" "$(DEPDIR)/text.Po"; else rm -f "$(DEPDIR)/text.Tpo"; exit 1; fi
     342@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/text.cc' object='text.o' libtool=no @AMDEPBACKSLASH@
     343@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text.Po' tmpdepfile='$(DEPDIR)/text.TPo' @AMDEPBACKSLASH@
     344@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     345@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text.o `test -f 'text_engine/text.cc' || echo '$(srcdir)/'`text_engine/text.cc
     346
     347text.obj: text_engine/text.cc
     348@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text.obj -MD -MP -MF "$(DEPDIR)/text.Tpo" -c -o text.obj `if test -f 'text_engine/text.cc'; then $(CYGPATH_W) 'text_engine/text.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/text.cc'; fi`; \
     349@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text.Tpo" "$(DEPDIR)/text.Po"; else rm -f "$(DEPDIR)/text.Tpo"; exit 1; fi
     350@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/text.cc' object='text.obj' libtool=no @AMDEPBACKSLASH@
     351@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text.Po' tmpdepfile='$(DEPDIR)/text.TPo' @AMDEPBACKSLASH@
     352@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     353@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text.obj `if test -f 'text_engine/text.cc'; then $(CYGPATH_W) 'text_engine/text.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/text.cc'; fi`
     354
     355font.o: text_engine/font.cc
     356@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT font.o -MD -MP -MF "$(DEPDIR)/font.Tpo" -c -o font.o `test -f 'text_engine/font.cc' || echo '$(srcdir)/'`text_engine/font.cc; \
     357@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/font.Tpo" "$(DEPDIR)/font.Po"; else rm -f "$(DEPDIR)/font.Tpo"; exit 1; fi
     358@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/font.cc' object='font.o' libtool=no @AMDEPBACKSLASH@
     359@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/font.Po' tmpdepfile='$(DEPDIR)/font.TPo' @AMDEPBACKSLASH@
     360@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     361@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o font.o `test -f 'text_engine/font.cc' || echo '$(srcdir)/'`text_engine/font.cc
     362
     363font.obj: text_engine/font.cc
     364@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT font.obj -MD -MP -MF "$(DEPDIR)/font.Tpo" -c -o font.obj `if test -f 'text_engine/font.cc'; then $(CYGPATH_W) 'text_engine/font.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/font.cc'; fi`; \
     365@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/font.Tpo" "$(DEPDIR)/font.Po"; else rm -f "$(DEPDIR)/font.Tpo"; exit 1; fi
     366@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='text_engine/font.cc' object='font.obj' libtool=no @AMDEPBACKSLASH@
     367@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/font.Po' tmpdepfile='$(DEPDIR)/font.TPo' @AMDEPBACKSLASH@
     368@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     369@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o font.obj `if test -f 'text_engine/font.cc'; then $(CYGPATH_W) 'text_engine/font.cc'; else $(CYGPATH_W) '$(srcdir)/text_engine/font.cc'; fi`
    202370uninstall-info-am:
    203371
     
    323491
    324492distdir: $(DISTFILES)
    325         $(mkdir_p) $(distdir)/text_engine
     493        $(mkdir_p) $(distdir)/render2D $(distdir)/text_engine
    326494        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    327495        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    365533check-am: all-am
    366534check: check-recursive
    367 all-am: Makefile
     535all-am: Makefile $(LIBRARIES) $(HEADERS)
    368536installdirs: installdirs-recursive
    369537installdirs-am:
     
    394562clean: clean-recursive
    395563
    396 clean-am: clean-generic mostlyclean-am
     564clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
    397565
    398566distclean: distclean-recursive
     567        -rm -rf ./$(DEPDIR)
    399568        -rm -f Makefile
    400 distclean-am: clean-am distclean-generic distclean-tags
     569distclean-am: clean-am distclean-compile distclean-generic \
     570        distclean-tags
    401571
    402572dvi: dvi-recursive
     
    421591
    422592maintainer-clean: maintainer-clean-recursive
     593        -rm -rf ./$(DEPDIR)
    423594        -rm -f Makefile
    424595maintainer-clean-am: distclean-am maintainer-clean-generic
     
    426597mostlyclean: mostlyclean-recursive
    427598
    428 mostlyclean-am: mostlyclean-generic
     599mostlyclean-am: mostlyclean-compile mostlyclean-generic
    429600
    430601pdf: pdf-recursive
     
    441612
    442613.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
    443         clean clean-generic clean-recursive ctags ctags-recursive \
    444         distclean distclean-generic distclean-recursive distclean-tags \
    445         distdir dvi dvi-am html html-am info info-am install \
    446         install-am install-data install-data-am install-exec \
    447         install-exec-am install-info install-info-am install-man \
    448         install-strip installcheck installcheck-am installdirs \
    449         installdirs-am maintainer-clean maintainer-clean-generic \
    450         maintainer-clean-recursive mostlyclean mostlyclean-generic \
    451         mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
    452         uninstall uninstall-am uninstall-info-am
    453 
     614        clean clean-generic clean-noinstLIBRARIES clean-recursive \
     615        ctags ctags-recursive distclean distclean-compile \
     616        distclean-generic distclean-recursive distclean-tags distdir \
     617        dvi dvi-am html html-am info info-am install install-am \
     618        install-data install-data-am install-exec install-exec-am \
     619        install-info install-info-am install-man install-strip \
     620        installcheck installcheck-am installdirs installdirs-am \
     621        maintainer-clean maintainer-clean-generic \
     622        maintainer-clean-recursive mostlyclean mostlyclean-compile \
     623        mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
     624        tags tags-recursive uninstall uninstall-am uninstall-info-am
     625
     626include $(MAINSRCDIR)/defs/include_paths.am
    454627# Tell versions [3.59,3.63) of GNU make to not export all variables.
    455628# Otherwise a system limit (for SysV at least) may be exceeded.
  • trunk/src/lib/graphics/graphics_engine.cc

    r5346 r5347  
    2121
    2222#include "render_2d.h"
     23#include "text_engine.h"
    2324#include "light.h"
     25#include "shader.h"
    2426#include "debug.h"
    25 #include "text_engine.h"
    26 #include "shader.h"
     27
    2728#include "ini_parser.h"
    2829#include "substring.h"
     
    8485  delete this->hwExtensions;
    8586
    86   delete Render2D::getInstance();
    8787  //TextEngine
    8888  delete TextEngine::getInstance();
     89  // render 2D
     90  delete Render2D::getInstance();
    8991
    9092  SDL_QuitSubSystem(SDL_INIT_VIDEO);
  • trunk/src/lib/graphics/text_engine/font.cc

    r5343 r5347  
    2424#include <SDL/SDL_image.h>
    2525#endif
    26 #include "font.xpm"
     26#include "default_font.xpm"
    2727
    2828#include "debug.h"
     
    3232
    3333/**
    34  * constructs a Font
     34 * constructs a Font out of a TTF-FIle
    3535 * @param fontFile the File to load the font from
    3636 * @param fontSize the Size of the Font in Pixels
     
    4141
    4242  this->setSize(fontSize);
     43  this->setStyle("c");
    4344
    4445  if (fontFile != NULL)
    4546    this->loadFont(fontFile);
    46 
    47   this->setStyle("c");//TTF_STYLE_NORMAL);
    48 
    49   this->fastTextureID = this->createFastTexture();
    50 
    51 
    52 //  this->createAsciiImage("test.bmp");
     47}
     48
     49/**
     50 * constructs a Font out of an ImageFile
     51 * @param imageFile the ImageFile to load the Font From.
     52 */
     53Font::Font(const char* imageFile)
     54{
     55  this->init();
     56  this->setName(imageFile);
     57  //  this->setSize(fontSize);
     58  SDL_Surface* image = NULL;
     59  if (imageFile != NULL)
     60    image = IMG_Load(imageFile);
     61  else
     62    return;
     63  if (image != NULL)
     64  {
     65    this->loadFontFromSDL_Surface(image);
     66    SDL_FreeSurface(image);
     67  }
     68  else
     69    PRINTF(1)("loading from surface %s failed: %s\n", imageFile, IMG_GetError());
    5370}
    5471
    5572/**
    5673 * constructs a Font
    57  * @param fontFile the File to load the font from
    58  * @param fontSize the Size of the Font in Pixels
     74 * @param xpmArray the xpm-ARRAY to load the font from
    5975 */
    6076Font::Font(char** xpmArray)
    6177{
    6278  this->init();
    63 
     79  this->setName("XPM-array-font");
    6480  //  this->setSize(fontSize);
    6581  SDL_Surface* image = NULL;
     
    7389  else
    7490    PRINTF(1)("loading from surface failed: %s\n", IMG_GetError());
    75 
    7691}
    7792
     
    91106      if (this->glyphArray[i] != NULL)
    92107      {
    93         glDeleteLists(this->glyphArray[i]->displayList, 1);
     108        if (this->glyphArray[i]->displayList != 0)
     109          glDeleteLists(this->glyphArray[i]->displayList, 1);
    94110        delete this->glyphArray[i];
    95111      }
     
    97113    delete[] this->glyphArray;
    98114  }
     115
     116  //! @todo check if we really do not need to delete the fastTextureID here.
     117//   if (this->fastTextureID != 0)
     118//     if(glIsTexture(this->fastTextureID))
     119//       glDeleteTextures(1, &this->fastTextureID);
    99120
    100121  // erease this font out of the memory.
     
    123144bool Font::loadFont(const char* fontFile)
    124145{
    125   if (!this->getName())
    126   {
    127     this->setName(fontFile);
    128 
    129     this->font = TTF_OpenFont(this->getName(), this->fontSize);
    130     if(!this->font)
    131     {
    132       PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
     146  // checking for existent Font.
     147  if (this->font != NULL)
     148  {
     149    TTF_CloseFont(this->font);
     150    this->font = NULL;
     151  }
     152  if (this->fastTextureID != 0)
     153  {
     154    if(glIsTexture(this->fastTextureID))
     155      glDeleteTextures(1, &this->fastTextureID);
     156    this->fastTextureID = 0;
     157  }
     158
     159  this->setName(fontFile);
     160  this->font = TTF_OpenFont(this->getName(), this->fontSize);
     161
     162  if(this->font != NULL)
     163  {
     164    this->fastTextureID = this->createFastTexture();
     165    if (this->fastTextureID != 0)
     166      return true;
     167    else
    133168      return false;
    134     }
    135     else
    136       return true;
    137169  }
    138170  else
    139171  {
    140     PRINTF(2)("Font already initialized, unable to change it now.\n");
     172    PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
    141173    return false;
    142174  }
     175
    143176}
    144177
     
    152185  if(surface == NULL)
    153186    return false;
     187
     188  if (this->font != NULL)
     189  {
     190    TTF_CloseFont(this->font);
     191    this->font = NULL;
     192  }
     193  if (this->fastTextureID != 0)
     194  {
     195    if(glIsTexture(this->fastTextureID))
     196      glDeleteTextures(1, &this->fastTextureID);
     197    this->fastTextureID = 0;
     198  }
     199
    154200  this->fastTextureID = Text::loadTexture(surface, NULL);
    155201
     
    195241/**
    196242 *  sets a specific renderStyle
    197  * @param renderStyle the Style to render: a char-array containing:
    198    i: italic, b: bold, u, underline
     243 * @param renderStyle the Style to render: a string (char-array) containing:
     244 *   i: italic, b: bold, u, underline
    199245 */
    200246void Font::setStyle(const char* renderStyle)
     
    212258  if (likely(this->font != NULL))
    213259    TTF_SetFontStyle(this->font, this->renderStyle);
    214   else
    215     PRINTF(2)("Font was not initialized, please do so before setting the Font-Style.\n");
     260//  else
     261//    PRINTF(2)("Font was not initialized, please do so before setting the Font-Style.\n");
    216262}
    217263
     
    363409{
    364410  Glyph* rg = new Glyph;
     411  rg->displayList = 0;
    365412  rg->character = character;
    366413  if (likely (this->font!= NULL))
     
    537584 * @returns the optimal size to use as the texture size
    538585
    539    @todo: this algorithm can be a lot more faster, althought it does
     586   @todo: this algorithm can be a lot faster, althought it does
    540587   not really matter within the init-context, and 128 glyphs.
    541588
     
    545592int Font::findOptimalFastTextureSize()
    546593{
     594  if (this->glyphArray == NULL)
     595    return 0;
     596
    547597  int i;
    548598  int x,y; // the counters
     
    555605  {
    556606    x = 0; y = 0;
    557     for (i = 0; i <= FONT_HIGHEST_KNOWN_CHAR; i++)
     607    for (i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
    558608    {
    559609      if((tmpGlyph = this->glyphArray[i]) != NULL)
  • trunk/src/lib/graphics/text_engine/font.h

    r5344 r5347  
    3131//! A struct for handling glyphs
    3232/**
    33    a Glyph is one letter of a certain font
     33 * a Glyph is one letter of a certain font
    3434 */
    3535struct Glyph
     
    5656/// FONT ///
    5757////////////
    58 //! A class to handle a Font of a certain ttf-File, Size and Color.
     58//! A class to handle a Font of a certain ttf-File/image-file, Size.
    5959class Font : public BaseObject
    6060{
     
    6464    Font(const char* fontFile,
    6565         unsigned int fontSize);
     66    Font(const char* imageFile);
    6667    Font(char** xpmArray);
    6768    virtual ~Font();
     
    102103  private:
    103104    static Font*  defaultFont;         //!< a default font, that is used, if other fonts were unable to be loaded.
    104   // information about the Font
     105    // information about the Font
    105106    TTF_Font*     font;                //!< The font we use for this.
    106107    unsigned int  fontSize;            //!< The size of the font in pixels. each Font has one size.
  • trunk/src/lib/graphics/text_engine/text_engine.cc

    r5344 r5347  
    7676    delete textIterator;
    7777  }
    78   // delete all remaining fonts (this is done in the ResourceManager)
     78  // delete all remaining fonts (There should not be Anything to do here)
    7979  tList<BaseObject>* fontList = ClassList::getList(CL_FONT);
    8080  if (fontList != NULL)
     
    127127/**
    128128 *  outputs some nice Debug information
    129 
    130    @todo there should also be something outputted about Font
    131 */
     129 *
     130 * @todo there should also be something outputted about Font
     131 */
    132132void TextEngine::debug() const
    133133{
  • trunk/src/lib/graphics/text_engine/text_engine.h

    r5344 r5347  
    11/*!
    22 * @file text_engine.h
    3   *  Definition of textEngine, the Font and the Text
    4 
    5    Text is the text outputed.
    6    Font is a class that loads a certain ttf-file with a specific height into memory
    7    TextEngine is used to manage the all the different Fonts that might be included
    8 
    9     for more information see the specific classes.
    10 
    11     !! IMPORTANT !! When using ttf fonts clear the license issues prior to
    12    adding them to orxonox. This is really important, because we do not want
    13    to offend anyone.
    14 */
     3 *  Definition of textEngine, the Font and the Text
     4 *
     5 * Text is the text outputed.
     6 * Font is a class that loads a certain ttf-file with a specific height into memory
     7 * TextEngine is used to manage the all the different Fonts that might be included
     8 *
     9 *   for more information see the specific classes.
     10 *
     11 *  !! IMPORTANT !! When using ttf fonts clear the license issues prior to
     12 * adding them to orxonox. This is really important, because we do not want
     13 * to offend anyone.
     14 */
    1515
    1616#ifndef _TEXT_ENGINE_H
     
    2626class Text;
    2727
    28 ///////////////////
    29 /// TEXT-ENGINE ///
    30 ///////////////////
    31 //! A singleton Class that operates as a Handler for generating and rendering Text in 2D
     28//! A singleton Class that operates as a Handler initializing FONTS.
    3229class TextEngine : public BaseObject
    3330{
Note: See TracChangeset for help on using the changeset viewer.