gldesign1.c File Reference

Go to the source code of this file.

Defines

#define _DSCRUCT_SUB   1
#define MAPDELTA   0.3333333
#define TOL   1000.0
#define HIDDEN   2
#define RTD   0.159154943

Functions

unsigned char * LoadMAP (char *InFile, long *xx, long *yy)
void CreateNoise3D (void)
void Make3dDisplayListProg (void)
void PrepareStereo (double, double, double, double, double, double, double, double, double, double, double)
void Make3dDisplayList (void)
void DrawSelectionBox (HWND)
void DrawGlNurbs (GLfloat)
void DrawProjectMapRectangle (void)
void makeCheckImageMap (int id)
void GetMappingCoordS (int id, vector n, vector dx, vector dy, vector p0, long *pv, GLfloat *a, GLfloat *b)
void GetMappingCoordP (int id, vector n, vector x, vector y, vector p0, long *pv, GLfloat *a, GLfloat *b)
void GetMappingCoordC (int id, vector n, vector x, vector y, vector p0, long *pv, GLfloat *a, GLfloat *b)
void GetMapNormal (int k, vector mP, vector mX, vector mY, vector mN)
BOOL normalise (GLfloat *v)
BOOL Normalize (point x, point y, point z, GLfloat *n)
BOOL inview (vertex *vp)
void FixUpMapEdge (GLfloat alpha[])
void TextureWithAlpha (long x, long y, unsigned char *pin, unsigned char alpha, BOOL, unsigned char, unsigned char, unsigned char)
BOOL CheckGPUhardware (HWND hwnd)
BOOL bSetupPixelFormat (HDC hDC)
void SetMappingQuality (void)
GLvoid initialize (HWND hWnd)
GLvoid drawScene (HWND hWnd, BOOL shaded)
GLvoid resize (HWND hWnd)
void Ortho2Dto3D (int x, int y, GLfloat *xx, GLfloat *yy)
void Ortho3Dto2D (int *x, int *y, GLfloat xx, GLfloat yy)
void DrawModelEdges (void)

Variables

 SelXs
 SelYs
 SelXc
 SelYc
GLfloat up_angle
GLfloat round_angle
GLfloat gbRed
GLfloat gbGreen
GLfloat gbBlue
GLfloat gwRed
GLfloat gwGreen
GLfloat gwBlue
GLfloat near_plane
GLfloat far_plane
GLfloat vertex_scale
GLfloat ortho_width
GLint listID
GLint mode
GLint bounding_box
GLint current_map
BOOL Mapped
BOOL Update
BOOL Fastest
BOOL Clamped
BOOL Cmaterial
BOOL AttenuateLight
BOOL TwoSided
BOOL ScrollBars
BOOL bDrawMapping
BOOL bOverlayWire
BOOL bOverlayWireHidden
BOOL bSelectOnlyInView
BOOL bThickWire
BOOL bNurbsWireOnly
BOOL bStereo
BOOL bStereoDraw
BOOL bShaders
BOOL bOrtho
BOOL bDrawSelection
BOOL bCanUseShaders
char gszBMPfile []
char gszBMPdir []
char gszRootDir []
GLMAPglMapList
long NglMapList
int * Tool
GLuint g_check_texture
GLuint g_map_texture
GLuint g_movie_texture
GLuint g_env_texture
GLuint g_bump_texture
GLuint g_ref_texture
GLuint g_tran_texture
GLuint g_envB_texture
GLuint g_noise_texture
GLubyte checkImage [checkImageWidth][checkImageHeight][3]
RECT oldrect


Define Documentation

#define _DSCRUCT_SUB   1

Definition at line 7 of file gldesign1.c.

#define MAPDELTA   0.3333333

Definition at line 16 of file gldesign1.c.

Referenced by FixUpMapEdge().

#define TOL   1000.0

Definition at line 1157 of file gldesign1.c.

#define HIDDEN   2

Definition at line 1178 of file gldesign1.c.

#define RTD   0.159154943


Function Documentation

unsigned char* LoadMAP ( char *  InFile,
long *  xx,
long *  yy 
)

Definition at line 738 of file GLDESIGN.C.

void CreateNoise3D ( void   ) 

Definition at line 44 of file gldesign_noise.c.

Referenced by initialize().

void Make3dDisplayListProg ( void   ) 

