WebGLVertexArrayObject.cpp 865 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Runtime/Realm.h>
  7. #include <LibWeb/Bindings/Intrinsics.h>
  8. #include <LibWeb/Bindings/WebGLVertexArrayObjectPrototype.h>
  9. #include <LibWeb/WebGL/WebGLVertexArrayObject.h>
  10. namespace Web::WebGL {
  11. GC_DEFINE_ALLOCATOR(WebGLVertexArrayObject);
  12. GC::Ref<WebGLVertexArrayObject> WebGLVertexArrayObject::create(JS::Realm& realm, GLuint handle)
  13. {
  14. return realm.create<WebGLVertexArrayObject>(realm, handle);
  15. }
  16. WebGLVertexArrayObject::WebGLVertexArrayObject(JS::Realm& realm, GLuint handle)
  17. : WebGLObject(realm, handle)
  18. {
  19. }
  20. WebGLVertexArrayObject::~WebGLVertexArrayObject() = default;
  21. void WebGLVertexArrayObject::initialize(JS::Realm& realm)
  22. {
  23. Base::initialize(realm);
  24. WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLVertexArrayObject);
  25. }
  26. }