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