Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heightMap/src/lib/graphics/importer/texture.h @ 5506

Last change on this file since 5506 was 4111, checked in by bensch, 20 years ago

orxonox/trunk: merged the Trunk/importer back here.
merged with command:
svn merge -r 3918:HEAD ../../trunk/src/lib/graphics/importer/ src/lib/graphics/importer/

this fixed the issue with the segfault. It really was an error in the Model-class
@nico:

  1. sorry
  2. thanks for pointing this out to me
File size: 994 bytes
Line 
1/*!
2  \file texture.h
3  \brief Contains the texture class, that handles the reading of Images into Texutre-files.
4
5  \todo free SDL-surface when deleting Material.
6  \todo delete imgNameWithPath after use creation.
7*/
8
9#ifndef _TEXTURE_H
10#define _TEXTURE_H
11
12#include "glincl.h"
13
14#include "debug.h"
15
16#include <SDL_image.h>
17
18//! A Class, that reads in Textures from different fileformats.
19class Texture
20{
21 private:
22  GLuint texture;   //!< The Texture-ID of opengl from this Texture.
23  char* searchTextureInPaths(const char* texName) const;
24  void swap(unsigned char &a, unsigned char &b);
25
26  bool bAlpha;           //!< if the texture has an alpha channel.
27 public:
28  Texture(const char* imageName = NULL);
29  ~Texture(void);
30
31  /** \returns The textureID of this texture.  */
32  inline GLuint getTexture(void) {return this->texture;} 
33  GLuint loadTexToGL (SDL_Surface* surface);
34  inline bool hasAlpha(void) {return bAlpha;}
35
36  bool loadImage(const char* imageName);
37};
38
39#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.