OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef __osmew_h__ | |
6 #define __osmew_h__ | |
7 #define __OSMEW_H__ | |
8 | |
9 #include <GL/glew.h> | |
10 | |
11 #ifdef __cplusplus | |
12 extern "C" { | |
13 #endif | |
14 | |
15 #if !defined(GLAPIENTRY) | |
16 #if defined(_WIN32) | |
17 #define GLAPIENTRY __stdcall | |
18 #else | |
19 #define GLAPIENTRY | |
20 #endif | |
21 #endif | |
22 | |
23 #define OSMEW_GET_FUN(x) x | |
24 | |
25 // Subset of OSMesa functions. | |
26 | |
27 typedef struct osmesa_context *OSMesaContext; | |
28 typedef OSMesaContext (GLAPIENTRY * PFNOSMESACREATECONTEXTPROC) (GLenum format,
OSMesaContext sharelist); | |
29 typedef void (GLAPIENTRY * PFNOSMESADESTROYCONTEXTPROC) (OSMesaContext ctx); | |
30 typedef GLboolean (GLAPIENTRY * PFNOSMESAMAKECURRENTPROC) (OSMesaContext ctx, vo
id* buffer, GLenum type, GLsizei width, GLsizei height); | |
31 typedef OSMesaContext (GLAPIENTRY * PFNOSMESAGETCURRENTCONTEXTPROC) (void); | |
32 | |
33 #define OSMesaCreateContext OSMEW_GET_FUN(__osmesaCreateContext) | |
34 #define OSMesaDestroyContext OSMEW_GET_FUN(__osmesaDestroyContext) | |
35 #define OSMesaMakeCurrent OSMEW_GET_FUN(__osmesaMakeCurrent) | |
36 #define OSMesaGetCurrentContext OSMEW_GET_FUN(__osmesaGetCurrentContext) | |
37 | |
38 extern PFNOSMESACREATECONTEXTPROC __osmesaCreateContext; | |
39 extern PFNOSMESADESTROYCONTEXTPROC __osmesaDestroyContext; | |
40 extern PFNOSMESAMAKECURRENTPROC __osmesaMakeCurrent; | |
41 extern PFNOSMESAGETCURRENTCONTEXTPROC __osmesaGetCurrentContext; | |
42 | |
43 void osmewInit (); | |
44 | |
45 #undef GLAPIENTRY | |
46 | |
47 #ifdef __cplusplus | |
48 } | |
49 #endif | |
50 | |
51 #endif /* __osmew_h__ */ | |
OLD | NEW |