Merge lp:~glmark2-dev/glmark2/config-update into lp:glmark2/2011.11
- config-update
- Merge into trunk
Proposed by
Jesse Barker
Status: | Merged |
---|---|
Merged at revision: | 253 |
Proposed branch: | lp:~glmark2-dev/glmark2/config-update |
Merge into: | lp:glmark2/2011.11 |
Diff against target: |
331 lines (+100/-13) 7 files modified
android/src/org/linaro/glmark2/GLVisualConfig.java (+3/-1) android/src/org/linaro/glmark2/Glmark2SurfaceView.java (+6/-1) src/canvas-x11-glx.cpp (+7/-3) src/egl-state.cpp (+55/-4) src/egl-state.h (+21/-0) src/gl-visual-config.cpp (+4/-1) src/gl-visual-config.h (+4/-3) |
To merge this branch: | bzr merge lp:~glmark2-dev/glmark2/config-update |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis | Approve | ||
Review via email: mp+138342@code.launchpad.net |
Commit message
Description of the change
A couple of small changes to config support.
EGLState: Adds queries for remaining attributes from table 3.1 of the EGL spec (they are unused by any normal runtime logic in glmark2, but could be useful for debugging purposes).
GLVisualConfig: Adds a stencil attribute, and updates the scoring logic to explicitly favor no stencil unless asked for by command line option.
To post a comment you must log in.
- 255. By Alexandros Frantzis
-
CanvasX11GLX: Print out the stencil size of the selected config in debug mode
Revision history for this message
Alexandros Frantzis (afrantzis) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'android/src/org/linaro/glmark2/GLVisualConfig.java' | |||
2 | --- android/src/org/linaro/glmark2/GLVisualConfig.java 2012-07-04 14:27:42 +0000 | |||
3 | +++ android/src/org/linaro/glmark2/GLVisualConfig.java 2012-12-06 18:00:32 +0000 | |||
4 | @@ -26,12 +26,13 @@ | |||
5 | 26 | */ | 26 | */ |
6 | 27 | class GLVisualConfig { | 27 | class GLVisualConfig { |
7 | 28 | public GLVisualConfig() {} | 28 | public GLVisualConfig() {} |
9 | 29 | public GLVisualConfig(int r, int g, int b, int a, int d, int buf) { | 29 | public GLVisualConfig(int r, int g, int b, int a, int d, int s, int buf) { |
10 | 30 | red = r; | 30 | red = r; |
11 | 31 | green = g; | 31 | green = g; |
12 | 32 | blue = b; | 32 | blue = b; |
13 | 33 | alpha = a; | 33 | alpha = a; |
14 | 34 | depth = d; | 34 | depth = d; |
15 | 35 | stencil = s; | ||
16 | 35 | buffer = buf; | 36 | buffer = buf; |
17 | 36 | } | 37 | } |
18 | 37 | 38 | ||
19 | @@ -40,5 +41,6 @@ | |||
20 | 40 | public int blue; | 41 | public int blue; |
21 | 41 | public int alpha; | 42 | public int alpha; |
22 | 42 | public int depth; | 43 | public int depth; |
23 | 44 | public int stencil; | ||
24 | 43 | public int buffer; | 45 | public int buffer; |
25 | 44 | } | 46 | } |
26 | 45 | 47 | ||
27 | === modified file 'android/src/org/linaro/glmark2/Glmark2SurfaceView.java' | |||
28 | --- android/src/org/linaro/glmark2/Glmark2SurfaceView.java 2012-07-30 12:28:16 +0000 | |||
29 | +++ android/src/org/linaro/glmark2/Glmark2SurfaceView.java 2012-12-06 18:00:32 +0000 | |||
30 | @@ -50,7 +50,7 @@ | |||
31 | 50 | 50 | ||
32 | 51 | /* Parse the config string parameters */ | 51 | /* Parse the config string parameters */ |
33 | 52 | String[] configParams = configString.split(":"); | 52 | String[] configParams = configString.split(":"); |
35 | 53 | GLVisualConfig targetConfig = new GLVisualConfig(5, 6, 5, 0, 16, 1); | 53 | GLVisualConfig targetConfig = new GLVisualConfig(5, 6, 5, 0, 16, 0, 1); |
36 | 54 | 54 | ||
37 | 55 | for (String param : configParams) { | 55 | for (String param : configParams) { |
38 | 56 | String[] paramKeyValue = param.split("="); | 56 | String[] paramKeyValue = param.split("="); |
39 | @@ -67,6 +67,8 @@ | |||
40 | 67 | targetConfig.alpha = Integer.parseInt(paramKeyValue[1]); | 67 | targetConfig.alpha = Integer.parseInt(paramKeyValue[1]); |
41 | 68 | else if (paramKeyValue[0].equals("depth") || paramKeyValue[0].equals("d")) | 68 | else if (paramKeyValue[0].equals("depth") || paramKeyValue[0].equals("d")) |
42 | 69 | targetConfig.depth = Integer.parseInt(paramKeyValue[1]); | 69 | targetConfig.depth = Integer.parseInt(paramKeyValue[1]); |
43 | 70 | else if (paramKeyValue[0].equals("stencil") || paramKeyValue[0].equals("s")) | ||
44 | 71 | targetConfig.stencil = Integer.parseInt(paramKeyValue[1]); | ||
45 | 70 | else if (paramKeyValue[0].equals("buffer") || paramKeyValue[0].equals("buf")) | 72 | else if (paramKeyValue[0].equals("buffer") || paramKeyValue[0].equals("buf")) |
46 | 71 | targetConfig.buffer = Integer.parseInt(paramKeyValue[1]); | 73 | targetConfig.buffer = Integer.parseInt(paramKeyValue[1]); |
47 | 72 | } | 74 | } |
48 | @@ -89,6 +91,7 @@ | |||
49 | 89 | EGL10.EGL_BLUE_SIZE, targetConfig.blue, | 91 | EGL10.EGL_BLUE_SIZE, targetConfig.blue, |
50 | 90 | EGL10.EGL_ALPHA_SIZE, targetConfig.alpha, | 92 | EGL10.EGL_ALPHA_SIZE, targetConfig.alpha, |
51 | 91 | EGL10.EGL_DEPTH_SIZE, targetConfig.depth, | 93 | EGL10.EGL_DEPTH_SIZE, targetConfig.depth, |
52 | 94 | EGL10.EGL_STENCIL_SIZE, targetConfig.stencil, | ||
53 | 92 | EGL10.EGL_BUFFER_SIZE, targetConfig.buffer, | 95 | EGL10.EGL_BUFFER_SIZE, targetConfig.buffer, |
54 | 93 | EGL10.EGL_RENDERABLE_TYPE, 4, /* 4 = EGL_OPENGL_ES2_BIT */ | 96 | EGL10.EGL_RENDERABLE_TYPE, 4, /* 4 = EGL_OPENGL_ES2_BIT */ |
55 | 94 | EGL10.EGL_NONE }; | 97 | EGL10.EGL_NONE }; |
56 | @@ -156,6 +159,8 @@ | |||
57 | 156 | EGL10.EGL_ALPHA_SIZE, 0); | 159 | EGL10.EGL_ALPHA_SIZE, 0); |
58 | 157 | vc.depth = findConfigAttrib(egl, display, config, | 160 | vc.depth = findConfigAttrib(egl, display, config, |
59 | 158 | EGL10.EGL_DEPTH_SIZE, 0); | 161 | EGL10.EGL_DEPTH_SIZE, 0); |
60 | 162 | vc.stencil = findConfigAttrib(egl, display, config, | ||
61 | 163 | EGL10.EGL_STENCIL_SIZE, 0); | ||
62 | 159 | vc.buffer = findConfigAttrib(egl, display, config, | 164 | vc.buffer = findConfigAttrib(egl, display, config, |
63 | 160 | EGL10.EGL_BUFFER_SIZE, 0); | 165 | EGL10.EGL_BUFFER_SIZE, 0); |
64 | 161 | 166 | ||
65 | 162 | 167 | ||
66 | === modified file 'src/canvas-x11-glx.cpp' | |||
67 | --- src/canvas-x11-glx.cpp 2012-08-23 22:47:12 +0000 | |||
68 | +++ src/canvas-x11-glx.cpp 2012-12-06 18:00:32 +0000 | |||
69 | @@ -171,6 +171,7 @@ | |||
70 | 171 | GLX_BLUE_SIZE, visual_config_.blue, | 171 | GLX_BLUE_SIZE, visual_config_.blue, |
71 | 172 | GLX_ALPHA_SIZE, visual_config_.alpha, | 172 | GLX_ALPHA_SIZE, visual_config_.alpha, |
72 | 173 | GLX_DEPTH_SIZE, visual_config_.depth, | 173 | GLX_DEPTH_SIZE, visual_config_.depth, |
73 | 174 | GLX_STENCIL_SIZE, visual_config_.stencil, | ||
74 | 174 | GLX_BUFFER_SIZE, visual_config_.buffer, | 175 | GLX_BUFFER_SIZE, visual_config_.buffer, |
75 | 175 | GLX_DOUBLEBUFFER, True, | 176 | GLX_DOUBLEBUFFER, True, |
76 | 176 | None | 177 | None |
77 | @@ -200,7 +201,7 @@ | |||
78 | 200 | XFree(fbc); | 201 | XFree(fbc); |
79 | 201 | 202 | ||
80 | 202 | if (Options::show_debug) { | 203 | if (Options::show_debug) { |
82 | 203 | int buf, red, green, blue, alpha, depth, id, native_id; | 204 | int buf, red, green, blue, alpha, depth, stencil, id, native_id; |
83 | 204 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_FBCONFIG_ID, &id); | 205 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_FBCONFIG_ID, &id); |
84 | 205 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_VISUAL_ID, &native_id); | 206 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_VISUAL_ID, &native_id); |
85 | 206 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_BUFFER_SIZE, &buf); | 207 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_BUFFER_SIZE, &buf); |
86 | @@ -209,15 +210,17 @@ | |||
87 | 209 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_BLUE_SIZE, &blue); | 210 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_BLUE_SIZE, &blue); |
88 | 210 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_ALPHA_SIZE, &alpha); | 211 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_ALPHA_SIZE, &alpha); |
89 | 211 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_DEPTH_SIZE, &depth); | 212 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_DEPTH_SIZE, &depth); |
90 | 213 | glXGetFBConfigAttrib(xdpy_, glx_fbconfig_, GLX_STENCIL_SIZE, &stencil); | ||
91 | 212 | Log::debug("GLX chosen config ID: 0x%x Native Visual ID: 0x%x\n" | 214 | Log::debug("GLX chosen config ID: 0x%x Native Visual ID: 0x%x\n" |
92 | 213 | " Buffer: %d bits\n" | 215 | " Buffer: %d bits\n" |
93 | 214 | " Red: %d bits\n" | 216 | " Red: %d bits\n" |
94 | 215 | " Green: %d bits\n" | 217 | " Green: %d bits\n" |
95 | 216 | " Blue: %d bits\n" | 218 | " Blue: %d bits\n" |
96 | 217 | " Alpha: %d bits\n" | 219 | " Alpha: %d bits\n" |
98 | 218 | " Depth: %d bits\n", | 220 | " Depth: %d bits\n" |
99 | 221 | " Stencil: %d bits\n", | ||
100 | 219 | id, native_id, | 222 | id, native_id, |
102 | 220 | buf, red, green, blue, alpha, depth); | 223 | buf, red, green, blue, alpha, depth, stencil); |
103 | 221 | } | 224 | } |
104 | 222 | 225 | ||
105 | 223 | 226 | ||
106 | @@ -270,6 +273,7 @@ | |||
107 | 270 | glXGetFBConfigAttrib(xdpy_, config, GLX_BLUE_SIZE, &visual_config.blue); | 273 | glXGetFBConfigAttrib(xdpy_, config, GLX_BLUE_SIZE, &visual_config.blue); |
108 | 271 | glXGetFBConfigAttrib(xdpy_, config, GLX_ALPHA_SIZE, &visual_config.alpha); | 274 | glXGetFBConfigAttrib(xdpy_, config, GLX_ALPHA_SIZE, &visual_config.alpha); |
109 | 272 | glXGetFBConfigAttrib(xdpy_, config, GLX_DEPTH_SIZE, &visual_config.depth); | 275 | glXGetFBConfigAttrib(xdpy_, config, GLX_DEPTH_SIZE, &visual_config.depth); |
110 | 276 | glXGetFBConfigAttrib(xdpy_, config, GLX_STENCIL_SIZE, &visual_config.stencil); | ||
111 | 273 | } | 277 | } |
112 | 274 | 278 | ||
113 | 275 | GLXFBConfig | 279 | GLXFBConfig |
114 | 276 | 280 | ||
115 | === modified file 'src/egl-state.cpp' | |||
116 | --- src/egl-state.cpp 2012-11-15 23:06:53 +0000 | |||
117 | +++ src/egl-state.cpp 2012-12-06 18:00:32 +0000 | |||
118 | @@ -38,10 +38,19 @@ | |||
119 | 38 | luminanceSize_(0), | 38 | luminanceSize_(0), |
120 | 39 | alphaSize_(0), | 39 | alphaSize_(0), |
121 | 40 | alphaMaskSize_(0), | 40 | alphaMaskSize_(0), |
122 | 41 | bindTexRGB_(false), | ||
123 | 42 | bindTexRGBA_(false), | ||
124 | 41 | bufferType_(EGL_RGB_BUFFER), | 43 | bufferType_(EGL_RGB_BUFFER), |
125 | 42 | caveat_(0), | 44 | caveat_(0), |
126 | 43 | configID_(0), | 45 | configID_(0), |
127 | 46 | conformant_(0), | ||
128 | 44 | depthSize_(0), | 47 | depthSize_(0), |
129 | 48 | level_(0), | ||
130 | 49 | pbufferWidth_(0), | ||
131 | 50 | pbufferHeight_(0), | ||
132 | 51 | pbufferPixels_(0), | ||
133 | 52 | minSwapInterval_(0), | ||
134 | 53 | maxSwapInterval_(0), | ||
135 | 45 | nativeID_(0), | 54 | nativeID_(0), |
136 | 46 | nativeType_(0), | 55 | nativeType_(0), |
137 | 47 | nativeRenderable_(false), | 56 | nativeRenderable_(false), |
138 | @@ -63,6 +72,10 @@ | |||
139 | 63 | { | 72 | { |
140 | 64 | badAttribVec.push_back("EGL_CONFIG_CAVEAT"); | 73 | badAttribVec.push_back("EGL_CONFIG_CAVEAT"); |
141 | 65 | } | 74 | } |
142 | 75 | if (!eglGetConfigAttrib(dpy, handle_, EGL_CONFORMANT, &conformant_)) | ||
143 | 76 | { | ||
144 | 77 | badAttribVec.push_back("EGL_CONFORMANT"); | ||
145 | 78 | } | ||
146 | 66 | if (!eglGetConfigAttrib(dpy, handle_, EGL_COLOR_BUFFER_TYPE, &bufferType_)) | 79 | if (!eglGetConfigAttrib(dpy, handle_, EGL_COLOR_BUFFER_TYPE, &bufferType_)) |
147 | 67 | { | 80 | { |
148 | 68 | badAttribVec.push_back("EGL_COLOR_BUFFER_TYPE"); | 81 | badAttribVec.push_back("EGL_COLOR_BUFFER_TYPE"); |
149 | @@ -98,6 +111,10 @@ | |||
150 | 98 | { | 111 | { |
151 | 99 | badAttribVec.push_back("EGL_ALPHA_SIZE"); | 112 | badAttribVec.push_back("EGL_ALPHA_SIZE"); |
152 | 100 | } | 113 | } |
153 | 114 | if (!eglGetConfigAttrib(dpy, handle_, EGL_ALPHA_MASK_SIZE, &alphaMaskSize_)) | ||
154 | 115 | { | ||
155 | 116 | badAttribVec.push_back("EGL_ALPHA_MASK_SIZE"); | ||
156 | 117 | } | ||
157 | 101 | if (!eglGetConfigAttrib(dpy, handle_, EGL_DEPTH_SIZE, &depthSize_)) | 118 | if (!eglGetConfigAttrib(dpy, handle_, EGL_DEPTH_SIZE, &depthSize_)) |
158 | 102 | { | 119 | { |
159 | 103 | badAttribVec.push_back("EGL_DEPTH_SIZE"); | 120 | badAttribVec.push_back("EGL_DEPTH_SIZE"); |
160 | @@ -106,15 +123,47 @@ | |||
161 | 106 | { | 123 | { |
162 | 107 | badAttribVec.push_back("EGL_STENCIL_SIZE"); | 124 | badAttribVec.push_back("EGL_STENCIL_SIZE"); |
163 | 108 | } | 125 | } |
164 | 126 | EGLint doBind(EGL_FALSE); | ||
165 | 127 | if (!eglGetConfigAttrib(dpy, handle_, EGL_BIND_TO_TEXTURE_RGB, &doBind)) | ||
166 | 128 | { | ||
167 | 129 | badAttribVec.push_back("EGL_BIND_TO_TEXTURE_RGB"); | ||
168 | 130 | } | ||
169 | 131 | bindTexRGB_ = (doBind == EGL_TRUE); | ||
170 | 132 | if (!eglGetConfigAttrib(dpy, handle_, EGL_BIND_TO_TEXTURE_RGBA, &doBind)) | ||
171 | 133 | { | ||
172 | 134 | badAttribVec.push_back("EGL_BIND_TO_TEXTURE_RGBA"); | ||
173 | 135 | } | ||
174 | 136 | bindTexRGBA_ = (doBind == EGL_TRUE); | ||
175 | 137 | if (!eglGetConfigAttrib(dpy, handle_, EGL_LEVEL, &level_)) | ||
176 | 138 | { | ||
177 | 139 | badAttribVec.push_back("EGL_LEVEL"); | ||
178 | 140 | } | ||
179 | 141 | if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_WIDTH, &pbufferWidth_)) | ||
180 | 142 | { | ||
181 | 143 | badAttribVec.push_back("EGL_MAX_PBUFFER_WIDTH"); | ||
182 | 144 | } | ||
183 | 145 | if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_HEIGHT, &pbufferHeight_)) | ||
184 | 146 | { | ||
185 | 147 | badAttribVec.push_back("EGL_MAX_PBUFFER_HEIGHT"); | ||
186 | 148 | } | ||
187 | 149 | if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_PIXELS, &pbufferPixels_)) | ||
188 | 150 | { | ||
189 | 151 | badAttribVec.push_back("EGL_MAX_PBUFFER_PIXELS"); | ||
190 | 152 | } | ||
191 | 153 | if (!eglGetConfigAttrib(dpy, handle_, EGL_MIN_SWAP_INTERVAL, &minSwapInterval_)) | ||
192 | 154 | { | ||
193 | 155 | badAttribVec.push_back("EGL_MIN_SWAP_INTERVAL"); | ||
194 | 156 | } | ||
195 | 157 | if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_SWAP_INTERVAL, &maxSwapInterval_)) | ||
196 | 158 | { | ||
197 | 159 | badAttribVec.push_back("EGL_MAX_SWAP_INTERVAL"); | ||
198 | 160 | } | ||
199 | 109 | EGLint doNative(EGL_FALSE); | 161 | EGLint doNative(EGL_FALSE); |
200 | 110 | if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_RENDERABLE, &doNative)) | 162 | if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_RENDERABLE, &doNative)) |
201 | 111 | { | 163 | { |
202 | 112 | badAttribVec.push_back("EGL_NATIVE_RENDERABLE"); | 164 | badAttribVec.push_back("EGL_NATIVE_RENDERABLE"); |
203 | 113 | } | 165 | } |
208 | 114 | if (doNative == EGL_TRUE) | 166 | nativeRenderable_ = (doNative == EGL_TRUE); |
205 | 115 | { | ||
206 | 116 | nativeRenderable_ = true; | ||
207 | 117 | } | ||
209 | 118 | if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_VISUAL_TYPE, &nativeType_)) | 167 | if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_VISUAL_TYPE, &nativeType_)) |
210 | 119 | { | 168 | { |
211 | 120 | badAttribVec.push_back("EGL_NATIVE_VISUAL_TYPE"); | 169 | badAttribVec.push_back("EGL_NATIVE_VISUAL_TYPE"); |
212 | @@ -293,6 +342,7 @@ | |||
213 | 293 | eglGetConfigAttrib(egl_display_, config, EGL_BLUE_SIZE, &visual_config.blue); | 342 | eglGetConfigAttrib(egl_display_, config, EGL_BLUE_SIZE, &visual_config.blue); |
214 | 294 | eglGetConfigAttrib(egl_display_, config, EGL_ALPHA_SIZE, &visual_config.alpha); | 343 | eglGetConfigAttrib(egl_display_, config, EGL_ALPHA_SIZE, &visual_config.alpha); |
215 | 295 | eglGetConfigAttrib(egl_display_, config, EGL_DEPTH_SIZE, &visual_config.depth); | 344 | eglGetConfigAttrib(egl_display_, config, EGL_DEPTH_SIZE, &visual_config.depth); |
216 | 345 | eglGetConfigAttrib(egl_display_, config, EGL_STENCIL_SIZE, &visual_config.stencil); | ||
217 | 296 | } | 346 | } |
218 | 297 | 347 | ||
219 | 298 | EGLConfig | 348 | EGLConfig |
220 | @@ -341,6 +391,7 @@ | |||
221 | 341 | EGL_BLUE_SIZE, visual_config_.blue, | 391 | EGL_BLUE_SIZE, visual_config_.blue, |
222 | 342 | EGL_ALPHA_SIZE, visual_config_.alpha, | 392 | EGL_ALPHA_SIZE, visual_config_.alpha, |
223 | 343 | EGL_DEPTH_SIZE, visual_config_.depth, | 393 | EGL_DEPTH_SIZE, visual_config_.depth, |
224 | 394 | EGL_STENCIL_SIZE, visual_config_.stencil, | ||
225 | 344 | #if USE_GLESv2 | 395 | #if USE_GLESv2 |
226 | 345 | EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | 396 | EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
227 | 346 | #elif USE_GL | 397 | #elif USE_GL |
228 | 347 | 398 | ||
229 | === modified file 'src/egl-state.h' | |||
230 | --- src/egl-state.h 2012-11-13 16:53:41 +0000 | |||
231 | +++ src/egl-state.h 2012-12-06 18:00:32 +0000 | |||
232 | @@ -37,12 +37,24 @@ | |||
233 | 37 | EGLint luminanceSize_; | 37 | EGLint luminanceSize_; |
234 | 38 | EGLint alphaSize_; | 38 | EGLint alphaSize_; |
235 | 39 | EGLint alphaMaskSize_; | 39 | EGLint alphaMaskSize_; |
236 | 40 | bool bindTexRGB_; | ||
237 | 41 | bool bindTexRGBA_; | ||
238 | 40 | EGLint bufferType_; | 42 | EGLint bufferType_; |
239 | 41 | // Base config attributes | 43 | // Base config attributes |
240 | 42 | EGLint caveat_; | 44 | EGLint caveat_; |
241 | 43 | EGLint configID_; | 45 | EGLint configID_; |
242 | 46 | EGLint conformant_; | ||
243 | 44 | // Depth buffer | 47 | // Depth buffer |
244 | 45 | EGLint depthSize_; | 48 | EGLint depthSize_; |
245 | 49 | // Framebuffer level | ||
246 | 50 | EGLint level_; | ||
247 | 51 | // Pbuffers | ||
248 | 52 | EGLint pbufferWidth_; | ||
249 | 53 | EGLint pbufferHeight_; | ||
250 | 54 | EGLint pbufferPixels_; | ||
251 | 55 | // Swap interval | ||
252 | 56 | EGLint minSwapInterval_; | ||
253 | 57 | EGLint maxSwapInterval_; | ||
254 | 46 | // Native window system attributes. | 58 | // Native window system attributes. |
255 | 47 | EGLint nativeID_; | 59 | EGLint nativeID_; |
256 | 48 | EGLint nativeType_; | 60 | EGLint nativeType_; |
257 | @@ -69,10 +81,19 @@ | |||
258 | 69 | luminanceSize_(0), | 81 | luminanceSize_(0), |
259 | 70 | alphaSize_(0), | 82 | alphaSize_(0), |
260 | 71 | alphaMaskSize_(0), | 83 | alphaMaskSize_(0), |
261 | 84 | bindTexRGB_(false), | ||
262 | 85 | bindTexRGBA_(false), | ||
263 | 72 | bufferType_(EGL_RGB_BUFFER), | 86 | bufferType_(EGL_RGB_BUFFER), |
264 | 73 | caveat_(0), | 87 | caveat_(0), |
265 | 74 | configID_(0), | 88 | configID_(0), |
266 | 89 | conformant_(0), | ||
267 | 75 | depthSize_(0), | 90 | depthSize_(0), |
268 | 91 | level_(0), | ||
269 | 92 | pbufferWidth_(0), | ||
270 | 93 | pbufferHeight_(0), | ||
271 | 94 | pbufferPixels_(0), | ||
272 | 95 | minSwapInterval_(0), | ||
273 | 96 | maxSwapInterval_(0), | ||
274 | 76 | nativeID_(0), | 97 | nativeID_(0), |
275 | 77 | nativeType_(0), | 98 | nativeType_(0), |
276 | 78 | nativeRenderable_(false), | 99 | nativeRenderable_(false), |
277 | 79 | 100 | ||
278 | === modified file 'src/gl-visual-config.cpp' | |||
279 | --- src/gl-visual-config.cpp 2012-08-13 10:09:08 +0000 | |||
280 | +++ src/gl-visual-config.cpp 2012-12-06 18:00:32 +0000 | |||
281 | @@ -26,7 +26,7 @@ | |||
282 | 26 | #include <vector> | 26 | #include <vector> |
283 | 27 | 27 | ||
284 | 28 | GLVisualConfig::GLVisualConfig(const std::string &s) : | 28 | GLVisualConfig::GLVisualConfig(const std::string &s) : |
286 | 29 | red(1), green(1), blue(1), alpha(1), depth(1), buffer(1) | 29 | red(1), green(1), blue(1), alpha(1), depth(1), stencil(0), buffer(1) |
287 | 30 | { | 30 | { |
288 | 31 | std::vector<std::string> elems; | 31 | std::vector<std::string> elems; |
289 | 32 | 32 | ||
290 | @@ -50,6 +50,8 @@ | |||
291 | 50 | alpha = Util::fromString<int>(opt[1]); | 50 | alpha = Util::fromString<int>(opt[1]); |
292 | 51 | else if (opt[0] == "d" || opt[0] == "depth") | 51 | else if (opt[0] == "d" || opt[0] == "depth") |
293 | 52 | depth = Util::fromString<int>(opt[1]); | 52 | depth = Util::fromString<int>(opt[1]); |
294 | 53 | else if (opt[0] == "s" || opt[0] == "stencil") | ||
295 | 54 | stencil = Util::fromString<int>(opt[1]); | ||
296 | 53 | else if (opt[0] == "buf" || opt[0] == "buffer") | 55 | else if (opt[0] == "buf" || opt[0] == "buffer") |
297 | 54 | buffer = Util::fromString<int>(opt[1]); | 56 | buffer = Util::fromString<int>(opt[1]); |
298 | 55 | } | 57 | } |
299 | @@ -74,6 +76,7 @@ | |||
300 | 74 | score += score_component(blue, target.blue, 4); | 76 | score += score_component(blue, target.blue, 4); |
301 | 75 | score += score_component(alpha, target.alpha, 4); | 77 | score += score_component(alpha, target.alpha, 4); |
302 | 76 | score += score_component(depth, target.depth, 1); | 78 | score += score_component(depth, target.depth, 1); |
303 | 79 | score += score_component(stencil, target.stencil, 0); | ||
304 | 77 | score += score_component(buffer, target.buffer, 1); | 80 | score += score_component(buffer, target.buffer, 1); |
305 | 78 | 81 | ||
306 | 79 | return score; | 82 | return score; |
307 | 80 | 83 | ||
308 | === modified file 'src/gl-visual-config.h' | |||
309 | --- src/gl-visual-config.h 2012-05-11 13:49:53 +0000 | |||
310 | +++ src/gl-visual-config.h 2012-12-06 18:00:32 +0000 | |||
311 | @@ -31,9 +31,9 @@ | |||
312 | 31 | { | 31 | { |
313 | 32 | public: | 32 | public: |
314 | 33 | GLVisualConfig(): | 33 | GLVisualConfig(): |
318 | 34 | red(1), green(1), blue(1), alpha(1), depth(1), buffer(1) {} | 34 | red(1), green(1), blue(1), alpha(1), depth(1), stencil(0), buffer(1) {} |
319 | 35 | GLVisualConfig(int r, int g, int b, int a, int d, int buf): | 35 | GLVisualConfig(int r, int g, int b, int a, int d, int s, int buf): |
320 | 36 | red(r), green(g), blue(b), alpha(a), depth(d), buffer(buf) {} | 36 | red(r), green(g), blue(b), alpha(a), depth(d), stencil(s), buffer(buf) {} |
321 | 37 | GLVisualConfig(const std::string &s); | 37 | GLVisualConfig(const std::string &s); |
322 | 38 | 38 | ||
323 | 39 | /** | 39 | /** |
324 | @@ -55,6 +55,7 @@ | |||
325 | 55 | int blue; | 55 | int blue; |
326 | 56 | int alpha; | 56 | int alpha; |
327 | 57 | int depth; | 57 | int depth; |
328 | 58 | int stencil; | ||
329 | 58 | int buffer; | 59 | int buffer; |
330 | 59 | 60 | ||
331 | 60 | private: | 61 | private: |