|
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 #ifndef _GLES2INTERFACE_H_ |
|
32 #define _GLES2INTERFACE_H_ |
|
33 |
|
34 #include "GLESInterface.h" |
|
35 #include "SurfaceDescriptor.h" |
|
36 |
|
37 enum EImageTarget; |
|
38 |
|
39 enum EStatus { |
|
40 DGLES2_SUCCESS, |
|
41 DGLES2_BAD_PARAMETER, |
|
42 DGLES2_BAD_MATCH |
|
43 }; |
|
44 |
|
45 class CColorDescriptor; |
|
46 |
|
47 class IEGLtoGLES2Interface : public IEGLtoGLESInterface |
|
48 { |
|
49 public: |
|
50 virtual EStatus GetTextureInfo( void* context, EImageTarget target, void* texture, int textureLevel, SurfaceDescriptor& desc ) = 0; |
|
51 virtual EStatus GetTextureData( void* context, EImageTarget target, void* texture, int textureLevel, void* data ) = 0; |
|
52 virtual bool UpdateImageSibling( EImageTarget target, void* name ) = 0; |
|
53 }; |
|
54 |
|
55 typedef IEGLtoGLES2Interface* (*fpGetGLES2Interface)(void); |
|
56 IEGLtoGLES2Interface* LoadGLES2Interface( void*& libraryHandle ); |
|
57 |
|
58 #endif // _GLES2INTERFACE_H_ |