Path: blob/master/servers/rendering/dummy/storage/utilities.h
10279 views
/**************************************************************************/1/* utilities.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "servers/rendering/storage/utilities.h"3334namespace RendererDummy {3536class Utilities : public RendererUtilities {37private:38static Utilities *singleton;3940public:41static Utilities *get_singleton() { return singleton; }4243Utilities();44~Utilities();4546/* INSTANCES */4748virtual RS::InstanceType get_base_type(RID p_rid) const override;49virtual bool free(RID p_rid) override;5051/* DEPENDENCIES */5253virtual void base_update_dependency(RID p_base, DependencyTracker *p_instance) override;5455/* VISIBILITY NOTIFIER */5657virtual RID visibility_notifier_allocate() override { return RID(); }58virtual void visibility_notifier_initialize(RID p_notifier) override {}59virtual void visibility_notifier_free(RID p_notifier) override {}6061virtual void visibility_notifier_set_aabb(RID p_notifier, const AABB &p_aabb) override {}62virtual void visibility_notifier_set_callbacks(RID p_notifier, const Callable &p_enter_callbable, const Callable &p_exit_callable) override {}6364virtual AABB visibility_notifier_get_aabb(RID p_notifier) const override { return AABB(); }65virtual void visibility_notifier_call(RID p_notifier, bool p_enter, bool p_deferred) override {}6667/* TIMING */6869virtual void capture_timestamps_begin() override {}70virtual void capture_timestamp(const String &p_name) override {}71virtual uint32_t get_captured_timestamps_count() const override { return 0; }72virtual uint64_t get_captured_timestamps_frame() const override { return 0; }73virtual uint64_t get_captured_timestamp_gpu_time(uint32_t p_index) const override { return 0; }74virtual uint64_t get_captured_timestamp_cpu_time(uint32_t p_index) const override { return 0; }75virtual String get_captured_timestamp_name(uint32_t p_index) const override { return String(); }7677/* MISC */7879virtual void update_dirty_resources() override {}80virtual void set_debug_generate_wireframes(bool p_generate) override {}8182virtual bool has_os_feature(const String &p_feature) const override {83return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc2";84}8586virtual void update_memory_info() override {}8788virtual uint64_t get_rendering_info(RS::RenderingInfo p_info) override { return 0; }89virtual String get_video_adapter_name() const override { return String(); }90virtual String get_video_adapter_vendor() const override { return String(); }91virtual RenderingDevice::DeviceType get_video_adapter_type() const override { return RenderingDevice::DeviceType::DEVICE_TYPE_OTHER; }92virtual String get_video_adapter_api_version() const override { return String(); }9394virtual Size2i get_maximum_viewport_size() const override { return Size2i(); }95virtual uint32_t get_maximum_shader_varyings() const override { return 31; } // Fair assumption for everything except old OpenGL-only phones.96virtual uint64_t get_maximum_uniform_buffer_size() const override { return 65536; } // Fair assumption for all devices.97};9899} // namespace RendererDummy100101102