|
1 /* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 * |
|
3 * Permission is hereby granted, free of charge, to any person obtaining a |
|
4 * copy of this software and /or associated documentation files |
|
5 * (the "Materials "), to deal in the Materials without restriction, |
|
6 * including without limitation the rights to use, copy, modify, merge, |
|
7 * publish, distribute, sublicense, and/or sell copies of the Materials, |
|
8 * and to permit persons to whom the Materials are furnished to do so, |
|
9 * subject to the following conditions: |
|
10 * |
|
11 * The above copyright notice and this permission notice shall be included |
|
12 * in all copies or substantial portions of the Materials. |
|
13 * |
|
14 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
|
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|
19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
|
20 * THE USE OR OTHER DEALINGS IN THE MATERIALS. |
|
21 * |
|
22 * Initial Contributors: |
|
23 * Nokia Corporation - initial contribution. |
|
24 * |
|
25 * Contributors: |
|
26 * |
|
27 * Description: |
|
28 * |
|
29 */ |
|
30 |
|
31 |
|
32 #include "EGLContext.h" |
|
33 #include "EGLOs.h" |
|
34 |
|
35 CEGLContext::CEGLContext( EGLint processId, CEGLDisplay* display, |
|
36 CEGLConfig* config, EGLenum& clientApi, |
|
37 EGLint& clientVersion, void* clientContext ) : |
|
38 m_processId( processId ), |
|
39 m_thread( NULL ), |
|
40 m_config( config ), |
|
41 m_clientApi( clientApi ), |
|
42 m_clientVersion( clientVersion ), |
|
43 m_clientContext( clientContext ), |
|
44 m_display( display ), |
|
45 m_nativeContext( NULL ), |
|
46 m_nativeGLFunctions(NULL) |
|
47 { |
|
48 } |
|
49 |
|
50 CEGLContext::~CEGLContext(void) |
|
51 { |
|
52 // objects not owned |
|
53 m_sharedContexts.clear(); |
|
54 if( m_nativeContext ) CEGLOs::DestroyNativeContext( m_nativeContext ); |
|
55 delete m_nativeGLFunctions; |
|
56 } |