mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TextureLoader.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "GlobalGL.h"
13 #include <string>
14 
27 public:
28  TextureLoader( void );
29  ~TextureLoader( void );
30  virtual bool load( const std::string& filename ) = 0;
31  virtual bool write( const std::string& filename ) = 0;
32  bool load( BYTE *data, unsigned int width, unsigned int height, unsigned int bpp);
33  unsigned int getWidth( void );
34  unsigned int getHeight( void );
35  unsigned int getBPP( void );
36  GLenum getFormat( void );
37  BYTE *getImage();
38  void useBGR( bool value );
39  bool useBGR( void );
40  bool isBGR( void );
41  void toRGB( void );
42  void toBGR( void );
43 protected:
44  void setWidth( unsigned int width );
45  void setHeight( unsigned int height );
46  void setBPP( unsigned int bpp );
47  void setFormat( GLenum format );
48  void setImage( BYTE **image );
49  void setImage( BYTE *image );
50  void bgr2rgb( unsigned __int8 colorMode );
51 private:
52  unsigned int m_width;
53  unsigned int m_height;
54  unsigned int m_bpp;
55  GLenum m_format;
56  BYTE **image2d;
57  BYTE *image;
58  bool m_useBGR;
59 };