diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-23 11:06:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 11:06:47 +0200 |
commit | f583b835db4a5733a56a06ec059e4c94136ab331 (patch) | |
tree | 65e80950cacd963755c3742b39e17ce3d881c37e /core/extension | |
parent | 155fa4e156258b51e0c70544ce4b4b596640c28f (diff) | |
parent | dca6db76afddf5220cdb0b3f72f8f41a987bc87d (diff) |
Merge pull request #64690 from touilleMan/projection-members-offsets-in-gdentension-api
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/extension_api_dump.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index 7023d4aa9b..5cf951a93c 100644 --- a/core/extension/extension_api_dump.cpp +++ b/core/extension/extension_api_dump.cpp @@ -91,6 +91,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { } const uint32_t vec3_elems = 3; + const uint32_t vec4_elems = 4; const uint32_t ptrsize_32 = 4; const uint32_t ptrsize_64 = 8; static const char *build_config_name[4] = { "float_32", "float_64", "double_32", "double_64" }; @@ -141,7 +142,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { Variant::AABB, (vec3_elems * 2) * sizeof(float), (vec3_elems * 2) * sizeof(float), (vec3_elems * 2) * sizeof(double), (vec3_elems * 2) * sizeof(double) }, { Variant::BASIS, (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(double), (vec3_elems * 3) * sizeof(double) }, { Variant::TRANSFORM3D, (vec3_elems * 4) * sizeof(float), (vec3_elems * 4) * sizeof(float), (vec3_elems * 4) * sizeof(double), (vec3_elems * 4) * sizeof(double) }, - { Variant::PROJECTION, 4 * 4 * sizeof(float), 4 * 4 * sizeof(float), 4 * 4 * sizeof(double), 4 * 4 * sizeof(double) }, + { Variant::PROJECTION, (vec4_elems * 4) * sizeof(float), (vec4_elems * 4) * sizeof(float), (vec4_elems * 4) * sizeof(double), (vec4_elems * 4) * sizeof(double) }, { Variant::COLOR, 4 * sizeof(float), 4 * sizeof(float), 4 * sizeof(float), 4 * sizeof(float) }, { Variant::STRING_NAME, ptrsize_32, ptrsize_64, ptrsize_32, ptrsize_64 }, { Variant::NODE_PATH, ptrsize_32, ptrsize_64, ptrsize_32, ptrsize_64 }, @@ -287,6 +288,10 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { Variant::BASIS, "z", vec3_elems * 2 * sizeof(float), vec3_elems * 2 * sizeof(float), vec3_elems * 2 * sizeof(double), vec3_elems * 2 * sizeof(double) }, { Variant::TRANSFORM3D, "basis", 0, 0, 0, 0 }, { Variant::TRANSFORM3D, "origin", (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(double), (vec3_elems * 3) * sizeof(double) }, + { Variant::PROJECTION, "x", 0, 0, 0, 0 }, + { Variant::PROJECTION, "y", vec4_elems * sizeof(float), vec4_elems * sizeof(float), vec4_elems * sizeof(double), vec4_elems * sizeof(double) }, + { Variant::PROJECTION, "z", vec4_elems * 2 * sizeof(float), vec4_elems * 2 * sizeof(float), vec4_elems * 2 * sizeof(double), vec4_elems * 2 * sizeof(double) }, + { Variant::PROJECTION, "w", vec4_elems * 3 * sizeof(float), vec4_elems * 3 * sizeof(float), vec4_elems * 3 * sizeof(double), vec4_elems * 3 * sizeof(double) }, { Variant::COLOR, "r", 0, 0, 0, 0 }, { Variant::COLOR, "g", sizeof(float), sizeof(float), sizeof(float), sizeof(float) }, { Variant::COLOR, "b", 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float) }, |