1 /***************************************************************************
2                           stdafx.h  -  description
3                              -------------------
4     begin                : Sun Mar 08 2009
5     copyright            : (C) 1999-2009 by Pete Bernert
6     web                  : www.pbernert.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version. See also the license.txt file for *
15  *   additional informations.                                              *
16  *                                                                         *
17  ***************************************************************************/
18 
19 //*************************************************************************//
20 // History of changes:
21 //
22 // 2009/03/08 - Pete
23 // - generic cleanup for the Peops release
24 //
25 //*************************************************************************//
26 
27 #ifndef __GPU_STDAFX__
28 #define __GPU_STDAFX__
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef _GPU_API_
35 #define _GPU_API_ 1
36 #endif
37 
38 
39 
40 	// maybe we should remove this?
41 #ifdef _WINDOWS
42 
43 #define _CRT_SECURE_NO_WARNINGS
44 
45 #include <WINDOWS.H>
46 #include <WINDOWSX.H>
47 #include <Ts8.H>
48 #include "resource.h"
49 
50 #pragma warning (disable:4244)
51 
52 #include <gl/gl.h>
53 
54 #else
55 /*
56 #define __X11_C_
57 */
58 
59 #include <stdio.h>
60 #include <stdlib.h>
61 #include <string.h>
62 #include <sys/time.h>
63 #ifdef __NANOGL__
64 #include <gl/gl.h>
65 #else
66 #ifdef SOFT_LINKAGE
67 #pragma softfp_linkage
68 #endif
69 #include <GLES/gl.h> // for opengl es types
70 //#include <GLES/egltypes.h>
71 #include <EGL/egl.h>
72 #ifdef SOFT_LINKAGE
73 #pragma no_softfp_linkage
74 #endif
75 #endif
76 #include <math.h>
77 
78 #define __inline inline
79 
80 #endif
81 
82 #define SHADETEXBIT(x) ((x>>24) & 0x1)
83 #define SEMITRANSBIT(x) ((x>>25) & 0x1)
84 
85 #if 0
86 #define glError() { \
87        GLenum err = glGetError(); \
88        while (err != GL_NO_ERROR) { \
89                printf("glError: %d caught at %s:%u\n", err, __FILE__, __LINE__); \
90                err = glGetError(); \
91        } \
92 }
93 #else
94 #define glError()
95 #endif
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif
102