home *** CD-ROM | disk | FTP | other *** search
/ Launch & Play / spustahrej2.iso / Egoboo / code / gltexture.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-03  |  1.1 KB  |  35 lines

  1. #ifndef    _GLTEXTURE_H_
  2. #define    _GLTEXTURE_H_
  3.  
  4.  
  5. /**> HEADER FILES <**/
  6. #include <GL/gl.h>
  7. //#include <SDL/SDL.h>
  8.  
  9.  
  10. /**> DATA STRUCTURE: GLTexture <**/
  11. typedef struct GLTexture
  12. {
  13.     GLuint    textureID;                /* The OpenGL texture number */
  14.     GLint    internalFormat;            /* GL_RGB or GL_RGBA */
  15.     GLsizei    imgHeight, imgWidth;    /* the height & width of the original image */
  16.     GLsizei    txDimensions;            /* the height/width of the the OpenGL texture (must be a power of two) */
  17.     GLfloat    alpha;                    /* the alpha for the texture */
  18. }    GLTexture;
  19.  
  20.  
  21. /**> FUNCTION PROTOTYPES: GLTexture <**/
  22. void        GLTexture_Load( GLTexture *texture, const char *filename );
  23. void        GLTexture_LoadA( GLTexture *texture, const char *filename, Uint32 key );
  24. GLuint        GLTexture_GetTextureID( GLTexture *texture );
  25. GLsizei        GLTexture_GetImageHeight( GLTexture *texture );
  26. GLsizei        GLTexture_GetImageWidth( GLTexture *texture );
  27. GLsizei        GLTexture_GetDimensions( GLTexture *texture );
  28. void        GLTexture_SetAlpha( GLTexture *texture, GLfloat alpha );
  29. GLfloat        GLTexture_GetAlpha( GLTexture *texture );
  30. void        GLTexture_Release( GLTexture *texture );
  31.  
  32.  
  33. #endif
  34.  
  35.