WebGLVertexArrayFake.h 918 B

12345678910111213141516171819202122232425262728293031323334353637
  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_FAKE_H_
  6. #define WEBGL_VERTEX_ARRAY_FAKE_H_
  7. #include "WebGLVertexArray.h"
  8. namespace mozilla {
  9. class WebGLVertexArrayFake final
  10. : public WebGLVertexArray
  11. {
  12. friend class WebGLVertexArray;
  13. protected:
  14. virtual void BindVertexArrayImpl() override;
  15. virtual void DeleteImpl() override;
  16. virtual void GenVertexArray() override {};
  17. virtual bool IsVertexArrayImpl() const override;
  18. private:
  19. explicit WebGLVertexArrayFake(WebGLContext* webgl);
  20. ~WebGLVertexArrayFake() {
  21. DeleteOnce();
  22. }
  23. bool mIsVAO;
  24. };
  25. } // namespace mozilla
  26. #endif // WEBGL_VERTEX_ARRAY_FAKE_H_