mirror of
https://github.com/godotengine/godot.git
synced 2024-12-27 11:24:59 +08:00
e2c6daf7ef
- Implements asynchronous transfer queues from PR #87590. - Adds ubershaders that can run with specialization constants specified as push constants. - Pipelines with specialization constants can compile in the background. - Added monitoring for pipeline compilations. - Materials and shaders can now be created asynchronously on background threads. - Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
66 lines
4.4 KiB
C++
66 lines
4.4 KiB
C++
/**************************************************************************/
|
|
/* rasterizer_canvas_dummy.h */
|
|
/**************************************************************************/
|
|
/* This file is part of: */
|
|
/* GODOT ENGINE */
|
|
/* https://godotengine.org */
|
|
/**************************************************************************/
|
|
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
|
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
|
/* */
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
/* a copy of this software and associated documentation files (the */
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
/* the following conditions: */
|
|
/* */
|
|
/* The above copyright notice and this permission notice shall be */
|
|
/* included in all copies or substantial portions of the Software. */
|
|
/* */
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
/**************************************************************************/
|
|
|
|
#ifndef RASTERIZER_CANVAS_DUMMY_H
|
|
#define RASTERIZER_CANVAS_DUMMY_H
|
|
|
|
#include "servers/rendering/renderer_canvas_render.h"
|
|
|
|
class RasterizerCanvasDummy : public RendererCanvasRender {
|
|
public:
|
|
PolygonID request_polygon(const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), const Vector<int> &p_bones = Vector<int>(), const Vector<float> &p_weights = Vector<float>()) override { return 0; }
|
|
void free_polygon(PolygonID p_polygon) override {}
|
|
|
|
void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, Light *p_directional_list, const Transform2D &p_canvas_transform, RS::CanvasItemTextureFilter p_default_filter, RS::CanvasItemTextureRepeat p_default_repeat, bool p_snap_2d_vertices_to_pixel, bool &r_sdf_used, RenderingMethod::RenderInfo *r_render_info = nullptr) override {}
|
|
|
|
RID light_create() override { return RID(); }
|
|
void light_set_texture(RID p_rid, RID p_texture) override {}
|
|
void light_set_use_shadow(RID p_rid, bool p_enable) override {}
|
|
void light_update_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) override {}
|
|
void light_update_directional_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_cull_distance, const Rect2 &p_clip_rect, LightOccluderInstance *p_occluders) override {}
|
|
|
|
void render_sdf(RID p_render_target, LightOccluderInstance *p_occluders) override {}
|
|
RID occluder_polygon_create() override { return RID(); }
|
|
void occluder_polygon_set_shape(RID p_occluder, const Vector<Vector2> &p_points, bool p_closed) override {}
|
|
void occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) override {}
|
|
void set_shadow_texture_size(int p_size) override {}
|
|
|
|
bool free(RID p_rid) override { return true; }
|
|
void update() override {}
|
|
|
|
virtual void set_debug_redraw(bool p_enabled, double p_time, const Color &p_color) override {}
|
|
virtual uint32_t get_pipeline_compilations(RS::PipelineSource p_source) override { return 0; }
|
|
|
|
RasterizerCanvasDummy() {}
|
|
~RasterizerCanvasDummy() {}
|
|
};
|
|
|
|
#endif // RASTERIZER_CANVAS_DUMMY_H
|