author | Matt Plumtree <matt.plumtree@nokia.com> |
Mon, 08 Nov 2010 15:39:31 +0000 | |
branch | bug235_bringup_0 |
changeset 73 | 11fc086941ac |
parent 67 | ca7e6949bf7a |
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 |
#include "EGLConfig.h" |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
32 |
#include "ColorDescriptor.h" |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
33 |
#include "TransparentColor.h" |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
34 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
35 |
const int KPbufferHeight = 16384; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
36 |
const int KPbufferWidth = 16384; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
37 |
const int KPbufferPixels = KPbufferHeight * KPbufferWidth; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
38 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
39 |
CEGLConfig::CEGLConfig(void) : |
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
40 |
m_nativeVisualId( 0 ) |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
41 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
42 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
43 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
44 |
CEGLConfig::CEGLConfig( CColorDescriptor& colorDescriptor, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
45 |
EGLBoolean bindToTexRGB, /* EGL_BIND_TO_TEXTURE_RGB*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
46 |
EGLBoolean bindToTexRGBA, /* EGL_BIND_TO_TEXTURE_RGBA */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
47 |
EGLenum configCaveat, /* EGL_CONFIG_CAVEAT */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
48 |
EGLint configId, /* EGL_CONFIG_ID */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
49 |
EGLint conformant, /* EGL_CONFORMANT */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
50 |
EGLint depthSize, /* EGL_DEPTH_SIZE */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
51 |
EGLint level, /* EGL_LEVEL */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
52 |
EGLint maxSwapInterval, /* EGL_MAX_SWAP_INTERVAL */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
53 |
EGLint minSwapInterval, /* EGL_MIN_SWAP_INTERVAL */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
54 |
EGLBoolean nativeRenderable, /* EGL_NATIVE_RENDERABLE */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
55 |
EGLint nativeVisualType, /* EGL_NATIVE_VIDUAL_TYPE */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
56 |
EGLint renderableType, /* EGL_RENDERABLE_TYPE */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
57 |
EGLint sampleBuffers, /* EGL_SAMPLE_BUFFERS */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
58 |
EGLint samples, /* EGL_SAMPLES */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
59 |
EGLint stencilSize, /* EGL_STENCIL_SIZE */ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
60 |
EGLint surfaceType, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
61 |
CTransparentColor* transparentColor) : |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
62 |
m_bindToTexRGB( bindToTexRGB ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
63 |
m_bindToTexRGBA( bindToTexRGBA ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
64 |
m_configCaveat( configCaveat ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
65 |
m_configId( configId ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
66 |
m_conformant( conformant ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
67 |
m_depthSize( depthSize ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
68 |
m_level( level ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
69 |
m_maxPbufferWidth( KPbufferWidth ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
70 |
m_maxPbufferHeight( KPbufferHeight ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
71 |
m_maxPbufferPixels( KPbufferPixels ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
72 |
m_maxSwapInterval( maxSwapInterval ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
73 |
m_minSwapInterval( minSwapInterval ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
74 |
m_nativeRenderable( nativeRenderable ), |
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
75 |
m_nativeVisualId( 0 ), |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
76 |
m_nativeVisualType( nativeVisualType ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
77 |
m_renderableType( renderableType ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
78 |
m_sampleBuffers( samples > 1 ? 1 : 0 ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
79 |
m_samples( samples ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
80 |
m_stencilSize( stencilSize ), |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
81 |
m_surfaceType( surfaceType ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
82 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
83 |
m_colorDescriptor = colorDescriptor; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
84 |
if( m_colorDescriptor.isLuminance() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
85 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
86 |
m_bufferSize = m_colorDescriptor.LuminanceSize() + m_colorDescriptor.AlphaSize(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
87 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
88 |
else |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
89 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
90 |
m_bufferSize = m_colorDescriptor.RedSize() + |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
91 |
m_colorDescriptor.GreenSize() + |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
92 |
m_colorDescriptor.BlueSize() + |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
93 |
m_colorDescriptor.AlphaSize(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
94 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
95 |
if( transparentColor ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
96 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
97 |
m_transparentColor = *transparentColor; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
98 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
99 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
100 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
101 |
CEGLConfig::~CEGLConfig(void) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
102 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
103 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
104 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
105 |
EGLint CEGLConfig::SetUpConfig( EGLint red, EGLint green, EGLint blue, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
106 |
EGLint luminance, EGLint alpha, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
107 |
EGLint alphaMask, EGLint samples, EGLint bpp, EGLint id ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
108 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
109 |
int ret = EGL_SUCCESS; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
110 |
int rgb = red + green + blue; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
111 |
if( luminance && rgb ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
112 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
113 |
return EGL_BAD_PARAMETER; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
114 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
115 |
m_colorDescriptor.Set( red, green, blue, luminance, false, alpha, true, alphaMask, bpp ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
116 |
//m_colorDescriptor = EGLI_NEW CColorDescriptor( red, green, blue, luminance, false, alpha, true, alphaMask, bpp ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
117 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
118 |
m_configId = id; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
119 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
120 |
if( m_colorDescriptor.isLuminance() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
121 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
122 |
m_bufferSize = luminance + alpha; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
123 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
124 |
else |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
125 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
126 |
m_bufferSize = red + green + blue + alpha; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
127 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
128 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
129 |
if( rgb ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
130 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
131 |
m_bindToTexRGB = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
132 |
m_bindToTexRGBA = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
133 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
134 |
else |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
135 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
136 |
m_bindToTexRGB = EGL_FALSE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
137 |
m_bindToTexRGBA = EGL_FALSE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
138 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
139 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
140 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
141 |
The EGL_CONFIG_CAVEAT attribute may be set to one of the following values: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
142 |
EGL_NONE, EGL_SLOW_CONFIG or EGL_NON_CONFORMANT_CONFIG. If the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
143 |
attribute is set to EGL_NONE then the configuration has no caveats; if it is set to |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
144 |
EGL_SLOW_CONFIG then rendering to a surface with this configuration may run at |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
145 |
reduced performance (for example, the hardware may not support the color buffer |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
146 |
depths described by the configuration); if it is set to EGL_NON_CONFORMANT_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
147 |
CONFIG then rendering to a surface with this configuration will not pass the required |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
148 |
OpenGL ES conformance tests (note that EGL_NON_CONFORMANT_CONFIG |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
149 |
is obsolete, and the same information can be obtained from the EGL_CONFORMANT |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
150 |
attribute on a per-client-API basis, not just for OpenGL ES ). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
151 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
152 |
m_configCaveat = EGL_NONE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
153 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
154 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
155 |
Same as EGL_RENDERABLE_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
156 |
EGL_OPENGL_ES_BIT, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
157 |
EGL_OPENVG_BIT, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
158 |
EGL_OPENGL_ES2_BIT, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
159 |
EGL_OPENGL_BIT |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
160 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
161 |
m_conformant = EGL_OPENGL_ES2_BIT;//0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
162 |
m_renderableType = EGL_OPENVG_BIT | EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
163 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
164 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
165 |
The Depth Buffer |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
166 |
The depth buffer is shared by OpenGL and OpenGL ES . It contains fragment |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
167 |
depth (Z) information generated during rasterization. EGL_DEPTH_SIZE indicates |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
168 |
the depth of this buffer in bits. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
169 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
170 |
m_depthSize = 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
171 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
172 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
173 |
EGL_LEVEL is the framebuffer overlay or underlay level in which an |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
174 |
EGLSurface created with eglCreateWindowSurface will be placed. Level zero |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
175 |
indicates the default layer. The behavior of windows placed in overlay and under- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
176 |
lay levels depends on the underlying native window system. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
177 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
178 |
m_level = 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
179 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
180 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
181 |
EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT indicate the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
182 |
maximum width and height that can be passed into eglCreatePbufferSurface, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
183 |
and EGL_MAX_PBUFFER_PIXELS indicates the maximum number of pixels (width |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
184 |
times height) for a pbuffer surface. Note that an implementation may return a value |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
185 |
for EGL_MAX_PBUFFER_PIXELS that is less than the maximum width times the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
186 |
maximum height. The value for EGL_MAX_PBUFFER_PIXELS is static and assumes |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
187 |
that no other pbuffers or native resources are contending for the framebuffer |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
188 |
memory. Thus it may not be possible to allocate a pbuffer of the size given by |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
189 |
EGL_MAX_PBUFFER_PIXELS. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
190 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
191 |
m_maxPbufferHeight = KPbufferHeight; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
192 |
m_maxPbufferWidth = KPbufferWidth; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
193 |
m_maxPbufferPixels = KPbufferPixels; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
194 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
195 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
196 |
EGL_MAX_SWAP_INTERVAL is the maximum value that can be passed to |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
197 |
eglSwapInterval, and indicates the number of swap intervals that will elapse before |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
198 |
a buffer swap takes place after calling eglSwapBuffers. Larger values will be |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
199 |
silently clamped to this value. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
200 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
201 |
m_maxSwapInterval = 1; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
202 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
203 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
204 |
EGL_MIN_SWAP_INTERVAL is the minimum value that can be passed to |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
205 |
eglSwapInterval, and indicates the number of swap intervals that will elapse before |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
206 |
a buffer swap takes place after calling eglSwapBuffers. Smaller values will |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
207 |
be silently clamped to this value. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
208 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
209 |
m_minSwapInterval = 1; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
210 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
211 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
212 |
EGL_NATIVE_RENDERABLE is an EGLBoolean indicating whether the native |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
213 |
window system can be used to render into a surface created with the EGLConfig. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
214 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
215 |
m_nativeRenderable = EGL_FALSE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
216 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
217 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
218 |
If an EGLConfig supports windows then it may have an associated native visual. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
219 |
EGL_NATIVE_VISUAL_ID specifies an identifier for this visual, and EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
220 |
NATIVE_VISUAL_TYPE specifies its type. If an EGLConfig does not support |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
221 |
windows, or if there is no associated native visual type, then querying EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
222 |
NATIVE_VISUAL_ID will return 0 and querying EGL_NATIVE_VISUAL_TYPE |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
223 |
will return EGL_NONE. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
224 |
The interpretation of the native visual identifier and type is platform-dependent. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
225 |
For example, if the native window system is X, then the identifier will be the XID |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
226 |
of an X Visual. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
227 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
228 |
m_nativeVisualId = 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
229 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
230 |
m_nativeVisualType = EGL_NONE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
231 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
232 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
233 |
EGL_SAMPLE_BUFFERS indicates the number of multisample buffers, which |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
234 |
must be zero or one. EGL_SAMPLES gives the number of samples per pixel; if |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
235 |
EGL_SAMPLE_BUFFERS is zero, then EGL_SAMPLES will also be zero. If EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
236 |
SAMPLE_BUFFERS is one, then the number of color, depth, and stencil bits for each |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
237 |
sample in the multisample buffer are as specified by the EGL_*_SIZE attributes. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
238 |
There are no single-sample depth or stencil buffers for a multisample |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
239 |
EGLConfig; the only depth and stencil buffers are those in the multisample |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
240 |
buffer. If the color samples in the multisample buffer store fewer bits than are |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
241 |
stored in the color buffers, this fact will not be reported accurately. Presumably a |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
242 |
compression scheme is being employed, and is expected to maintain an aggregate |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
243 |
resolution equal to that of the color buffers. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
244 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
245 |
m_samples = samples; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
246 |
m_sampleBuffers = samples > 1 ? 1 : 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
247 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
248 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
249 |
The stencil buffer is shared by OpenGL and OpenGL ES . It contains fragment |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
250 |
stencil information generated during rasterization. EGL_STENCIL_SIZE indicates |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
251 |
the depth of this buffer in bits. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
252 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
253 |
m_stencilSize = 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
254 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
255 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
256 |
EGL_SURFACE_TYPE is a mask indicating capabilities of surfaces that can be |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
257 |
created with the corresponding EGLConfig (the config is said to support these |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
258 |
surface types). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
259 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
260 |
EGL_SURFACE_TYPE is a mask indicating capabilities of surfaces that can be |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
261 |
created with the corresponding EGLConfig (the config is said to support these |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
262 |
surface types). The valid bit settings are shown in Table 3.2. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
263 |
For example, an EGLConfig for which the value of the EGL_SURFACE_TYPE |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
264 |
attribute is |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
265 |
EGL_WINDOW_BIT j EGL_PIXMAP_BIT j EGL_PBUFFER_BIT |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
266 |
can be used to create any type of EGL surface, while an EGLConfig for which this |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
267 |
attribute value is EGL_WINDOW_BIT cannot be used to create a pbuffer or pixmap. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
268 |
If EGL_MULTISAMPLE_RESOLVE_BOX_BIT is set in EGL_SURFACE_TYPE, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
269 |
then the EGL_MULTISAMPLE_RESOLVE attribute of a surface can be specified as a |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
270 |
box filter with eglSurfaceAttrib (see section 3.5.6). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
271 |
If EGL_SWAP_BEHAVIOR_PRESERVED_BIT is set in EGL_SURFACE_TYPE, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
272 |
then the EGL_SWAP_BEHAVIOR attribute of a surface can be specified to preserve |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
273 |
color buffer contents using eglSurfaceAttrib (see section 3.5.6). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
274 |
If EGL_VG_COLORSPACE_LINEAR_BIT is set in EGL_SURFACE_TYPE, then |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
275 |
the EGL_VG_COLORSPACE attribute may be set to EGL_VG_COLORSPACE_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
276 |
LINEAR when creating a window, pixmap, or pbuffer surface (see section 3.5). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
277 |
If EGL_VG_ALPHA_FORMAT_PRE_BIT is set in EGL_SURFACE_TYPE, then the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
278 |
EGL_VG_ALPHA_FORMAT attribute may be set to EGL_VG_ALPHA_FORMAT_PRE |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
279 |
when creating a window, pixmap, or pbuffer surface (see section 3.5). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
280 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
281 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
282 |
m_surfaceType = EGL_WINDOW_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
283 |
EGL_PBUFFER_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
284 |
//EGL_VG_COLORSPACE_LINEAR_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
285 |
EGL_VG_ALPHA_FORMAT_PRE_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
286 |
EGL_SWAP_BEHAVIOR_PRESERVED_BIT; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
287 |
m_colorDescriptor.SetSurfaceType( m_surfaceType ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
288 |
m_surfaceType |= EGL_VG_COLORSPACE_LINEAR_BIT; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
289 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
290 |
/* |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
291 |
If EGL_TRANSPARENT_TYPE is EGL_NONE, then the values for EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
292 |
TRANSPARENT_RED_VALUE, EGL_TRANSPARENT_GREEN_VALUE, and EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
293 |
TRANSPARENT_BLUE_VALUE are undefined. Otherwise, they are interpreted as |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
294 |
integer framebuffer values between 0 and the maximum framebuffer value for the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
295 |
component. For example, EGL_TRANSPARENT_RED_VALUE will range between 0 |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
296 |
and 2EGL_RED_SIZE 1. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
297 |
*/ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
298 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
299 |
return ret; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
300 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
301 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
302 |
EGLBoolean CEGLConfig::SetAttribute( EGLint attribute, EGLint value ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
303 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
304 |
EGLBoolean ret = EGL_FALSE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
305 |
switch( attribute ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
306 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
307 |
case EGL_BUFFER_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
308 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
309 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
310 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
311 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
312 |
m_bufferSize = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
313 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
314 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
315 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
316 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
317 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
318 |
case EGL_BLUE_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
319 |
case EGL_GREEN_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
320 |
case EGL_RED_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
321 |
case EGL_LUMINANCE_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
322 |
case EGL_ALPHA_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
323 |
case EGL_ALPHA_MASK_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
324 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
325 |
if( (value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
326 |
value >= 0) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
327 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
328 |
m_colorDescriptor.SetAttribute( attribute, value ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
329 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
330 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
331 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
332 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
333 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
334 |
case EGL_COLOR_BUFFER_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
335 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
336 |
if( (value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
337 |
value == EGL_RGB_BUFFER || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
338 |
value == EGL_LUMINANCE_BUFFER) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
339 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
340 |
m_colorDescriptor.SetAttribute( attribute, value ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
341 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
342 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
343 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
344 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
345 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
346 |
case EGL_DEPTH_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
347 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
348 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
349 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
350 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
351 |
m_depthSize = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
352 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
353 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
354 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
355 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
356 |
case EGL_STENCIL_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
357 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
358 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
359 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
360 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
361 |
m_stencilSize = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
362 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
363 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
364 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
365 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
366 |
case EGL_CONFIG_CAVEAT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
367 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
368 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
369 |
value == EGL_NONE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
370 |
value == EGL_SLOW_CONFIG || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
371 |
value == EGL_NON_CONFORMANT_CONFIG ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
372 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
373 |
m_configCaveat = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
374 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
375 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
376 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
377 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
378 |
case EGL_CONFIG_ID: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
379 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
380 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
381 |
value > 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
382 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
383 |
m_configId = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
384 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
385 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
386 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
387 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
388 |
case EGL_LEVEL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
389 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
390 |
// \todo validate value |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
391 |
m_level = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
392 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
393 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
394 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
395 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
396 |
case EGL_NATIVE_VISUAL_ID: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
397 |
case EGL_MAX_PBUFFER_HEIGHT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
398 |
case EGL_MAX_PBUFFER_PIXELS: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
399 |
case EGL_MAX_PBUFFER_WIDTH: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
400 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
401 |
// \todo? |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
402 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
403 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
404 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
405 |
case EGL_NATIVE_RENDERABLE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
406 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
407 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
408 |
value == EGL_TRUE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
409 |
value == EGL_FALSE ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
410 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
411 |
m_nativeRenderable = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
412 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
413 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
414 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
415 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
416 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
417 |
case EGL_NATIVE_VISUAL_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
418 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
419 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
420 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
421 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
422 |
m_nativeVisualType = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
423 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
424 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
425 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
426 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
427 |
case EGL_SAMPLES: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
428 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
429 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
430 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
431 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
432 |
m_samples = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
433 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
434 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
435 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
436 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
437 |
case EGL_SAMPLE_BUFFERS: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
438 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
439 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
440 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
441 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
442 |
m_sampleBuffers = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
443 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
444 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
445 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
446 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
447 |
case EGL_SURFACE_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
448 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
449 |
if( (value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
450 |
!(value & ~(EGL_WINDOW_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
451 |
EGL_PIXMAP_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
452 |
EGL_PBUFFER_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
453 |
EGL_MULTISAMPLE_RESOLVE_BOX_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
454 |
EGL_SWAP_BEHAVIOR_PRESERVED_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
455 |
EGL_VG_COLORSPACE_LINEAR_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
456 |
EGL_VG_ALPHA_FORMAT_PRE_BIT))) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
457 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
458 |
m_colorDescriptor.SetSurfaceType(value); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
459 |
m_surfaceType = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
460 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
461 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
462 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
463 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
464 |
case EGL_TRANSPARENT_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
465 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
466 |
if( (value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
467 |
value == EGL_NONE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
468 |
value == EGL_TRANSPARENT_RGB) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
469 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
470 |
m_transparentColor.SetAttribute( attribute, value ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
471 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
472 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
473 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
474 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
475 |
case EGL_TRANSPARENT_BLUE_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
476 |
case EGL_TRANSPARENT_GREEN_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
477 |
case EGL_TRANSPARENT_RED_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
478 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
479 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
480 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
481 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
482 |
// \todo If EGL_TRANSPARENT_TYPE is EGL_NONE, then the values for EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
483 |
// TRANSPARENT_RED_VALUE, EGL_TRANSPARENT_GREEN_VALUE, and EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
484 |
// TRANSPARENT_BLUE_VALUE are undefined. Otherwise, they are interpreted as |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
485 |
// integer framebuffer values between 0 and the maximum framebuffer value for the |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
486 |
// component. For example, EGL_TRANSPARENT_RED_VALUE will range between 0 |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
487 |
// and 2^EGL_RED_SIZE - 1. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
488 |
m_transparentColor.SetAttribute( attribute, value ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
489 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
490 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
491 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
492 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
493 |
case EGL_BIND_TO_TEXTURE_RGB: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
494 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
495 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
496 |
value == EGL_TRUE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
497 |
value == EGL_FALSE ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
498 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
499 |
m_bindToTexRGB = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
500 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
501 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
502 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
503 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
504 |
case EGL_BIND_TO_TEXTURE_RGBA: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
505 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
506 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
507 |
value == EGL_TRUE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
508 |
value == EGL_FALSE ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
509 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
510 |
m_bindToTexRGBA = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
511 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
512 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
513 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
514 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
515 |
case EGL_MIN_SWAP_INTERVAL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
516 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
517 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
518 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
519 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
520 |
m_minSwapInterval = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
521 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
522 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
523 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
524 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
525 |
case EGL_MAX_SWAP_INTERVAL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
526 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
527 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
528 |
value >= 0 ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
529 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
530 |
m_maxSwapInterval = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
531 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
532 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
533 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
534 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
535 |
case EGL_RENDERABLE_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
536 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
537 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
538 |
!(value & ~(EGL_OPENGL_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
539 |
EGL_OPENGL_ES_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
540 |
EGL_OPENGL_ES2_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
541 |
EGL_OPENVG_BIT)) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
542 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
543 |
m_renderableType = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
544 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
545 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
546 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
547 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
548 |
case EGL_CONFORMANT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
549 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
550 |
if( value == EGL_DONT_CARE || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
551 |
!(value & ~(EGL_OPENGL_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
552 |
EGL_OPENGL_ES_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
553 |
EGL_OPENGL_ES2_BIT | |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
554 |
EGL_OPENVG_BIT)) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
555 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
556 |
m_conformant = value; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
557 |
ret = EGL_TRUE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
558 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
559 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
560 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
561 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
562 |
default: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
563 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
564 |
// Unknown attribute |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
565 |
EGLI_ASSERT( false ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
566 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
567 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
568 |
return ret; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
569 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
570 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
571 |
EGLint CEGLConfig::GetAttribute( EGLint attribute ) const |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
572 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
573 |
EGLint ret = 0; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
574 |
switch( attribute ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
575 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
576 |
case EGL_BUFFER_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
577 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
578 |
ret = m_bufferSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
579 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
580 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
581 |
case EGL_BLUE_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
582 |
case EGL_GREEN_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
583 |
case EGL_RED_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
584 |
case EGL_LUMINANCE_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
585 |
case EGL_ALPHA_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
586 |
case EGL_ALPHA_MASK_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
587 |
case EGL_COLOR_BUFFER_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
588 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
589 |
ret = m_colorDescriptor.GetAttribute( attribute ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
590 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
591 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
592 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
593 |
case EGL_DEPTH_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
594 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
595 |
ret = m_depthSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
596 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
597 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
598 |
case EGL_STENCIL_SIZE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
599 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
600 |
ret = m_stencilSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
601 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
602 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
603 |
case EGL_CONFIG_CAVEAT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
604 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
605 |
ret = m_configCaveat; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
606 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
607 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
608 |
case EGL_CONFIG_ID: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
609 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
610 |
ret = m_configId; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
611 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
612 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
613 |
case EGL_LEVEL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
614 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
615 |
ret = m_level; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
616 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
617 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
618 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
619 |
case EGL_NATIVE_VISUAL_ID: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
620 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
621 |
ret = m_nativeVisualId; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
622 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
623 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
624 |
case EGL_MAX_PBUFFER_HEIGHT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
625 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
626 |
ret = m_maxPbufferHeight; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
627 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
628 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
629 |
case EGL_MAX_PBUFFER_PIXELS: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
630 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
631 |
ret = m_maxPbufferPixels; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
632 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
633 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
634 |
case EGL_MAX_PBUFFER_WIDTH: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
635 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
636 |
ret = m_maxPbufferWidth; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
637 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
638 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
639 |
case EGL_NATIVE_RENDERABLE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
640 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
641 |
ret = m_nativeRenderable; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
642 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
643 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
644 |
case EGL_NATIVE_VISUAL_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
645 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
646 |
ret = m_nativeVisualType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
647 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
648 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
649 |
case EGL_SAMPLES: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
650 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
651 |
ret = m_samples; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
652 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
653 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
654 |
case EGL_SAMPLE_BUFFERS: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
655 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
656 |
ret = m_sampleBuffers; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
657 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
658 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
659 |
case EGL_SURFACE_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
660 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
661 |
ret = m_surfaceType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
662 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
663 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
664 |
case EGL_TRANSPARENT_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
665 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
666 |
ret = m_transparentColor.Type(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
667 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
668 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
669 |
case EGL_TRANSPARENT_BLUE_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
670 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
671 |
ret = m_transparentColor.BlueValue(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
672 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
673 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
674 |
case EGL_TRANSPARENT_GREEN_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
675 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
676 |
ret = m_transparentColor.GreenValue(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
677 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
678 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
679 |
case EGL_TRANSPARENT_RED_VALUE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
680 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
681 |
ret = m_transparentColor.RedValue(); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
682 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
683 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
684 |
case EGL_BIND_TO_TEXTURE_RGB: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
685 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
686 |
ret = m_bindToTexRGB; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
687 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
688 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
689 |
case EGL_BIND_TO_TEXTURE_RGBA: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
690 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
691 |
ret = m_bindToTexRGBA; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
692 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
693 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
694 |
case EGL_MIN_SWAP_INTERVAL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
695 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
696 |
ret = m_minSwapInterval; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
697 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
698 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
699 |
case EGL_MAX_SWAP_INTERVAL: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
700 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
701 |
ret = m_maxSwapInterval; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
702 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
703 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
704 |
case EGL_RENDERABLE_TYPE: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
705 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
706 |
ret = m_renderableType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
707 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
708 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
709 |
case EGL_CONFORMANT: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
710 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
711 |
ret = m_conformant; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
712 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
713 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
714 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
715 |
default: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
716 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
717 |
ret = EGL_BAD_ATTRIBUTE; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
718 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
719 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
720 |
return ret; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
721 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
722 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
723 |
bool CEGLConfig::operator<( const CEGLConfig& rhs ) const |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
724 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
725 |
if( this == &rhs ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
726 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
727 |
return !(operator>(rhs)); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
728 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
729 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
730 |
bool CEGLConfig::operator>( const CEGLConfig& rhs ) const |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
731 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
732 |
if( this == &rhs ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
733 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
734 |
// 1 Special: by EGL_CONFIG_CAVEAT where the precedence is EGL_NONE, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
735 |
// EGL_SLOW_CONFIG, EGL_NON_CONFORMANT_CONFIG. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
736 |
if( m_configCaveat != rhs.m_configCaveat ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
737 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
738 |
// \note depends on EGL_NON_CONFORMANT_CONFIG > EGL_SLOW_CONFIG |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
739 |
if( rhs.m_configCaveat < m_configCaveat ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
740 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
741 |
if( m_configCaveat > rhs.m_configCaveat ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
742 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
743 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
744 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
745 |
// 2 Special: by EGL_COLOR_BUFFER_TYPE where the precedence is EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
746 |
// RGB_BUFFER, EGL_LUMINANCE_BUFFER. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
747 |
if( !(m_colorDescriptor.isLuminance()) && rhs.m_colorDescriptor.isLuminance() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
748 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
749 |
if( m_colorDescriptor.isLuminance() && !(rhs.m_colorDescriptor.isLuminance()) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
750 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
751 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
752 |
// 3 Special: by larger total number of color bits (for an RGB color buffer, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
753 |
// this is the sum of EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE, |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
754 |
// and EGL_ALPHA_SIZE; for a luminance color buffer, the sum of EGL_- |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
755 |
// LUMINANCE_SIZE and EGL_ALPHA_SIZE) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
756 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
757 |
// \todo If the requested number of bits in attrib list for a particular color |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
758 |
// component is 0 or EGL_DONT_CARE, then the number of bits for that component |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
759 |
// is not considered. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
760 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
761 |
if( m_bufferSize > rhs.m_bufferSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
762 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
763 |
if( rhs.m_bufferSize > m_bufferSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
764 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
765 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
766 |
if( m_sampleBuffers > rhs.m_sampleBuffers ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
767 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
768 |
if( rhs.m_sampleBuffers > m_sampleBuffers ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
769 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
770 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
771 |
if( m_samples > rhs.m_samples ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
772 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
773 |
if( rhs.m_samples > m_samples ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
774 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
775 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
776 |
if( m_depthSize > rhs.m_depthSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
777 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
778 |
if( rhs.m_depthSize > m_depthSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
779 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
780 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
781 |
if( m_stencilSize > rhs.m_stencilSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
782 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
783 |
if( rhs.m_stencilSize > m_stencilSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
784 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
785 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
786 |
if( m_colorDescriptor.AlphaMaskSize() > rhs.m_colorDescriptor.AlphaMaskSize() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
787 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
788 |
if( rhs.m_colorDescriptor.AlphaMaskSize() > m_colorDescriptor.AlphaMaskSize() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
789 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
790 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
791 |
// \todo Special: by EGL_NATIVE_VISUAL_TYPE (the actual sort order is |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
792 |
// implementation-defined, depending on the meaning of native visual types). |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
793 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
794 |
if( m_configId > rhs.m_configId ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
795 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
796 |
if( rhs.m_configId > m_configId ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
797 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
798 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
799 |
// Shouldn't reach this point. |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
800 |
EGLI_ASSERT( false ); |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
801 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
802 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
803 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
804 |
bool CEGLConfig::Match( const CEGLConfig& filter ) const |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
805 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
806 |
if( this == &filter ) return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
807 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
808 |
if( m_bufferSize < filter.m_bufferSize ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
809 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
810 |
if( m_colorDescriptor.RedSize() < filter.m_colorDescriptor.RedSize() || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
811 |
m_colorDescriptor.GreenSize() < filter.m_colorDescriptor.GreenSize() || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
812 |
m_colorDescriptor.BlueSize() < filter.m_colorDescriptor.BlueSize() || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
813 |
m_colorDescriptor.AlphaSize() < filter.m_colorDescriptor.AlphaSize() ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
814 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
815 |
if( m_colorDescriptor.AlphaMaskSize() < filter.m_colorDescriptor.AlphaMaskSize() ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
816 |
|
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
817 |
if( (EGLint)filter.m_bindToTexRGB != EGL_DONT_CARE && (m_bindToTexRGB != filter.m_bindToTexRGB) ) return false; |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
818 |
|
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
819 |
if( (EGLint)filter.m_bindToTexRGBA != EGL_DONT_CARE && (m_bindToTexRGBA != filter.m_bindToTexRGBA) ) return false; |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
820 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
821 |
if( filter.m_colorDescriptor.Format() != EGL_DONT_CARE ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
822 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
823 |
EGLint thisBufType = m_colorDescriptor.isLuminance() ? EGL_LUMINANCE_BUFFER : EGL_RGB_BUFFER; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
824 |
EGLint filterBufType = filter.m_colorDescriptor.isLuminance() ? EGL_LUMINANCE_BUFFER : EGL_RGB_BUFFER; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
825 |
if( thisBufType != filterBufType ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
826 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
827 |
|
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
828 |
if( (EGLint)filter.m_configCaveat != EGL_DONT_CARE && (m_configCaveat != filter.m_configCaveat) ) return false; |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
829 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
830 |
if( m_configId == filter.m_configId ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
831 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
832 |
if( (filter.m_conformant & m_conformant) != filter.m_conformant ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
833 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
834 |
if( m_depthSize < filter.m_depthSize ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
835 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
836 |
if( m_level != filter.m_level ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
837 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
838 |
if( filter.m_maxSwapInterval != EGL_DONT_CARE && (m_maxSwapInterval != filter.m_maxSwapInterval) ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
839 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
840 |
if( filter.m_minSwapInterval != EGL_DONT_CARE && (m_minSwapInterval != filter.m_minSwapInterval) ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
841 |
|
67
ca7e6949bf7a
Add hostegl bld.inf info for building exporting and building the library.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
53
diff
changeset
|
842 |
if( (EGLint)filter.m_nativeRenderable != EGL_DONT_CARE && (m_nativeRenderable != filter.m_nativeRenderable) ) return false; |
53
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
843 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
844 |
if( filter.m_nativeVisualType != EGL_DONT_CARE && (m_nativeVisualType != filter.m_nativeVisualType) ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
845 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
846 |
if( (filter.m_renderableType & m_renderableType) != filter.m_renderableType ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
847 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
848 |
if( m_sampleBuffers < filter.m_sampleBuffers ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
849 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
850 |
if( m_samples < filter.m_samples ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
851 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
852 |
if( m_stencilSize < filter.m_stencilSize ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
853 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
854 |
if( (filter.m_surfaceType & m_surfaceType) != filter.m_surfaceType ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
855 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
856 |
if( filter.m_transparentColor.Type() != m_transparentColor.Type() ) return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
857 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
858 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
859 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
860 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
861 |
CEGLConfig& CEGLConfig::operator=( const CEGLConfig& rhs ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
862 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
863 |
if( this == &rhs ) return *this; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
864 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
865 |
m_bufferSize = rhs.m_bufferSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
866 |
m_colorDescriptor = rhs.m_colorDescriptor; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
867 |
m_bindToTexRGB = rhs.m_bindToTexRGB; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
868 |
m_bindToTexRGBA = rhs.m_bindToTexRGBA; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
869 |
m_configCaveat = rhs.m_configCaveat; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
870 |
m_configId = rhs.m_configId; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
871 |
m_conformant = rhs.m_conformant; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
872 |
m_depthSize = rhs.m_depthSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
873 |
m_level = rhs.m_level; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
874 |
m_maxPbufferWidth = rhs.m_maxPbufferWidth; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
875 |
m_maxPbufferHeight = rhs.m_maxPbufferHeight; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
876 |
m_maxPbufferPixels = rhs.m_maxPbufferPixels; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
877 |
m_maxSwapInterval = rhs.m_maxSwapInterval; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
878 |
m_minSwapInterval = rhs.m_minSwapInterval; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
879 |
m_nativeRenderable = rhs.m_nativeRenderable; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
880 |
m_nativeVisualId = rhs.m_nativeVisualId; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
881 |
m_nativeVisualType = rhs.m_nativeVisualType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
882 |
m_renderableType = rhs.m_renderableType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
883 |
m_sampleBuffers = rhs.m_sampleBuffers; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
884 |
m_samples = rhs.m_samples; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
885 |
m_stencilSize = rhs.m_stencilSize; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
886 |
m_surfaceType = rhs.m_surfaceType; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
887 |
m_transparentColor = rhs.m_transparentColor; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
888 |
return *this; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
889 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
890 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
891 |
bool CEGLConfig::IsCompatible( const CEGLConfig& config, const EGLenum contextApi ) const |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
892 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
893 |
if( m_colorDescriptor.isLuminance() != config.m_colorDescriptor.isLuminance() ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
894 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
895 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
896 |
if( m_colorDescriptor.isLuminance() && |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
897 |
(m_colorDescriptor.m_luminanceSize != config.m_colorDescriptor.m_luminanceSize || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
898 |
m_colorDescriptor.m_alphaSize != config.m_colorDescriptor.m_alphaSize) ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
899 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
900 |
else if ( m_colorDescriptor.m_redSize != config.m_colorDescriptor.m_redSize || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
901 |
m_colorDescriptor.m_greenSize != config.m_colorDescriptor.m_greenSize || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
902 |
m_colorDescriptor.m_blueSize != config.m_colorDescriptor.m_blueSize || |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
903 |
m_colorDescriptor.m_alphaSize != config.m_colorDescriptor.m_alphaSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
904 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
905 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
906 |
if( m_samples != config.m_samples ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
907 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
908 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
909 |
switch( contextApi ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
910 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
911 |
case EGL_OPENVG_API: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
912 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
913 |
if( m_colorDescriptor.m_alphaMaskSize != config.m_colorDescriptor.m_alphaMaskSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
914 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
915 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
916 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
917 |
case EGL_OPENGL_ES_API: |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
918 |
{ |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
919 |
if( m_stencilSize != config.m_stencilSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
920 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
921 |
if( m_depthSize != config.m_depthSize ) |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
922 |
return false; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
923 |
|
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
924 |
break; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
925 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
926 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
927 |
return true; |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
928 |
} |
c2ef9095503a
Copy code from the holdingarea into the target locations.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff
changeset
|
929 |