WebGLVertexArrayGL.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef WEBGL_VERTEX_ARRAY_GL_H_
  6. #define WEBGL_VERTEX_ARRAY_GL_H_
  7. #include "WebGLVertexArray.h"
  8. namespace mozilla {
  9. class WebGLVertexArrayGL
  10. : public WebGLVertexArray
  11. {
  12. friend class WebGLVertexArray;
  13. public:
  14. virtual void DeleteImpl() override;
  15. virtual void BindVertexArrayImpl() override;
  16. virtual void GenVertexArray() override;
  17. virtual bool IsVertexArrayImpl() const override;
  18. protected:
  19. explicit WebGLVertexArrayGL(WebGLContext* webgl);
  20. ~WebGLVertexArrayGL();
  21. // Bug 1140459: Some drivers (including our test slaves!) don't
  22. // give reasonable answers for IsVertexArray, maybe others.
  23. //
  24. // So we track the `is a VAO` state ourselves.
  25. bool mIsVAO;
  26. };
  27. } // namespace mozilla
  28. #endif // WEBGL_VERTEX_ARRAY_GL_H_