Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/importer/texture.h @ 3941

Last change on this file since 3941 was 3905, checked in by bensch, 20 years ago

orxonox/trunk: image now gets loaded with the an SDL_Surface instead of a strange pointer to a Struct that is only redundant

File size: 880 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 public:
26  Texture(const char* imageName = NULL);
27  ~Texture(void);
28
29  /** \returns The textureID of this texture.  */
30  inline GLuint getTexture(void) {return this->texture;} 
31  GLuint loadTexToGL (SDL_Surface* surface);
32
33  bool loadImage(const char* imageName);
34};
35
36#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.