godot/servers/rendering_server.cpp

/**************************************************************************/
/*  rendering_server.cpp                                                  */
/**************************************************************************/
/*                         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.                 */
/**************************************************************************/

#include "rendering_server.h"
#include "rendering_server.compat.inc"

#include "core/config/project_settings.h"
#include "core/object/worker_thread_pool.h"
#include "core/variant/typed_array.h"
#include "servers/rendering/rendering_server_globals.h"
#include "servers/rendering/shader_language.h"
#include "servers/rendering/shader_warnings.h"

RenderingServer *RenderingServer::singleton =;
RenderingServer *(*RenderingServer::create_func)() =;

RenderingServer *RenderingServer::get_singleton() {}

RenderingServer *RenderingServer::create() {}

Array RenderingServer::_texture_debug_usage_bind() {}

static PackedInt64Array to_int_array(const Vector<ObjectID> &ids) {}

PackedInt64Array RenderingServer::_instances_cull_aabb_bind(const AABB &p_aabb, RID p_scenario) const {}

PackedInt64Array RenderingServer::_instances_cull_ray_bind(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario) const {}

PackedInt64Array RenderingServer::_instances_cull_convex_bind(const TypedArray<Plane> &p_convex, RID p_scenario) const {}

RID RenderingServer::get_test_texture() {}

void RenderingServer::_free_internal_rids() {}

RID RenderingServer::_make_test_cube() {}

RID RenderingServer::make_sphere_mesh(int p_lats, int p_lons, real_t p_radius) {}

RID RenderingServer::get_white_texture() {}

void _get_axis_angle(const Vector3 &p_normal, const Vector4 &p_tangent, float &r_angle, Vector3 &r_axis) {}

// The inputs to this function should match the outputs of _get_axis_angle. I.e. p_axis is a normalized vector
// and p_angle includes the binormal direction.
void _get_tbn_from_axis_angle(const Vector3 &p_axis, float p_angle, Vector3 &r_normal, Vector4 &r_tangent) {}

AABB _compute_aabb_from_points(const Vector3 *p_data, int p_length) {}

Error RenderingServer::_surface_set_data(Array p_arrays, uint64_t p_format, uint32_t *p_offsets, uint32_t p_vertex_stride, uint32_t p_normal_stride, uint32_t p_attrib_stride, uint32_t p_skin_stride, Vector<uint8_t> &r_vertex_array, Vector<uint8_t> &r_attrib_array, Vector<uint8_t> &r_skin_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb, Vector4 &r_uv_scale) {}

uint32_t RenderingServer::mesh_surface_get_format_offset(BitField<ArrayFormat> p_format, int p_vertex_len, int p_array_index) const {}

uint32_t RenderingServer::mesh_surface_get_format_vertex_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {}

uint32_t RenderingServer::mesh_surface_get_format_normal_tangent_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {}

uint32_t RenderingServer::mesh_surface_get_format_attribute_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {}
uint32_t RenderingServer::mesh_surface_get_format_skin_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {}

void RenderingServer::mesh_surface_make_offsets_from_format(uint64_t p_format, int p_vertex_len, int p_index_len, uint32_t *r_offsets, uint32_t &r_vertex_element_size, uint32_t &r_normal_element_size, uint32_t &r_attrib_element_size, uint32_t &r_skin_element_size) const {}

Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_data, PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, const Dictionary &p_lods, uint64_t p_compress_format) {}

void RenderingServer::mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, const Dictionary &p_lods, BitField<ArrayFormat> p_compress_format) {}

Array RenderingServer::_get_array_from_surface(uint64_t p_format, Vector<uint8_t> p_vertex_data, Vector<uint8_t> p_attrib_data, Vector<uint8_t> p_skin_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len, const AABB &p_aabb, const Vector4 &p_uv_scale) const {}

Array RenderingServer::mesh_surface_get_arrays(RID p_mesh, int p_surface) const {}

