author | Matt Plumtree <matt.plumtree@nokia.com> |
Mon, 18 Oct 2010 18:24:13 +0100 | |
branch | bug235_bringup_0 |
changeset 67 | ca7e6949bf7a |
parent 53 | c2ef9095503a |
permissions | -rw-r--r-- |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
1 |
/* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
2 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
3 |
* Permission is hereby granted, free of charge, to any person obtaining a |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
4 |
* copy of this software and /or associated documentation files |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
5 |
* (the "Materials "), to deal in the Materials without restriction, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
6 |
* including without limitation the rights to use, copy, modify, merge, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
7 |
* publish, distribute, sublicense, and/or sell copies of the Materials, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
8 |
* and to permit persons to whom the Materials are furnished to do so, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
9 |
* subject to the following conditions: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
10 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
11 |
* The above copyright notice and this permission notice shall be included |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
12 |
* in all copies or substantial portions of the Materials. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
13 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
14 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
15 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
17 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
18 |
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
19 |
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
20 |
* THE USE OR OTHER DEALINGS IN THE MATERIALS. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
21 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
22 |
* Initial Contributors: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
23 |
* Nokia Corporation - initial contribution. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
24 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
25 |
* Contributors: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
26 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
27 |
* Description: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
28 |
* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
29 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
30 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
31 |
#ifndef _EGLPBUFFERSURFACE_H_ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
32 |
#define _EGLPBUFFERSURFACE_H_ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
33 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
34 |
#include "EGLSurface.h" |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
35 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
36 |
class CEGLPbufferSurface : public CEGLSurface |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
37 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
38 |
public: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
39 |
CEGLPbufferSurface( EGLint colorSpace, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
40 |
EGLint alphaFormat, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
41 |
EGLint renderBuffer, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
42 |
CEGLConfig* config, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
43 |
EGLint largestPbuffer, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
44 |
EGLint textureFormat, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
45 |
EGLint textureTarget, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
46 |
EGLint mipmapTexture, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
47 |
EGLClientBuffer clientBuf = NULL ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
48 |
~CEGLPbufferSurface(void); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
49 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
50 |
public: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
51 |
inline EGLint IsLargestPbuffer() const { return m_largestPbuffer; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
52 |
inline EGLint TextureFormat() const { return m_textureFormat; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
53 |
inline EGLint TextureTarget() const { return m_textureTarget; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
54 |
inline EGLint MipmapTexture() const { return m_mipmapTexture; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
55 |
inline EGLClientBuffer ClientBuffer() const { return m_clientBuffer; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
56 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
57 |
void SetNativePbufferContainer( EGLINativePbufferContainer* container ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
58 |
inline EGLINativePbufferType NativePbuffer() const { return (m_container ? m_container->pbuffer : NULL); } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
59 |
inline EGLINativeContextType CopyContext() const { return (m_container ? m_container->copyContext : NULL); } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
60 |
inline EGLINativeDisplayType NativeDisplay() const { return (m_container ? m_container->display : NULL); } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
61 |
inline struct EGLINativeGLFunctions* NativeGLFunctions() const { if( m_container ) return &(m_container->functions); else return NULL; } |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
62 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
63 |
bool BindCopyContext(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
64 |
bool ReleaseCopyContext(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
65 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
66 |
private: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
67 |
CEGLPbufferSurface(void); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
68 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
69 |
private: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
70 |
EGLint m_largestPbuffer; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
71 |
EGLint m_textureFormat; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
72 |
EGLint m_textureTarget; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
73 |
EGLint m_mipmapTexture; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
74 |
EGLClientBuffer m_clientBuffer; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
75 |
struct EGLINativePbufferContainer* m_container; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
76 |
EGLINativeContextType m_tmpContext; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
77 |
EGLINativeDisplayType m_tmpDisplay; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
78 |
}; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
79 |
#endif //_EGLPBUFFERSURFACE_H_ |