Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3914 was 3905, checked in by bensch, 19 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
RevLine 
[3341]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
[3548]12#include "glincl.h"
13
14#include "debug.h"
15
[3790]16#include <SDL_image.h>
[3341]17
18//! A Class, that reads in Textures from different fileformats.
19class Texture
20{
21 private:
[3454]22  GLuint texture;   //!< The Texture-ID of opengl from this Texture.
[3655]23  char* searchTextureInPaths(const char* texName) const;
[3863]24  void swap(unsigned char &a, unsigned char &b);
[3341]25 public:
[3905]26  Texture(const char* imageName = NULL);
[3344]27  ~Texture(void);
[3905]28
[3454]29  /** \returns The textureID of this texture.  */
30  inline GLuint getTexture(void) {return this->texture;} 
[3905]31  GLuint loadTexToGL (SDL_Surface* surface);
[3341]32
[3655]33  bool loadImage(const char* imageName);
[3863]34};
[3341]35
36#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.