void PrepareStereo ( double  dfLeftBorder,
double  dfRightBorder,
double  dfBottomBorder,
double  dfTopBorder,
double  dfNearBorder,
double  dfFarBorder,
double  dfTargetPlane,
double  dfCameraToTargetDistance,
double  dfStereoMagnitudeAdj,
double  dfParallaxBalanceAdj,
double  dfEyePosition 
)

Definition at line 316 of file gldesign1.c.

References STEREO_MAGNITUDE_CONSTANT.

Referenced by drawScene().

void Make3dDisplayList ( void   ) 

void DrawSelectionBox ( HWND  hWnd  ) 

Definition at line 650 of file gldesign1.c.

References near_plane, Ortho2Dto3D(), SELECTOR, SelXc, SelXs, SelYc, SelYs, Tool, and z.

Referenced by drawScene().

static void DrawGlNurbs ( GLfloat  drawtype  ) 

void DrawProjectMapRectangle ( void   ) 

Definition at line 490 of file gldesign1.c.

References current_map, iMap, nImaps, TVpointX, TVpointY, TVpointZ, TVsizeX, TVsizeY, TVsizeZ, VECSCALE, VECSUB, VECSUM, vertex_scale, X, Y, and y1.

Referenced by drawScene().

static void makeCheckImageMap ( int  id  ) 

Definition at line 145 of file gldesign1.c.

References checkImage, checkImageHeight, and checkImageWidth.

Referenced by initialize().

void GetMappingCoordS ( int  id,
vector  n,
vector  dx,
vector  dy,
vector  p0,
long *  pv,
GLfloat *  a,
GLfloat *  b 
)

Definition at line 1288 of file gldesign1.c.

References DOT, normalise(), VECCOPY, VECSCALE, and VECSUB.

static void GetMappingCoordP ( int  id,
vector  n,
vector  x,
vector  y,
vector  p0,
long *  pv,
GLfloat *  a,
GLfloat *  b 
)

Definition at line 1223 of file gldesign1.c.

References DOT, TOL, VECSCALE, VECSUB, and VECSUM.

static void GetMappingCoordC ( int  id,
vector  n,
vector  x,
vector  y,
vector  p0,
long *  pv,
GLfloat *  a,
GLfloat *  b 
)

Definition at line 1262 of file gldesign1.c.

References CROSS, DOT, normalise(), RTD, VECSCALE, and VECSUB.

static void GetMapNormal ( int  k,
vector  mP,
vector  mX,
vector  mY,
vector  mN 
)

Definition at line 1200 of file gldesign1.c.

References CROSS, CYLINDER, CYLINDER_MOZIAC, iMap, MAP_SPHERICAL, normalise(), VECCOPY, VECSUB, X, and Y.

static BOOL normalise ( GLfloat *  v  ) 

static BOOL Normalize ( point  x,
point  y,
point  z,
GLfloat *  n 
)

Definition at line 1169 of file gldesign1.c.

References CROSS, FALSE, normalise(), TRUE, and VECSUB.

Referenced by Make3dDisplayList(), and Make3dDisplayListProg().

static BOOL inview ( vertex vp  ) 

static void FixUpMapEdge ( GLfloat  alpha[]  ) 

Definition at line 1305 of file gldesign1.c.

References MAPDELTA.

Referenced by AssignMappingCoordinatesToVertices(), and MapFacesByImageMap().