Dictionary RenderingServer::mesh_surface_get_lods(RID p_mesh, int p_surface) const {}

TypedArray<Array> RenderingServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surface) const {}

Array RenderingServer::mesh_create_arrays_from_surface_data(const SurfaceData &p_data) const {}
#if 0
Array RenderingServer::_mesh_surface_get_skeleton_aabb_bind(RID p_mesh, int p_surface) const {
	Vector<AABB> vec = RS::get_singleton()->mesh_surface_get_skeleton_aabb(p_mesh, p_surface);
	Array arr;
	for (int i = 0; i < vec.size(); i++) {
		arr[i] = vec[i];
	}
	return arr;
}
#endif

Rect2 RenderingServer::debug_canvas_item_get_rect(RID p_item) {}

int RenderingServer::global_shader_uniform_type_get_shader_datatype(GlobalShaderParameterType p_type) {}

RenderingDevice *RenderingServer::get_rendering_device() const {}

RenderingDevice *RenderingServer::create_local_rendering_device() const {}

static Vector<Ref<Image>> _get_imgvec(const TypedArray<Image> &p_layers) {}
RID RenderingServer::_texture_2d_layered_create(const TypedArray<Image> &p_layers, TextureLayeredType p_layered_type) {}
RID RenderingServer::_texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const TypedArray<Image> &p_data) {}

void RenderingServer::_texture_3d_update(RID p_texture, const TypedArray<Image> &p_data) {}

TypedArray<Image> RenderingServer::_texture_3d_get(RID p_texture) const {}

TypedArray<Dictionary> RenderingServer::_shader_get_shader_parameter_list(RID p_shader) const {}

static RS::SurfaceData _dict_to_surf(const Dictionary &p_dictionary) {}
RID RenderingServer::_mesh_create_from_surfaces(const TypedArray<Dictionary> &p_surfaces, int p_blend_shape_count) {}
void RenderingServer::_mesh_add_surface(RID p_mesh, const Dictionary &p_surface) {}
Dictionary RenderingServer::_mesh_get_surface(RID p_mesh, int p_idx) {}

TypedArray<Dictionary> RenderingServer::_instance_geometry_get_shader_parameter_list(RID p_instance) const {}

TypedArray<Image> RenderingServer::_bake_render_uv2(RID p_base, const TypedArray<RID> &p_material_overrides, const Size2i &p_image_size) {}

void RenderingServer::_particles_set_trail_bind_poses(RID p_particles, const TypedArray<Transform3D> &p_bind_poses) {}

Vector<uint8_t> _convert_surface_version_1_to_surface_version_2(uint64_t p_format, Vector<uint8_t> p_vertex_data, uint32_t p_vertex_count, uint32_t p_old_stride, uint32_t p_vertex_size, uint32_t p_normal_size, uint32_t p_position_stride, uint32_t p_normal_tangent_stride) {}

#ifdef TOOLS_ENABLED
void RenderingServer::set_surface_upgrade_callback(SurfaceUpgradeCallback p_callback) {}

void RenderingServer::set_warn_on_surface_upgrade(bool p_warn) {}
#endif

#ifndef DISABLE_DEPRECATED
void RenderingServer::fix_surface_compatibility(SurfaceData &p_surface, const String &p_path) {}
#endif

#ifdef TOOLS_ENABLED
void RenderingServer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {}
#endif

void RenderingServer::_bind_methods() {}

void RenderingServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry3D::MeshData &p_mesh_data) {}

void RenderingServer::mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes) {}

RID RenderingServer::instance_create2(RID p_base, RID p_scenario) {}

bool RenderingServer::is_render_loop_enabled() const {}

void RenderingServer::set_render_loop_enabled(bool p_enabled) {}

RenderingServer::RenderingServer() {}

TypedArray<StringName> RenderingServer::_global_shader_parameter_get_list() const {}

void RenderingServer::init() {}

RenderingServer::~RenderingServer() {}