OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef GrGLInterface_DEFINED | 10 #ifndef GrGLInterface_DEFINED |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 GLPtr<GrGLLinkProgramProc> fLinkProgram; | 222 GLPtr<GrGLLinkProgramProc> fLinkProgram; |
223 GLPtr<GrGLLoadIdentityProc> fLoadIdentity; | 223 GLPtr<GrGLLoadIdentityProc> fLoadIdentity; |
224 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf; | 224 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf; |
225 GLPtr<GrGLMapBufferProc> fMapBuffer; | 225 GLPtr<GrGLMapBufferProc> fMapBuffer; |
226 GLPtr<GrGLMatrixModeProc> fMatrixMode; | 226 GLPtr<GrGLMatrixModeProc> fMatrixMode; |
227 GLPtr<GrGLPixelStoreiProc> fPixelStorei; | 227 GLPtr<GrGLPixelStoreiProc> fPixelStorei; |
228 GLPtr<GrGLQueryCounterProc> fQueryCounter; | 228 GLPtr<GrGLQueryCounterProc> fQueryCounter; |
229 GLPtr<GrGLReadBufferProc> fReadBuffer; | 229 GLPtr<GrGLReadBufferProc> fReadBuffer; |
230 GLPtr<GrGLReadPixelsProc> fReadPixels; | 230 GLPtr<GrGLReadPixelsProc> fReadPixels; |
231 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage; | 231 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage; |
| 232 |
| 233 #if !GR_GL_IGNORE_ES3_MSAA |
| 234 // On OpenGL ES there are multiple incompatible extensions that add support
for MSAA |
| 235 // and ES3 adds MSAA support to the standard. On an ES3 driver we may still
use the |
| 236 // older extensions for performance reasons or due to ES3 driver bugs. We w
ant the function |
| 237 // that creates the GrGLInterface to provide all available functions and in
ternally |
| 238 // we will select among them. They all have a method called glRenderbufferS
torageMultisample*. |
| 239 // So we have separate function pointers for GL_IMG/EXT_multisampled_to_tex
ture, |
| 240 // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_
multisample |
| 241 // variations. |
| 242 // |
| 243 // If a driver supports multiple GL_ARB_framebuffer_multisample-style exten
sions then we will |
| 244 // assume the function pointers for the standard (or equivalent GL_ARB) ver
sion have |
| 245 // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that hav
e reduced |
| 246 // functionality. |
| 247 |
| 248 // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled
_render_to_texture |
| 249 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampl
eES2EXT; |
| 250 // GL_APPLE_framebuffer_multisample |
| 251 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampl
eES2APPLE; |
| 252 #endif |
| 253 // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuf
fer_multisample or |
| 254 // the standard function in ES3+ or GL 3.0+. |
232 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampl
e; | 255 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampl
e; |
| 256 |
233 GLPtr<GrGLRenderbufferStorageMultisampleCoverageProc> fRenderbufferStorageMu
ltisampleCoverage; | 257 GLPtr<GrGLRenderbufferStorageMultisampleCoverageProc> fRenderbufferStorageMu
ltisampleCoverage; |
234 GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer; | 258 GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer; |
235 GLPtr<GrGLScissorProc> fScissor; | 259 GLPtr<GrGLScissorProc> fScissor; |
236 GLPtr<GrGLShaderSourceProc> fShaderSource; | 260 GLPtr<GrGLShaderSourceProc> fShaderSource; |
237 GLPtr<GrGLStencilFuncProc> fStencilFunc; | 261 GLPtr<GrGLStencilFuncProc> fStencilFunc; |
238 GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate; | 262 GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate; |
239 GLPtr<GrGLStencilMaskProc> fStencilMask; | 263 GLPtr<GrGLStencilMaskProc> fStencilMask; |
240 GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate; | 264 GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate; |
241 GLPtr<GrGLStencilOpProc> fStencilOp; | 265 GLPtr<GrGLStencilOpProc> fStencilOp; |
242 GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate; | 266 GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 354 |
331 // Per-GL func callback | 355 // Per-GL func callback |
332 #if GR_GL_PER_GL_FUNC_CALLBACK | 356 #if GR_GL_PER_GL_FUNC_CALLBACK |
333 GrGLInterfaceCallbackProc fCallback; | 357 GrGLInterfaceCallbackProc fCallback; |
334 GrGLInterfaceCallbackData fCallbackData; | 358 GrGLInterfaceCallbackData fCallbackData; |
335 #endif | 359 #endif |
336 | 360 |
337 }; | 361 }; |
338 | 362 |
339 #endif | 363 #endif |
OLD | NEW |