WebGLFramebuffer.cpp 624 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Runtime/Realm.h>
  7. #include <LibWeb/Bindings/WebGLFramebufferPrototype.h>
  8. #include <LibWeb/WebGL/WebGLFramebuffer.h>
  9. namespace Web::WebGL {
  10. GC_DEFINE_ALLOCATOR(WebGLFramebuffer);
  11. GC::Ptr<WebGLFramebuffer> WebGLFramebuffer::create(JS::Realm& realm, GLuint handle)
  12. {
  13. return realm.heap().allocate<WebGLFramebuffer>(realm, handle);
  14. }
  15. WebGLFramebuffer::WebGLFramebuffer(JS::Realm& realm, GLuint handle)
  16. : WebGLObject(realm, handle)
  17. {
  18. }
  19. WebGLFramebuffer::~WebGLFramebuffer() = default;
  20. }