/[usata]/usata2/src/texture.cpp
ViewVC logotype

Diff of /usata2/src/texture.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by skunix, Thu Jan 20 02:18:15 2005 UTC revision 1.11 by skunix, Thu Jan 20 20:20:30 2005 UTC
# Line 16  Line 16 
16  #include <boost/tuple/tuple.hpp>  #include <boost/tuple/tuple.hpp>
17  #include <boost/format.hpp>  #include <boost/format.hpp>
18  #include <boost/bind.hpp>  #include <boost/bind.hpp>
   
19  #include <Magick++.h>  #include <Magick++.h>
   
20  #include <GL/glew.h>  #include <GL/glew.h>
21    
22  #include "texture.hpp"  #include "texture.hpp"
23  #include "texture-meta.hpp"  #include "texture-meta.hpp"
24    //#include "config.hpp"
25    #include "system.hpp"
26  #include "log.hpp"  #include "log.hpp"
27    
28  namespace usata  namespace usata
# Line 98  Pixmap::Pixmap(const std::string& fn) Line 98  Pixmap::Pixmap(const std::string& fn)
98                  case Magick::GrayscaleMatteType:                  case Magick::GrayscaleMatteType:
99                          Type=LUMA;mt="RA";                          Type=LUMA;mt="RA";
100                          break;                          break;
101    //              case Magick::ColorSeparationType
102                    
103                    case Magick::BilevelType:
104                            // dont ask, I dont know why not "RA"  
105                            // but that doesnt work
106                            Type=LUMA; mt= "AR";
107                            break;
108            
109                  default:                  default:
110                          throw std::runtime_error("Unsupported image pixel layout");                          throw std::runtime_error("Unsupported image pixel layout" );
111          }          }
112          Width = magick->columns();          Width = magick->columns();
113          Height = magick->rows();          Height = magick->rows();
# Line 176  TextureMap::finish_load_2d(GLint interna Line 184  TextureMap::finish_load_2d(GLint interna
184  void  void
185  TextureMap::finish_load()  TextureMap::finish_load()
186  {  {
187            using namespace system;
188            const video::Capabilities& vcap = video::get_capabilities();
189          log::BufferedStream logstream(log::Level::DEBUG);          log::BufferedStream logstream(log::Level::DEBUG);
190          if (! m_pixmap.get() )          if (! m_pixmap.get() )
191                  return;                  return;
# Line 183  TextureMap::finish_load() Line 193  TextureMap::finish_load()
193          allocate_gltex();          allocate_gltex();
194    
195          GLint  internal_gl_format = m_pixmap->type();          GLint  internal_gl_format = m_pixmap->type();
196            if (m_meta.compress)
197                    internal_gl_format=vcap.compressed_format[m_pixmap->type()];
198            
199    
200          if (m_pixmap->height() == 1)          if (m_pixmap->height() == 1)
201                          m_gl_texture_type = GL_TEXTURE_1D;                          m_gl_texture_type = GL_TEXTURE_1D;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26