сейчас не дождавшись ответа я решил сделать все подругому согнать все в один модуль
| Код | #ifndef __engine_H__ #define __engine_H__
#include <fstream.h>
#include <gl\gl.h> // OpenGL32 #include <gl\glu.h> // OpenGL32
struct Texture{ GLubyte * imageData; // Image Data (Up To 32 Bits) GLuint bpp; // Image Color Depth In Bits Per Pixel GLuint width; // Image Width GLuint height; // Image Height GLuint texID; // Texture ID Used To Select A Texture GLuint type; // Image Type (GL_RGB, GL_RGBA) } ;
struct Vertexx { float x,y,z,u,v; char bone; };
struct Triangless { int nump[3]; //в будущем тут нормали };
struct matER {
Texture dift[1];
};
struct Meshh { Vertexx *point; Triangless *triang;
int numPoi,numTri,iMat,nNorm; };
struct Modell { matER *Mater; Meshh *Mesh;
int numMes,numMat,cFrame; //materials here }; //------------------------------------------------------------------------- HGLRC ghRC; HDC ghDC;
float maxx=60,minx=-60,maxy=60,maxz=60,miny=-60,minz=-60; //------------------------------------------------------------------------- typedef struct { int size,xstep,ystep,zstep; byte *height; } landsh;
//TGA GAGAGA
typedef struct { GLubyte Header[12]; // TGA File Header } TGAHeader;
typedef struct { GLubyte header[6]; // First 6 Useful Bytes From The Header GLuint bytesPerPixel; // Holds Number Of Bytes Per Pixel Used In The TGA File GLuint imageSize; // Used To Store The Image Size When Setting Aside Ram GLuint temp; // Temporary Variable GLuint type; GLuint Height; //Height of Image GLuint Width; //Width ofImage GLuint Bpp; // Bits Per Pixel } TGA;
TGAHeader tgaheader; // TGA header TGA tga; // TGA image data
GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header bool LoadUncompressedTGA(Texture *, char *, FILE *); // Load an Uncompressed file bool LoadCompressedTGA(Texture *, char *, FILE *); // Load a Compressed file //*********************************************************
#endif
|
и этот файл я несколько раз подключаю ПОДКЛЮЧАЮ только его а он говрит что 2 раза объявляется gl.h я не пониаю define прописан как у меня так и в гл вот |