mirror of
https://github.com/Relintai/mesh_data_resource.git
synced 2025-02-20 17:14:31 +01:00
Move the ifdef to the beginning of the uv_unwrap method.
This commit is contained in:
parent
e031ed36b5
commit
5521afffa7
@ -26,8 +26,8 @@ SOFTWARE.
|
|||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
#ifdef XATLAS_PRESENT
|
#ifdef XATLAS_PRESENT
|
||||||
#include "scene/resources/surface_tool.h"
|
|
||||||
#include "core/local_vector.h"
|
#include "core/local_vector.h"
|
||||||
|
#include "scene/resources/surface_tool.h"
|
||||||
#include "thirdparty/xatlas/xatlas.h"
|
#include "thirdparty/xatlas/xatlas.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -150,6 +150,7 @@ struct MeshDataResourceUnwrapSurface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool MeshDataResource::uv_unwrap(float p_texel_size) {
|
bool MeshDataResource::uv_unwrap(float p_texel_size) {
|
||||||
|
#ifdef XATLAS_PRESENT
|
||||||
if (_arrays.size() != ArrayMesh::ARRAY_MAX) {
|
if (_arrays.size() != ArrayMesh::ARRAY_MAX) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -257,7 +258,7 @@ bool MeshDataResource::uv_unwrap(float p_texel_size) {
|
|||||||
|
|
||||||
int r_index_count = output.indexCount;
|
int r_index_count = output.indexCount;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
print_verbose("Mesh: Gen indices: " + itos(gen_index_count));
|
print_verbose("Mesh: Gen indices: " + itos(gen_index_count));
|
||||||
//go through all indices
|
//go through all indices
|
||||||
@ -309,7 +310,6 @@ bool MeshDataResource::uv_unwrap(float p_texel_size) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
xatlas::Destroy(atlas);
|
xatlas::Destroy(atlas);
|
||||||
|
|
||||||
::free(r_vertex);
|
::free(r_vertex);
|
||||||
@ -318,7 +318,6 @@ bool MeshDataResource::uv_unwrap(float p_texel_size) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#ifdef XATLAS_PRESENT
|
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user