author | Faisal Memon <faisal.memon@nokia.com> |
Mon, 20 Sep 2010 14:29:05 +0100 | |
branch | bug235_bringup_0 |
changeset 24 | a3f46bb01be2 |
parent 20 | d2d6724aef32 |
permissions | -rw-r--r-- |
24 | 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 _EGLWINDOWSURFACE_H_ |
|
32 |
#define _EGLWINDOWSURFACE_H_ |
|
33 |
||
34 |
#include "EGLSurface.h" |
|
35 |
||
36 |
class CEGLWindowSurface : |
|
37 |
public CEGLSurface |
|
38 |
{ |
|
39 |
public: |
|
40 |
CEGLWindowSurface( CEGLConfig* config, EGLint colorSpace, EGLint alphaFormat, EGLint renderBuffer, EGLIOsWindowContext* osContext ); |
|
41 |
~CEGLWindowSurface(void); |
|
42 |
||
43 |
public: |
|
44 |
inline EGLINativeWindowType NativeType() const { EGLI_ASSERT( m_osContext != NULL); if( m_osContext ) return m_osContext->window; else return NULL; } |
|
45 |
inline void SetWindowBuffers( void* buffer0, void* buffer1 ) { m_buffer0 = buffer0; m_buffer1 = buffer1; } |
|
46 |
void* CurrentBuffer(); |
|
47 |
void SetSwapInterval( EGLint interval ); |
|
48 |
inline EGLint SwapInterval() const { return m_swapInterval; } |
|
49 |
void SetOsContext( EGLIOsWindowContext* osContext ); |
|
50 |
inline EGLIOsWindowContext* OsContext() const { return m_osContext; } |
|
51 |
||
52 |
private: |
|
53 |
CEGLWindowSurface(); |
|
54 |
||
55 |
private: |
|
56 |
void* m_buffer0; |
|
57 |
void* m_buffer1; |
|
58 |
void* m_currentBuffer; |
|
59 |
EGLint m_swapInterval; |
|
60 |
EGLIOsWindowContext* m_osContext; |
|
61 |
}; |
|
20
d2d6724aef32
Initial contribution of Khronos API implmentations suitable for simulator host-side.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
62 |
#endif //_EGLWINDOWSURFACE_H_ |