Fork me on GitHub

source: svn/trunk/Utilities/FROG/Includes/FROG/FROG_Texture.h@ 95

Last change on this file since 95 was 95, checked in by severine ovyn, 16 years ago

first commit frog

File size: 1.4 KB
Line 
1
2
3#ifndef _FROG_TEXTURE_H__
4#define _FROG_TEXTURE_H__
5
6#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
7# if defined(_MSC_VER)
8# pragma warning(disable:4996)
9# endif
10#endif
11
12#ifdef linux
13#elif macos
14#else
15 #pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib")
16 #pragma comment (lib,"Includes/PNGLIB/Lib/libpng13.lib")
17#endif
18#include "../PNGLIB/png.h"
19
20
21#ifdef linux
22 #include <GL/gl.h>
23 #include <GL/glu.h>
24 #include "../GLUT/glut.h"
25#elif macos
26 #include <OpenGL/gl.h>
27 #include <OpenGL/glu.h>
28 #include <GLUT/glut.h>
29#else
30#include <windows.h>
31#include <gl/gl.h>
32#include <gl/glu.h>
33#include <gl/glaux.h>
34#include <gl/glut.h>
35#endif
36#include <stdio.h>
37#include <math.h>
38#include <string.h>
39#include "../GL2PS/gl2ps.h"
40
41
42typedef struct stTexture
43{
44 stTexture () {width=0;height=0;format=0;internalFormat=0;texels=NULL;}
45
46 GLuint width;
47 GLuint height;
48 GLenum format;
49 GLint internalFormat;
50 GLubyte* texels;
51
52} stTexture;
53
54stTexture* VerticalFlipTexture(stTexture* Source);
55
56void LoadTexture(unsigned int* id, char* strFileName, bool VerticalFlip=false);
57void SaveScreenshot(char* strFileName,unsigned int Width, unsigned int Height, void (*func)(void));
58
59void LoadPNG(stTexture* Texture, char* strFileName);
60void SavePNG(stTexture* Texture, char* strFileName);
61
62
63//void SaveBMPScreenshot(char *filename, int Width, int Height);
64
65
66
67
68#endif
Note: See TracBrowser for help on using the repository browser.