void TextureWithAlpha ( long  x,
long  y,
unsigned char *  pin,
unsigned char  alpha,
BOOL  bDecal,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Definition at line 671 of file gldesign1.c.

References X__Free, and X__Malloc.

BOOL CheckGPUhardware ( HWND  hwnd  ) 

Definition at line 931 of file rendergl.C.

BOOL bSetupPixelFormat ( HDC  hDC  ) 

Definition at line 76 of file gldesign1.c.

References bStereo, bStereoDraw, FALSE, and TRUE.

void SetMappingQuality ( void   ) 

Definition at line 122 of file gldesign1.c.

References Clamped.

GLvoid initialize ( HWND  hWnd  ) 

GLvoid drawScene ( HWND  hWnd,
BOOL  shaded 
)

GLvoid resize ( HWND  hWnd  ) 

Definition at line 457 of file gldesign1.c.

References bOrtho, far_plane, near_plane, oldrect, and ortho_width.

void Ortho2Dto3D ( int  x,
int  y,
GLfloat *  xx,
GLfloat *  yy 
)

Definition at line 474 of file gldesign1.c.

References oldrect, and ortho_width.

Referenced by DrawSelectionBox(), and SelectVertexInRectGL().

void Ortho3Dto2D ( int *  x,
int *  y,
GLfloat  xx,
GLfloat  yy 
)

Definition at line 482 of file gldesign1.c.

References oldrect, and ortho_width.

void DrawModelEdges ( void   ) 


Variable Documentation

Definition at line 47 of file GLDESIGN.C.

Definition at line 47 of file GLDESIGN.C.

Definition at line 47 of file GLDESIGN.C.

Definition at line 47 of file GLDESIGN.C.

GLfloat up_angle

Definition at line 51 of file GLDESIGN.C.

GLfloat round_angle

Definition at line 51 of file GLDESIGN.C.

GLfloat gbRed

Definition at line 52 of file GLDESIGN.C.

GLfloat gbGreen

Definition at line 52 of file GLDESIGN.C.

GLfloat gbBlue

Definition at line 52 of file GLDESIGN.C.

GLfloat gwRed

Definition at line 53 of file GLDESIGN.C.

GLfloat gwGreen

Definition at line 53 of file GLDESIGN.C.

GLfloat gwBlue

Definition at line 53 of file GLDESIGN.C.

GLfloat near_plane

Definition at line 54 of file GLDESIGN.C.

GLfloat far_plane

Definition at line 54 of file GLDESIGN.C.

GLfloat vertex_scale

Definition at line 54 of file GLDESIGN.C.

GLfloat ortho_width

Definition at line 54 of file GLDESIGN.C.

GLint listID

Definition at line 55 of file GLDESIGN.C.

GLint mode

Definition at line 55 of file GLDESIGN.C.

GLint bounding_box

Definition at line 55 of file GLDESIGN.C.

GLint current_map

Definition at line 55 of file GLDESIGN.C.

BOOL Mapped

Definition at line 56 of file GLDESIGN.C.

BOOL Update

Definition at line 56 of file GLDESIGN.C.

BOOL Fastest

Definition at line 56 of file GLDESIGN.C.

BOOL Clamped

Definition at line 56 of file GLDESIGN.C.

BOOL Cmaterial

Definition at line 57 of file GLDESIGN.C.

Definition at line 57 of file GLDESIGN.C.

BOOL TwoSided

Definition at line 57 of file GLDESIGN.C.

BOOL ScrollBars

Definition at line 58 of file GLDESIGN.C.

Definition at line 58 of file GLDESIGN.C.

Definition at line 58 of file GLDESIGN.C.

Definition at line 58 of file GLDESIGN.C.

Definition at line 58 of file GLDESIGN.C.

BOOL bThickWire

Definition at line 59 of file GLDESIGN.C.

Definition at line 59 of file GLDESIGN.C.

BOOL bStereo

Definition at line 60 of file GLDESIGN.C.

Definition at line 60 of file GLDESIGN.C.

BOOL bShaders

Definition at line 60 of file GLDESIGN.C.

BOOL bOrtho

Definition at line 61 of file GLDESIGN.C.

Referenced by initialize(), and resize().

Definition at line 61 of file GLDESIGN.C.

Referenced by drawScene().

Definition at line 64 of file GLDESIGN.C.

Referenced by initialize().

char gszBMPfile[]

Definition at line 62 of file GLDESIGN.C.

char gszBMPdir[]

Definition at line 62 of file GLDESIGN.C.

char gszRootDir[]

Definition at line 62 of file GLDESIGN.C.

Definition at line 48 of file GLDESIGN.C.

long NglMapList

Definition at line 49 of file GLDESIGN.C.

int* Tool

Definition at line 46 of file GLDESIGN.C.

Definition at line 66 of file GLDESIGN.C.

GLuint g_map_texture

Definition at line 67 of file GLDESIGN.C.

Definition at line 71 of file GLDESIGN.C.

GLuint g_env_texture

Definition at line 72 of file GLDESIGN.C.

Definition at line 69 of file GLDESIGN.C.

GLuint g_ref_texture

Definition at line 68 of file GLDESIGN.C.

Definition at line 70 of file GLDESIGN.C.

Definition at line 73 of file GLDESIGN.C.

Definition at line 74 of file GLDESIGN.C.

GLubyte checkImage[checkImageWidth][checkImageHeight][3]

Definition at line 75 of file GLDESIGN.C.

RECT oldrect


Generated on Sun Apr 27 14:20:16 2014 for OpenFX by  doxygen 1.5.6