| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool WebGLDepthTexture::supported(WebGLRenderingContextBase* context) | 50 bool WebGLDepthTexture::supported(WebGLRenderingContextBase* context) |
| 51 { | 51 { |
| 52 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); | 52 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); |
| 53 // Emulating the UNSIGNED_INT_24_8_WEBGL texture internal format in terms | 53 // Emulating the UNSIGNED_INT_24_8_WEBGL texture internal format in terms |
| 54 // of two separate texture objects is too difficult, so disable depth | 54 // of two separate texture objects is too difficult, so disable depth |
| 55 // textures unless a packed depth/stencil format is available. | 55 // textures unless a packed depth/stencil format is available. |
| 56 if (!extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil")) | 56 if (!extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil")) |
| 57 return false; | 57 return false; |
| 58 return extensionsUtil->supportsExtension("GL_CHROMIUM_depth_texture") | 58 return extensionsUtil->supportsExtension("GL_CHROMIUM_depth_texture"); |
| 59 || extensionsUtil->supportsExtension("GL_OES_depth_texture") | |
| 60 || extensionsUtil->supportsExtension("GL_ARB_depth_texture"); | |
| 61 } | 59 } |
| 62 | 60 |
| 63 const char* WebGLDepthTexture::extensionName() | 61 const char* WebGLDepthTexture::extensionName() |
| 64 { | 62 { |
| 65 return "WEBGL_depth_texture"; | 63 return "WEBGL_depth_texture"; |
| 66 } | 64 } |
| 67 | 65 |
| 68 } // namespace blink | 66 } // namespace blink |
| OLD | NEW |