author | Matt Plumtree <matt.plumtree@nokia.com> |
Thu, 16 Sep 2010 09:43:14 +0100 | |
branch | bug235_bringup_0 |
changeset 20 | d2d6724aef32 |
child 24 | a3f46bb01be2 |
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 /or associated documentation files |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
5 |
* (the "Materials "), to deal in the Materials without restriction, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
6 |
* including without limitation the rights to use, copy, modify, merge, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
7 |
* publish, distribute, sublicense, and/or sell copies of the Materials, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
8 |
* and to permit persons to whom the Materials are furnished to do so, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
9 |
* 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
|
10 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
11 |
* 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
|
12 |
* in all copies or substantial portions of the Materials. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
13 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
14 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
15 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
17 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
18 |
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
19 |
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
20 |
* THE USE OR OTHER DEALINGS IN THE MATERIALS. |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
21 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
22 |
* Initial Contributors: |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
23 |
* 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
|
24 |
* |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
25 |
* Contributors: |
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 |
* Description: |
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 |
*/ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
30 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
31 |
#include "EGLUtils.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
32 |
#include "EGLSurface.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
33 |
#include "EGLContext.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
34 |
#include "EGLImage.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
35 |
#include "EGLThread.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
36 |
#include "EGLProcess.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
37 |
#include "EGLConfig.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
38 |
#include "EGLDisplay.h" |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
39 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
40 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
41 |
void AddObject( std::vector<T*>& vector, T*& object ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
42 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
43 |
if( !object ) return; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
44 |
try |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
45 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
46 |
vector.push_back(object); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
47 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
48 |
catch( std::bad_alloc ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
49 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
50 |
delete object; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
51 |
object = NULL; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
52 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
53 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
54 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
55 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
56 |
T* FindObjectByPointer( const std::vector<T*>& vector, void* item, int* index ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
57 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
58 |
T* ret = NULL; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
59 |
for( typename std::vector<T*>::size_type i = 0; i < vector.size(); i++ ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
60 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
61 |
if( vector[i] == item ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
62 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
63 |
ret = vector[i]; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
64 |
if( index ) *index = i; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
65 |
break; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
66 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
67 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
68 |
return ret; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
69 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
70 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
71 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
72 |
T* FindObjectById( const std::vector<T*>& vector, EGLint id, int* index ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
73 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
74 |
T* ret = NULL; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
75 |
for( typename std::vector<T*>::size_type i = 0; i < vector.size(); i++ ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
76 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
77 |
if( vector[i]->Id() == id ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
78 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
79 |
ret = vector[i]; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
80 |
if( index ) *index = i; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
81 |
break; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
82 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
83 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
84 |
return ret; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
85 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
86 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
87 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
88 |
void DeleteObjectByPointer( std::vector<T*>& vector, void* item ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
89 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
90 |
int index; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
91 |
T* object = FindObjectByPointer<T>( vector, item, &index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
92 |
if( object ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
93 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
94 |
delete object; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
95 |
vector.erase( vector.begin() + index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
96 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
97 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
98 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
99 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
100 |
void DeleteObjectById( std::vector<T*>& vector, EGLint id ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
101 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
102 |
int index; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
103 |
T* object = FindObjectById<T>(vector, id, &index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
104 |
if( object && object->Id() == id ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
105 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
106 |
delete object; |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
107 |
vector.erase( vector.begin() + index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
108 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
109 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
110 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
111 |
template<class T> |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
112 |
void DestroyPointerVector( std::vector<T*>& vector ) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
113 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
114 |
for(typename std::vector<T*>::iterator iter = vector.begin(); iter != vector.end(); iter++) |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
115 |
{ |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
116 |
delete (*iter); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
117 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
118 |
vector.clear(); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
119 |
} |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
120 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
121 |
// CEGLSurface |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
122 |
template void AddObject( std::vector<class CEGLSurface*>& vector, class CEGLSurface*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
123 |
template class CEGLSurface* FindObjectByPointer( const std::vector<class CEGLSurface*>& vector, void* item, int* index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
124 |
template void DeleteObjectByPointer( std::vector<class CEGLSurface*>& vector, void* item ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
125 |
template void DestroyPointerVector( std::vector<class CEGLSurface*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
126 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
127 |
// CEGLContext |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
128 |
template void AddObject( std::vector<class CEGLContext*>& vector, class CEGLContext*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
129 |
template void DeleteObjectByPointer( std::vector<class CEGLContext*>& vector, void* item ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
130 |
template void DestroyPointerVector( std::vector<class CEGLContext*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
131 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
132 |
// CEGLImage |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
133 |
template void AddObject( std::vector<class CEGLImage*>& vector, class CEGLImage*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
134 |
template void DeleteObjectByPointer( std::vector<class CEGLImage*>& vector, void* item ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
135 |
template void DestroyPointerVector( std::vector<class CEGLImage*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
136 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
137 |
// CEGLThread |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
138 |
template void AddObject( std::vector<class CEGLThread*>& vector, class CEGLThread*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
139 |
template void DeleteObjectById( std::vector<class CEGLThread*>& vector, EGLint id ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
140 |
template void DestroyPointerVector( std::vector<class CEGLThread*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
141 |
template class CEGLThread* FindObjectById( const std::vector<class CEGLThread*>& vector, EGLint id, int* index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
142 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
143 |
// CEGLProcess |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
144 |
template void AddObject( std::vector<class CEGLProcess*>& vector, class CEGLProcess*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
145 |
template void DestroyPointerVector( std::vector<class CEGLProcess*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
146 |
template void DeleteObjectById( std::vector<class CEGLProcess*>& vector, EGLint id ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
147 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
148 |
// CEGLDisplay |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
149 |
template void AddObject( std::vector<class CEGLDisplay*>& vector, class CEGLDisplay*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
150 |
template class CEGLDisplay* FindObjectByPointer( const std::vector<class CEGLDisplay*>& vector, void* item, int* index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
151 |
template void DeleteObjectByPointer( std::vector<class CEGLDisplay*>& vector, void* item ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
152 |
template void DestroyPointerVector( std::vector<class CEGLDisplay*>& vector ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
153 |
|
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
154 |
// CEGLConfig |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
155 |
template void AddObject( std::vector<class CEGLConfig*>& vector, class CEGLConfig*& object ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
156 |
template class CEGLConfig* FindObjectByPointer( const std::vector<class CEGLConfig*>& vector, void* item, int* index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
157 |
template class CEGLConfig* FindObjectById( const std::vector<class CEGLConfig*>& vector, EGLint id, int* index ); |
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
158 |
template void DestroyPointerVector( std::vector<class CEGLConfig*>& vector ); |