Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3701 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Mar 31, 2005, 10:27:46 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: SDL include fix in configure and texture

Location:
orxonox/branches/textEngine
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/config.h.in

    r3691 r3701  
    5353#undef HAVE_PTHREAD_H
    5454
     55/* Define to 1 if you have the <SDL.h> header file. */
     56#undef HAVE_SDL_H
     57
     58/* Define to 1 if you have the <SDL_image.h> header file. */
     59#undef HAVE_SDL_IMAGE_H
     60
    5561/* Define to 1 if you have the <SDL/SDL.h> header file. */
    5662#undef HAVE_SDL_SDL_H
    57 
    58 /* Define to 1 if you have the <SDL/SDL_image.h> header file. */
    59 #undef HAVE_SDL_SDL_IMAGE_H
    6063
    6164/* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
  • orxonox/branches/textEngine/configure

    r3691 r3701  
    55185518# checking for SDL-headers
    55195519
    5520 for ac_header in SDL/SDL.h
     5520for ac_header in SDL.h
    55215521do
    55225522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    63476347# checking for SDL_image-headers
    63486348
    6349 for ac_header in SDL/SDL_image.h
     6349for ac_header in SDL_image.h
    63506350do
    63516351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
  • orxonox/branches/textEngine/configure.ac

    r3691 r3701  
    325325
    326326# checking for SDL-headers
    327     AC_CHECK_HEADERS([SDL/SDL.h] ,,
     327    AC_CHECK_HEADERS([SDL.h] ,,
    328328      [AC_MSG_ERROR([cannot find SDL headers]) ])
    329329
     
    426426if test x$def_sdl_image = xyes; then
    427427# checking for SDL_image-headers
    428   AC_CHECK_HEADERS([SDL/SDL_image.h] ,,
     428  AC_CHECK_HEADERS([SDL_image.h] ,,
    429429      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
    430430fi
  • orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc

    r3700 r3701  
    1919
    2020   for some fonts and licenses visit: =http://www.dafont.com/en/font.php=
     21
     22   !! IMPORTANT !! When using ttf fonts clear the license issues prior to
     23   adding them to orxonox. This is really important, because we do not
     24   want to defend anyone.
    2125*/
    2226
    2327/*
    24     glfont:  An example of using the SDL_ttf library with OpenGL.
    25     Copyright (C) 1997-2004 Sam Lantinga
    26 
    27     This library is free software; you can redistribute it and/or
    28     modify it under the terms of the GNU Library General Public
    29     License as published by the Free Software Foundation; either
    30     version 2 of the License, or (at your option) any later version.
    31 
    32     This library is distributed in the hope that it will be useful,
    33     but WITHOUT ANY WARRANTY; without even the implied warranty of
    34     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    35     Library General Public License for more details.
    36 
    37     You should have received a copy of the GNU Library General Public
    38     License along with this library; if not, write to the Free
    39     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    40 
    41     The SDL_GL_* functions in this file are available in the public domain.
    42 
    43     Sam Lantinga
    44     slouken@libsdl.org
     28  glfont:  An example of using the SDL_ttf library with OpenGL.
     29  Copyright (C) 1997-2004 Sam Lantinga
     30 
     31  This library is free software; you can redistribute it and/or
     32  modify it under the terms of the GNU Library General Public
     33  License as published by the Free Software Foundation; either
     34  version 2 of the License, or (at your option) any later version.
     35 
     36  This library is distributed in the hope that it will be useful,
     37  but WITHOUT ANY WARRANTY; without even the implied warranty of
     38  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     39  Library General Public License for more details.
     40 
     41  You should have received a copy of the GNU Library General Public
     42  License along with this library; if not, write to the Free
     43  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     44 
     45  The SDL_GL_* functions in this file are available in the public domain.
     46 
     47  Sam Lantinga
     48  slouken@libsdl.org
    4549*/
    4650
  • orxonox/branches/textEngine/src/lib/graphics/font/glfont.h

    r3700 r3701  
    1212
    1313/* some default values */
    14 #define FONT_DEFAULT_SIZE       50                   //!< default size of the Text
     14#define FONT_DEFAULT_SIZE       18                   //!< default size of the Text
    1515#define FONT_DEFAULT_TEXT       "orxonox 1234567890" //!< some default text to display
    1616#define FONT_DEFAULT_COLOR_R    256                  //!< the default red part (color) of the text
  • orxonox/branches/textEngine/src/lib/graphics/importer/texture.cc

    r3681 r3701  
    9898}
    9999
    100 #ifdef HAVE_SDL_SDL_IMAGE_H
     100#ifdef HAVE_SDL_IMAGE_H
    101101bool Texture::loadImage(const char* imageName)
    102102{
     
    118118            pImage->format = GL_RGB;
    119119          else if (pImage->bpp == 4)
    120             pImage->format = GL_RGBA;
    121          
     120            {
     121              pImage->format = GL_RGBA;
     122              SDL_SetAlpha(this->map, 0, 0);
     123            }
     124
    122125          if( !IMG_isPNG(SDL_RWFromFile(imageName, "rb")) && !IMG_isJPG(SDL_RWFromFile(imageName, "rb")))
    123126            for (int i=0;i<map->h * map->w *3;i+=3)
     
    146149
    147150
    148 #else /* HAVE_SDL_SDL_IMAGE_H */
     151#else /* HAVE_SDL_IMAGE_H */
    149152/**
    150153   \brief Makes the Programm ready to Read-in a texture-File
     
    832835
    833836}
    834 #endif /* HAVE_SDL_SDL_IMAGE_H */
     837#endif /* HAVE_SDL_IMAGE_H */
  • orxonox/branches/textEngine/src/lib/graphics/importer/texture.h

    r3681 r3701  
    1414#include "debug.h"
    1515
    16 #ifdef HAVE_SDL_SDL_IMAGE_H
    17 #include <SDL/SDL_image.h>
     16#ifdef HAVE_SDL_IMAGE_H
     17#include <SDL_image.h>
    1818#else
    1919// IMAGE LIBS //
     
    2626#include <png.h>
    2727#endif /* HAVE_PNG_H */
    28 #endif /* HAVE_SDL_SDL_IMAGE_H */
     28#endif /* HAVE_SDL_IMAGE_H */
    2929
    3030//! A Class, that reads in Textures from different fileformats.
     
    5757
    5858  bool loadImage(const char* imageName);
    59 #ifndef HAVE_SDL_SDL_IMAGE_H
     59#ifndef HAVE_SDL_IMAGE_H
    6060
    6161  bool loadBMP (char* bmpName);
     
    7474
    7575};
    76 
    77 
    78 
    7976#endif /* _TEXTURE_H */
  • orxonox/branches/textEngine/src/story_entities/world.cc

    r3696 r3701  
    205205      tmpFont = new GLFont("../data/fonts/refluxed.ttf");
    206206      this->glmis->step();
    207 
    208207      // initializing the TrackManager
    209208      trackManager = TrackManager::getInstance();
     
    748747        {
    749748          float fps = 1000/dt;
    750           PRINTF(3)("fps = %f\n", fps);
     749          PRINTF(0)("fps = %f\n", fps);
     750          char tmpChar[20];
     751          sprintf(tmpChar, "fps: %d", rand());
     752          tmpFont->setText(tmpChar);
     753          tmpFont->createTexture();
    751754        }
    752755      else
Note: See TracChangeset for help on using the changeset viewer.