[WebGL] Vertex attribute binding validation method
[WebKit-https.git] / Source / WebCore / html / canvas / WebGLVertexArrayObjectOES.h
index 4b98955..4f97dcd 100644 (file)
@@ -58,6 +58,9 @@ public:
         {
         }
         
+        bool isBound() const { return bufferBinding && bufferBinding->object(); }
+        bool validateBinding() const { return !enabled || isBound(); }
+
         bool enabled;
         RefPtr<WebGLBuffer> bufferBinding;
         GC3Dsizei bytesPerElement;