Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk committed Dec 23, 2024
1 parent 3f8cc1a commit 29e2999
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/F3DOptionsTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
* True boolean options need to be filtered out in ParseCLIOptions
* This is the easiest, compile time way to do it
*/
constexpr std::array<std::string_view, 4> CLIBooleans = {"version", "help", "readers-list", "scan-plugins"};
constexpr std::array CLIBooleans = {"version", "help", "readers-list", "scan-plugins", "renderin-backend-list"};

//----------------------------------------------------------------------------
/**
Expand Down
12 changes: 11 additions & 1 deletion application/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1149,10 +1149,20 @@ if(WIN32)
f3d_test(NAME TestRenderingBackenListWGL ARGS --rendering-backend-list NO_RENDER NO_BASELINE REGEXP "wgl: available")
elseif(APPLE)
f3d_test(NAME TestRenderingBackenListCOCOA ARGS --rendering-backend-list NO_RENDER NO_BASELINE REGEXP "cocoa: available")
elseif(F3D_TESTING_ENABLE_GLX_TESTS)
endif()

if(F3D_TESTING_ENABLE_GLX_TESTS)
f3d_test(NAME TestRenderingBackenListGLX ARGS --rendering-backend-list NO_RENDER NO_BASELINE REGEXP "glx: available")
endif()

if(F3D_TESTING_ENABLE_EGL_TESTS)
f3d_test(NAME TestRenderingBackenListEGL ARGS --rendering-backend-list NO_RENDER NO_BASELINE REGEXP "egl: available")
endif()

if(F3D_TESTING_ENABLE_OSMESA_TESTS)
f3d_test(NAME TestRenderingBackenListOSMesa ARGS --rendering-backend-list NO_RENDER NO_BASELINE REGEXP "osmesa: available")
endif()

# Test scan plugins
if(NOT F3D_MACOS_BUNDLE)
f3d_test(NAME TestScanPluginsCheckNative ARGS --scan-plugins NO_RENDER NO_BASELINE REGEXP " - native")
Expand Down
3 changes: 2 additions & 1 deletion python/F3DPythonBindings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ PYBIND11_MODULE(pyf3d, module)
"autoload_plugins", &f3d::engine::autoloadPlugins, "Automatically load internal plugins")
.def_static("get_plugins_list", &f3d::engine::getPluginsList)
.def_static("get_lib_info", &f3d::engine::getLibInfo, py::return_value_policy::reference)
.def_static("get_readers_info", &f3d::engine::getReadersInfo);
.def_static("get_readers_info", &f3d::engine::getReadersInfo)
.def_static("get_rendering_backend_list", &f3d::engine::getRenderingBackendList);

// libInformation
py::class_<f3d::engine::libInformation>(module, "LibInformation")
Expand Down
6 changes: 6 additions & 0 deletions python/testing/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ def test_get_readers_info():
assert isinstance(reader.plugin_name, str) and reader.plugin_name
assert isinstance(reader.has_scene_reader, bool)
assert isinstance(reader.has_geometry_reader, bool)


def test_get_rendering_backend_list():
backends = f3d.Engine.get_rendering_backend_list()

assert isinstance(backends, dict) and len(backends) == 5

0 comments on commit 29e2999

Please sign in to comment.