author | Matt Plumtree <matt.plumtree@nokia.com> |
Mon, 15 Nov 2010 09:56:25 +0000 | |
branch | bug235_bringup_0 |
changeset 77 | b0395290e61f |
parent 76 | 24381b61de5c |
permissions | -rw-r--r-- |
20
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
1 |
/* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
2 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
3 |
* Permission is hereby granted, free of charge, to any person obtaining a |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
4 |
* copy of this software and associated documentation files (the "Software"), |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
5 |
* to deal in the Software without restriction, including without limitation |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
6 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
7 |
* and/or sell copies of the Software, and to permit persons to whom the |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
8 |
* Software is furnished to do so, subject to the following conditions: |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
9 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
10 |
* The above copyright notice and this permission notice shall be included |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
11 |
* in all copies or substantial portions of the Software. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
12 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
13 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
14 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
15 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
16 |
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
17 |
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
18 |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
19 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
20 |
* Initial Contributors: |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
21 |
* Nokia Corporation - initial contribution. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
22 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
23 |
* Contributors: |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
24 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
25 |
* Description: |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
26 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
27 |
*/ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
28 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
29 |
#ifndef OBJECT_H_ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
30 |
#define OBJECT_H_ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
31 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
32 |
#include "common.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
33 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
34 |
typedef struct DGLObject |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
35 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
36 |
GLuint name; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
37 |
struct DGLObject* next; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
38 |
} DGLObject; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
39 |
|
77
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
40 |
#ifdef __cplusplus |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
41 |
extern "C" |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
42 |
{ |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
43 |
#endif /* __cplusplus */ |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
44 |
|
20
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
45 |
void DGLObject_insert(DGLObject** root, DGLObject* object); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
46 |
DGLObject* DGLObject_remove(DGLObject** root, GLuint name); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
47 |
DGLObject* DGLObject_find(DGLObject* root, GLuint name); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
48 |
|
77
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
49 |
#ifdef __cplusplus |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
50 |
} |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
51 |
#endif /* __cplusplus */ |
b0395290e61f
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Matt Plumtree <matt.plumtree@nokia.com>
parents:
76
diff
changeset
|
52 |
|
76
24381b61de5c
Host OpenGL ES 2.0 code now building without warning or error using GCC.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
55
diff
changeset
|
53 |
#endif /* OBJECT_H_ */ |