gldesign1.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #define _WIN32_WINNT 0x0500
00008
00009 #include <windows.h>
00010
00011 #include <gl\gl.h>
00012 #include <gl\glu.h>
00013 #include <math.h>
00014 #include <stdlib.h>
00015 #include <stdio.h>
00016 #include "gldesign.h"
00017 #include "stereo.h"
00018 #include "..\common\animate\about.h"
00019 #include "..\gl2.h"
00020 #include "struct.h"
00021 #include "dstruct.h"
00022 #include "glmenu.h"
00023 #include "..\shaders\shaders.h"
00024 #include "mtools.h"
00025
00026 #define PLANE 0
00027 #define CYLINDER 1
00028 #define PLANE_MOZIAC 2
00029 #define CYLINDER_MOZIAC 3
00030 #define MAP_BY_VERTEX 4
00031 #define MAP_SPHERICAL 5
00032 #define STATICBRUSH 0
00033 #define ANIMBRUSH 1
00034 #define BUMPBRUSH 2
00035 #define REFLBRUSH 3
00036
00037 #define DESELECTED 0
00038 #define SELECTED 1
00039 #define HIDDEN 2
00040
00041 #define MAX_FILE 255
00042 #define MAX_DIR 255
00043
00049 typedef struct DesignerGLMAPtag {
00050 BOOL bMovie;
00051 unsigned char *pixels;
00052 long x,y;
00053 BOOL bMovieR;
00054 unsigned char *pixelsR;
00055 long xR,yR;
00056 BOOL bMovieB;
00057 unsigned char *pixelsB;
00058 long xB,yB;
00059 BOOL bMovieT;
00060 unsigned char *pixelsT;
00061 long xT,yT;
00062 }
00063 GLMAP;
00064
00065 #define IDM_WINDOW_SHOWOPENGL 17130
00066
00067 #define StartWait() hcurSave = SetCursor(LoadCursor(NULL,IDC_WAIT))
00068 #define EndWait() SetCursor(hcurSave)
00069
00070 #define WM_INIT (WM_USER+1)
00071 #define WM_UPDATE (WM_USER+2)
00072 #define WM_UPDATE_MAP (WM_USER+3)
00073 #define WM_LOAD_MAPS (WM_USER+4)
00074
00075 #define WM_SHOWMAP (WM_USER+6)
00076
00077 typedef GLfloat normal[3];
00078
00079 #define BOUND(x,min,max) ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))
00080
00081 #define VECSUB(a,b,c) { c[0]=a[0]-b[0]; c[1]=a[1]-b[1]; c[2]=a[2]-b[2];}
00082 #define VECSUM(a,b,c) { c[0]=a[0]+b[0]; c[1]=a[1]+b[1]; c[2]=a[2]+b[2];}
00083 #define VECSCALE(a,b,c) { c[0]=(a)*b[0]; c[1]=(a)*b[1]; c[2]=(a)*b[2];}
00084 #define VECCOPY(a,c) { c[0]=a[0]; c[1]=a[1]; c[2]=a[2];}
00085 #define DOT(a,b) ( (a[0]*b[0]) + (a[1]*b[1]) + (a[2]*b[2]) )
00086 #define CROSS(v1,v2,r) { \
00087 r[0] = (v1[1]*v2[2]) - (v2[1]*v1[2]); \
00088 r[1] = (v1[2]*v2[0]) - (v1[0]*v2[2]); \
00089 r[2] = (v1[0]*v2[1]) - (v2[0]*v1[1]); \
00090 }
00091
00092 #define checkImageWidth 64
00093 #define checkImageHeight 64
00094