mirror of
https://github.com/minetest/irrlicht.git
synced 2025-02-23 06:10:22 +01:00
Borrow CReadFile for tests
The method to load a mesh from a file was removed. This is not a good fix, but it will keep the tests working until a file loader can be properly exposed to the tests.
This commit is contained in:
parent
16b784162b
commit
05ede68af1
@ -1,5 +1,6 @@
|
|||||||
add_executable(tests
|
add_executable(tests
|
||||||
testCGLTFMeshFileLoader.cpp
|
testCGLTFMeshFileLoader.cpp
|
||||||
|
"${PROJECT_SOURCE_DIR}/source/Irrlicht/CReadFile.cpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(tests PROPERTIES
|
set_target_properties(tests PROPERTIES
|
||||||
@ -13,6 +14,12 @@ target_compile_options(tests
|
|||||||
"$<$<CXX_COMPILER_ID:GNU>:-Wall>"
|
"$<$<CXX_COMPILER_ID:GNU>:-Wall>"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(tests
|
||||||
|
PRIVATE
|
||||||
|
# For CReadFile
|
||||||
|
"${PROJECT_SOURCE_DIR}/source/Irrlicht"
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(tests
|
target_link_libraries(tests
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Catch2::Catch
|
Catch2::Catch
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "CReadFile.h"
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include <catch.hpp>
|
#include <catch.hpp>
|
||||||
#include <irrlicht.h>
|
#include <irrlicht.h>
|
||||||
@ -21,7 +23,8 @@ public:
|
|||||||
, m_mesh { nullptr }
|
, m_mesh { nullptr }
|
||||||
{
|
{
|
||||||
auto* smgr = m_device->getSceneManager();
|
auto* smgr = m_device->getSceneManager();
|
||||||
m_mesh = smgr->getMesh(filepath, "");
|
irr::io::CReadFile f = irr::io::CReadFile(filepath);
|
||||||
|
m_mesh = smgr->getMesh(&f);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ScopedMesh()
|
~ScopedMesh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user