| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "core/html/canvas/WebGLRenderingContext.h" | 30 #include "core/html/canvas/WebGLRenderingContext.h" |
| 31 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" | 31 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" |
| 32 #include "core/platform/graphics/Extensions3D.h" | 32 #include "core/platform/graphics/Extensions3D.h" |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context) | 36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context) |
| 37 : WebGLExtension(context) | 37 : WebGLExtension(context) |
| 38 { | 38 { |
| 39 ScriptWrappable::init(this); |
| 39 context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_
array_object"); | 40 context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_
array_object"); |
| 40 } | 41 } |
| 41 | 42 |
| 42 OESVertexArrayObject::~OESVertexArrayObject() | 43 OESVertexArrayObject::~OESVertexArrayObject() |
| 43 { | 44 { |
| 44 } | 45 } |
| 45 | 46 |
| 46 WebGLExtension::ExtensionName OESVertexArrayObject::getName() const | 47 WebGLExtension::ExtensionName OESVertexArrayObject::getName() const |
| 47 { | 48 { |
| 48 return OESVertexArrayObjectName; | 49 return OESVertexArrayObjectName; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); | 115 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); |
| 115 return extensions->supports("GL_OES_vertex_array_object"); | 116 return extensions->supports("GL_OES_vertex_array_object"); |
| 116 } | 117 } |
| 117 | 118 |
| 118 const char* OESVertexArrayObject::getExtensionName() | 119 const char* OESVertexArrayObject::getExtensionName() |
| 119 { | 120 { |
| 120 return "OES_vertex_array_object"; | 121 return "OES_vertex_array_object"; |
| 121 } | 122 } |
| 122 | 123 |
| 123 } // namespace WebCore | 124 } // namespace WebCore |
| OLD | NEW |