RenderInterface.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "../../Include/RmlUi/Core/RenderInterface.h"
  2. namespace Rml {
  3. namespace CoreInternal {
  4. bool HasRenderManager(RenderInterface* render_interface);
  5. }
  6. RenderInterface::RenderInterface() {}
  7. RenderInterface::~RenderInterface()
  8. {
  9. // Note: We cannot automatically release render resources here, because that involves a virtual call to this interface during its destruction
  10. // which is illegal.
  11. RMLUI_ASSERTMSG(!CoreInternal::HasRenderManager(this),
  12. "RenderInterface is being destroyed, but it is still actively referenced and used within the RmlUi library. This may lead to use-after-free "
  13. "or nullptr dereference when releasing render resources. Ensure that the render interface is destroyed *after* the call to Rml::Shutdown.");
  14. }
  15. void RenderInterface::EnableClipMask(bool /*enable*/) {}
  16. void RenderInterface::RenderToClipMask(ClipMaskOperation /*operation*/, CompiledGeometryHandle /*geometry*/, Vector2f /*translation*/) {}
  17. void RenderInterface::SetTransform(const Matrix4f* /*transform*/) {}
  18. LayerHandle RenderInterface::PushLayer()
  19. {
  20. return {};
  21. }
  22. void RenderInterface::CompositeLayers(LayerHandle /*source*/, LayerHandle /*destination*/, BlendMode /*blend_mode*/,
  23. Span<const CompiledFilterHandle> /*filters*/)
  24. {}
  25. void RenderInterface::PopLayer() {}
  26. TextureHandle RenderInterface::SaveLayerAsTexture()
  27. {
  28. return TextureHandle{};
  29. }
  30. CompiledFilterHandle RenderInterface::SaveLayerAsMaskImage()
  31. {
  32. return CompiledFilterHandle{};
  33. }
  34. CompiledFilterHandle RenderInterface::CompileFilter(const String& /*name*/, const Dictionary& /*parameters*/)
  35. {
  36. return CompiledFilterHandle{};
  37. }
  38. void RenderInterface::ReleaseFilter(CompiledFilterHandle /*filter*/) {}
  39. CompiledShaderHandle RenderInterface::CompileShader(const String& /*name*/, const Dictionary& /*parameters*/)
  40. {
  41. return CompiledShaderHandle{};
  42. }
  43. void RenderInterface::RenderShader(CompiledShaderHandle /*shader*/, CompiledGeometryHandle /*geometry*/, Vector2f /*translation*/,
  44. TextureHandle /*texture*/)
  45. {}
  46. void RenderInterface::ReleaseShader(CompiledShaderHandle /*shader*/) {}
  47. } // namespace Rml