Fix compile for 4.0.

This commit is contained in:
Relintai 2021-02-06 11:49:29 +01:00
parent ab36f527d7
commit 9bd8004895
7 changed files with 41 additions and 6 deletions

View File

@ -2,7 +2,7 @@
This is a c++ engine module for the Godot engine, containing my mesh merging utilities.
It supports both godot 3.2 and 4.0 (master). Note that since 4.0 is still in very early stages I only
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
check whether it works from time to time.
# Pre-built binaries

View File

@ -18,7 +18,7 @@
#define light_h "scene/3d/light_3d.h"
#define visual_server_h "servers/rendering_server.h"
#define mesh_instance_h "scene/3d/mesh_instance_3d.h"
#define pool_vector_h "core/vector.h"
#define pool_vector_h "core/templates/vector.h"
#define physics_server_h "servers/physics_server_3d.h"
#define immediate_geometry_h "scene/3d/immediate_geometry_3d.h"
#define include_pool_vector \

View File

@ -25,9 +25,15 @@ SOFTWARE.
*/
#include "core/reference.h"
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/reference.h"
#include "core/variant/array.h"
#else
#include "core/reference.h"
#include "core/array.h"
#endif
#include "simplify.h"

View File

@ -25,7 +25,17 @@ SOFTWARE.
#ifndef MESH_MERGER_H
#define MESH_MERGER_H
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/reference.h"
#include "core/templates/vector.h"
#include "core/math/color.h"
#else
#include "core/reference.h"
#include "core/vector.h"
#include "core/color.h"
#endif
#include "defines.h"
@ -34,11 +44,9 @@ include_pool_vector
#include mesh_instance_h
#include "core/color.h"
#include "core/math/rect2.h"
#include "core/math/vector2.h"
#include "core/math/vector3.h"
#include "core/vector.h"
#include "scene/main/node.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"

View File

@ -23,7 +23,13 @@ SOFTWARE.
#ifndef MESH_UTILS_H
#define MESH_UTILS_H
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/object.h"
#else
#include "core/object.h"
#endif
#include "scene/resources/texture.h"

View File

@ -24,7 +24,14 @@ SOFTWARE.
#include "register_types.h"
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/config/engine.h"
#else
#include "core/engine.h"
#endif
#include "fast_quadratic_mesh_simplifier.h"
#include "mesh_merger.h"
#include "mesh_utils.h"

View File

@ -14,10 +14,18 @@
//
// 5/2016: Chris Rorden created minimal version for OSX/Linux/Windows compile
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/string/ustring.h"
#include "core/variant/array.h"
#else
#include "core/ustring.h"
#include "core/array.h"
#endif
#include "core/math/vector2.h"
#include "core/math/vector3.h"
#include "core/ustring.h"
#include "scene/resources/mesh.h"
#include <float.h> //FLT_EPSILON, DBL_EPSILON