1 /***************************************************************************
2                             draw.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 _GL_DRAW_H_
28 #define _GL_DRAW_H_
29 
30 
31 #ifdef __cplusplus
32 
33 extern "C" {
34 #endif
35 
36 
37 
38 // internally used defines
39 
40 #define GPUCOMMAND(x) ((x>>24) & 0xff)
41 #define RED(x) (x & 0xff)
42 #define BLUE(x) ((x>>16) & 0xff)
43 #define GREEN(x) ((x>>8) & 0xff)
44 #define COLOR(x) (x & 0xffffff)
45 
46 // prototypes
47 
48 #ifdef _WINDOWS
49 BOOL bSetupPixelFormat(HDC hDC);
50 #endif
51 
52 int  GLinitialize(void *ext_gles_display, void *ext_gles_surface);
53 void GLcleanup();
54 #ifdef _WINDOWS
55 BOOL offset2(void);
56 BOOL offset3(void);
57 BOOL offset4(void);
58 BOOL offsetline(void);
59 #else
60 unsigned short offset2(void);
61 unsigned short offset3(void);
62 unsigned short offset4(void);
63 unsigned short offsetline(void);
64 #endif
65 void offsetST(void);
66 void offsetBlk(void);
67 void offsetScreenUpload(long Position);
68 void assignTexture3(void);
69 void assignTexture4(void);
70 void assignTextureSprite(void);
71 void assignTextureVRAMWrite(void);
72 void SetOGLDisplaySettings (unsigned short DisplaySet);
73 void ReadConfig(void);
74 void WriteConfig(void);
75 void SetExtGLFuncs(void);
76 ///////////////////////////////////////////////////////////////////////
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif // _GL_DRAW_H_
83