Code Monkey home page Code Monkey logo

magnum-plugins's People

Contributors

andysomogyi avatar bqqbarbhg avatar costashatz avatar ffreling avatar ikalevatykh avatar jlaxson avatar jmgr avatar lacyyy avatar lb-- avatar melikebatihan avatar mosra avatar mrxz avatar mtao avatar neonit avatar olga-python avatar pezcode avatar playgroo avatar rune-scape avatar sheerluck avatar sigman78 avatar squareys avatar sthalik avatar thehans avatar tostein avatar williamjcm avatar wivlaro avatar xqms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magnum-plugins's Issues

Support Basis format files

Basis universal is an open source GPU-oriented image format. Images are stored in a compressed format (with compressed sizes comparable to PNG) but can be transcoded to a variety of compressed GPU formats (ASTC, ETC2, BC3) or to RGBA.

This functionality allows developers to push a single asset to all platforms without worrying about which GPU compression formats are supported on the target.

The basis format itself can store multiple images and multiple mips, so it can be used comparably to DDS or KTX in functionality. In fact a single basis file can store an entire texture catalog of varying image sizes, although it would probably be reasonable to implement logic that just loads the first image in a file

Proper use of INT16_MAX

Could you please change the use of INT16_MAX in OpenDdl/Type.h to

#include <limits>

#define INT16_MAX std::numeric_limits<std::int16_t>::max()

Cause it is more C++11 idiomatic and free of warning across the compilers.

the "magnum-deps" repository requested

It took me about 8 hours to finally build magnum through out Corrade to project magnum-plugins, what A STEP !!! what cost the most of my time is searching for the correct depended packages and build it, as a matter of fact, i was giving up to build harfbuzz, cuz maybe there is a dependency hell. sometime, there will be some necessary renaming needed to be done, cause the cmake script only accept specific pattern of file arrangement. /package/ci/appveyor* helps a lot through out the process. thx for releasing the scripts.

so, here comes a "fair" call that why not creating another repos, like magnum-deps to collect all the packages needed by magnum components and connecting the cumbersome building processes.

Having trouble statically linking to FreeTypeFont

I'm building Corrade, Mangum, and MagnumPlugins statically, and I need to use FreeTypeFont. However, ${MAGNUMPLUGINS_FreeTypeFont_LIBRARIES} is empty for me (resulting in linker errors), even though the line find_package(MagnumPlugins REQUIRED COMPONENTS FreeTypeFont) succeeds. I have a full minimal test case here, and the output of my build log can be found here.

Excerpt from Main.cpp:

static int load_corrade_plugins()
{
    CORRADE_PLUGIN_IMPORT(FreeTypeFont);
    return 0;
}
CORRADE_AUTOMATIC_INITIALIZER(load_corrade_plugins);

Excerpt from build log:

-- Found Corrade: C:/Users/LB/GitHub/magnum-plugins-bug/build/deps-install/lib/libCorradeUtility.a
-- Found OpenGL: opengl32
-- Found Magnum: C:/Users/LB/GitHub/magnum-plugins-bug/build/deps-install/lib/libMagnum.a  found components:  TextureTools Text
-- LIB_SUFFIX variable is not defined. It will be autodetected now.
-- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
-- LIB_SUFFIX autodetected as '', libraries will be installed into C:/Users/LB/GitHub/magnum-plugins-bug/build/deps-install/lib
-- Found Freetype: C:/Users/LB/Code/SFML-install/lib/libfreetype.a (found version "2.6.0")
-- Found MagnumPlugins: C:/Users/LB/GitHub/magnum-plugins-bug/build/deps-install/include/MagnumPlugins  found components:  FreeTypeFont
-- MAGNUMPLUGINS_FreeTypeFont_LIBRARIES=
-- Configuring done

The linker errors:

CMakeFiles\magnum-plugins-bug.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x9): undefined reference to `pluginImporter_FreeTypeFont()'
CMakeFiles\magnum-plugins-bug.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0xe): undefined reference to `resourceInitializer_FreeTypeFont()'

I'm building with nuwen MinGW 5.2.0 on Windows 10 using CMake 3.3.1.

Note: everything works if I build shared libraries instead of static libraries, though obviously ${MAGNUMPLUGINS_FreeTypeFont_LIBRARIES} is still empty. Build log for that can be found here.

wish: multi-primitive loading for GLTF

First of all, nice work on the engine! I'm trying to use magnum for generating renderings in a deep learning pipeline.

I currently get this one a lot and end up with parts of my meshes missing:

Trade::TinyGltfImporter::mesh3D(): more than one primitive per mesh is not supported at the moment, only the first will be imported

How involved would it be to implement this properly? I'm new both to magnum and GLTF, so I'm not sure I understand all the implications (Does magnum support multiple primitive types for one mesh? ...).

If you give me some roadmap of what needs to be done, I could probably work on this :-)

Here is an example mesh file: https://uni-bonn.sciebo.de/s/psUuQOVBmxAfwXU

Missing Assimp dependency for package/debian

There is a missing dependency for libassimp-dev on the Debian package, making the dpkg-buildpackage fail at compilation (without clear message of why it failed) instead of during the dependency check, in case the library is not installed.

The dependency is missing at:

Build-Depends: debhelper (>= 9), cmake (>= 2.8.12), magnum-dev, libdevil-dev, libjpeg-dev, libpng12-dev, libfreetype6-dev

Draco compression support in TinyGltfImporter

The current version in magnum-plugins is 2.0.0 and the latest tinygltf is 2.4.1

// Version:
// - v2.4.1 Fix some glTF object class does not have extensions and/or
// extras property.
// - v2.4.0 Experimental RapidJSON and C++14 support(Thanks to @jrkoone).
// - v2.3.1 Set default value of minFilter and magFilter in Sampler to -1.
// - v2.3.0 Modified Material representation according to glTF 2.0 schema
// (and introduced TextureInfo class)
// Change the behavior of Value::IsNumber. It return true either the
// value is int or real.
// - v2.2.0 Add loading 16bit PNG support. Add Sparse accessor support(Thanks
// to @Ybalrid)
// - v2.1.0 Add draco compression.
// - v2.0.1 Add comparsion feature(Thanks to @Selmar).
// - v2.0.0 glTF 2.0!.

ImGui integration is not working as specified in documentation

Hello again dear Magnumers,

I tried to use the ImGui implementation of Magnum and Visual Studio exit the compilation with the following output:

1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Checking Build System
1>CMake does not need to re-run because G:/programming/c++/multiverses/build/CMakeFiles/generate.stamp is up-to-date.
1>CMake is re-running because G:/programming/c++/multiverses/build/src/CMakeFiles/generate.stamp is out-of-date.
1>  the file 'G:/programming/c++/multiverses/src/CMakeLists.txt'
1>  is newer than 'G:/programming/c++/multiverses/build/src/CMakeFiles/generate.stamp.depend'
1>  result='-1'
1>-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
1>CMake Error at G:/programming/c++/vcpkg/scripts/buildsystems/vcpkg.cmake:233 (_find_package):
1>  By not providing "FindMagnumIntegration.cmake" in CMAKE_MODULE_PATH this
1>  project has asked CMake to find a package configuration file provided by
1>  "MagnumIntegration", but CMake did not find one.
1>
1>  Could not find a package configuration file provided by "MagnumIntegration"
1>  with any of the following names:
1>
1>    MagnumIntegrationConfig.cmake
1>    magnumintegration-config.cmake
1>
1>  Add the installation prefix of "MagnumIntegration" to CMAKE_PREFIX_PATH or
1>  set "MagnumIntegration_DIR" to a directory containing one of the above
1>  files.  If "MagnumIntegration" provides a separate development package or
1>  SDK, be sure it has been installed.
1>Call Stack (most recent call first):
1>  src/CMakeLists.txt:2 (find_package)
1>
1>
1>-- Configuring incomplete, errors occurred!
1>See also "G:/programming/c++/multiverses/build/CMakeFiles/CMakeOutput.log".
1>CMake Configure step failed.  Build files cannot be regenerated correctly.  Attempting to stop IDE build.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code -1073741819.
1>Done building project "ZERO_CHECK.vcxproj" -- FAILED.
2>------ Rebuild All started: Project: Multiverses, Configuration: Debug Win32 ------
2>Building Custom Rule G:/programming/c++/multiverses/src/CMakeLists.txt
2>CMake is re-running because G:/programming/c++/multiverses/build/src/CMakeFiles/generate.stamp is out-of-date.
2>  the file 'G:/programming/c++/multiverses/src/CMakeLists.txt'
2>  is newer than 'G:/programming/c++/multiverses/build/src/CMakeFiles/generate.stamp.depend'
2>  result='-1'
2>-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
2>CMake Error at G:/programming/c++/vcpkg/scripts/buildsystems/vcpkg.cmake:233 (_find_package):
2>  By not providing "FindMagnumIntegration.cmake" in CMAKE_MODULE_PATH this
2>  project has asked CMake to find a package configuration file provided by
2>  "MagnumIntegration", but CMake did not find one.
2>
2>  Could not find a package configuration file provided by "MagnumIntegration"
2>  with any of the following names:
2>
2>    MagnumIntegrationConfig.cmake
2>    magnumintegration-config.cmake
2>
2>  Add the installation prefix of "MagnumIntegration" to CMAKE_PREFIX_PATH or
2>  set "MagnumIntegration_DIR" to a directory containing one of the above
2>  files.  If "MagnumIntegration" provides a separate development package or
2>  SDK, be sure it has been installed.
2>Call Stack (most recent call first):
2>  src/CMakeLists.txt:2 (find_package)
2>
2>
2>-- Configuring incomplete, errors occurred!
2>See also "G:/programming/c++/multiverses/build/CMakeFiles/CMakeOutput.log".
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 1.
2>Done building project "Multiverses.vcxproj" -- FAILED.
3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug Win32 ------
3>Building Custom Rule G:/programming/c++/multiverses/CMakeLists.txt
3>CMake does not need to re-run because G:/programming/c++/multiverses/build/CMakeFiles/generate.stamp is up-to-date.
========== Rebuild All: 1 succeeded, 2 failed, 0 skipped ==========

My CMakeList.txt file I've modified like in the documentation at : https://doc.magnum.graphics/magnum/namespaceMagnum_1_1ImGuiIntegration.html

find_package(Magnum REQUIRED GL Shaders Sdl2Application)
find_package(MagnumIntegration REQUIRED ImGui)

set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)

add_executable(Multiverses Multiverses.cpp)
target_link_libraries(Multiverses PRIVATE
    Magnum::Application
    Magnum::GL
    Magnum::Magnum
    Magnum::Shaders
	MagnumIntegration::ImGui)

Am I missing something?

meshoptimizersceneconverter build failed because meshoptimizer has updated

Hi, I installed meshoptimizersceneconverter plugin failed with the following error:

C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): error C2660: 'meshopt_simplifySloppy': function does not take 7 arguments
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(354): note: see declaration of 'meshopt_simplifySloppy'
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(620): note: could be 'size_t meshopt_simplifySloppy(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,float *)'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): note: 'size_t meshopt_simplifySloppy(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,float *)': expects 9 arguments - 7 provided
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): note: while trying to match the argument list '(T *, Corrade::Containers::ArrayView<const Magnum::UnsignedInt>, Magnum::UnsignedInt, const float *, Magnum::UnsignedInt, __int64, const Magnum::UnsignedInt)'
        with
        [
            T=Magnum::UnsignedInt
        ]
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): error C2660: 'meshopt_simplify': function does not take 8 arguments
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(339): note: see declaration of 'meshopt_simplify'
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(618): note: could be 'size_t meshopt_simplify(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,unsigned int,float *)'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): note: 'size_t meshopt_simplify(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,unsigned int,float *)': could not deduce template argument for 'const T *' from 'Corrade::Containers::ArrayView<const Magnum::UnsignedInt>'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): note: while trying to match the argument list '(T *, Corrade::Containers::ArrayView<const Magnum::UnsignedInt>, Magnum::UnsignedInt, const float *, Magnum::UnsignedInt, __int64, const Magnum::UnsignedInt, const Magnum::Float)'
        with
        [
            T=Magnum::UnsignedInt
        ]

The reason is meshoptimizer modified function meshopt_simplifySloppy and meshopt_simplify, their parameters have changed, the related link: zeux/meshoptimizer@66040c7 and zeux/meshoptimizer#217

Can someone help fix this error please? Thank you.

Could NOT find Magnum (missing: AnySceneImporter)

Hi,

I was setup and able to run sdl2 application. but when i try to load plugin. it alway error like that
"Could NOT find Magnum (missing: AnySceneImporter)" example of load AnySceneImporter

i'm using static lib

find_package(Magnum REQUIRED
    MeshTools
    Shaders
    SceneGraph
    AnySceneImporter
    Sdl2Application)

set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)

add_executable(MyApplication MyApplication.cpp

)

target_link_libraries(MyApplication
    Magnum::Application
    Magnum::Magnum
    Magnum::MeshTools
    Magnum::SceneGraph
    Magnum::Shaders
    Magnum::AnySceneImporter
    )

here is Cmake-gui project
camw

KTX2 + Basis Universal

I had time to kill so I spent an afternoon investigating how to hook up KtxImporter with Zstandard supercompression and the latest Basis Universal formats. Mainly writing this down so I don't forget again, but also happy to get some input.

Zstandard

This was rather trivial to add to KtxImporter, but might be unneeded (more below).

  • zstd has a script to generate single file libraries. The decoder is a ~600kB .c file without dependencies that can be bundled. The readme mentions a compiled WASM binary size of 26kB for the decoder, but I haven't verified that.
  • decoding is dead simple, not more than 3 function calls, and it's handled transparently

Updating basisu

Updating basis_universal to 1.15 for BasisImporter worked fairly quickly, too, with two caveats:

  • converter tests don't pass because image delta is over the limit, I assume this is the result of some new quality setting somewhere
  • keeping compatability with old versions (mainly the prehistoric 1.11 on vcpkg) is a little trickier because some functions and options changed names, but can be worked around with some SFINAE dances (there might be a version define to #if on, haven't checked)

Forwarding Basis-compressed KTX2 to BasisImporter

This one gave me a bit of a headache. I naively assumed BasisImporter could handle the raw data inside KTX2 level data, but currently it only decodes .basis containers. There are ways to use the lowlevel transcoders, but for BasisLZ (Basis ETC1 + LZ supercompression) this is completely insane because you need to validate and decompress the global LZ data and somehow pass that through to BasisImporter.

The far easier solution here is to detect Basis data in KTXImporter early and then directly send the entire file data to BasisImporter. Basisu 1.15 can decode KTX2 and handles all the BasisLZ supercompression stuff for us. BasisImporter then only needs a few minor changes to use ktx2_transcoder next to the existing basisu_transcoder (which only supports .basis containers).

Another effect would be that basisu handles all Zstandard decoding, so that might not have to be handled in KtxImporter, unless it's commonly used outside of Basis-compressed KTX files. Needs some investigation.

Compile issues on osx

Errors:
use of undeclared identifier CORRADE_INTERNAL_ASSERT_UNREACHABLE in StbImageConverter.cpp (line 108)

I've pulled from Corrade master and am getting these issues.

PluginManager::Manager::load(): cannot load plugin AssimpImporter

PluginManager::Manager::load(): cannot load plugin AssimpImporter from "/home/obirt/Code/Render/VIS-magnum/cmake-build-debug/src/magnum-d/importers/AssimpImporter.so": /home/obirt/Code/Render/VIS-magnum/cmake-build-debug/src/magnum-d/importers/AssimpImporter.so: undefined symbol: _ZN6Magnum5Trade16AnyImageImporterC1ERN7Corrade13PluginManager7ManagerINS0_16AbstractImporterEEE

Accidentally passing filename as data to StbTrueTypeFont causes crash

I did this by accident on a StbTrueTypeFont plugin instance:

font->openSingleData("/usr/share/fonts/DejaVuSans.ttf", 18.0f);

Yes, the filename does not even exist (there's the TTF/ subdirectory missing), but in any case this was a filename passed in as "TTF file data" and it crashed deep in stb_truetype. Things to do:

  • Check that I'm not doing anything wrong in the plugin (for example passing the data array with unbounded size) yeah, totally my fault
  • Make a repro case, report upstream no need (well, actually it would be much better if the stb_truetype APIs took pointer+size instead of just pointer, but that's a more fundamental issue)
  • Update to latest stb_truetype in src/external/stb -- 986bace

Unable to install magnum-plugins.deb on Linux Mint 20.2

Linux Mint 20.2 (based on Ubuntu 20.04, Focal)

I tried following instructions here to install magnum-plugins:
https://doc.magnum.graphics/magnum/building-plugins.html#building-plugins-packages-deb

When running dpkg-buildpackage the build attempts a secure upload at the end which fails.

...
dpkg-deb: building package 'magnum-plugins-dev' in '../magnum-plugins-dev_2020.06_amd64.deb'.  
dpkg-deb: building package 'magnum-plugins' in '../magnum-plugins_2020.06_amd64.deb'.          
dpkg-deb: building package 'magnum-plugins-dbgsym' in 'debian/.debhelper/scratch-space/build-magnum-plugins/magnum-plugins-dbgsym_2020.06_amd64.deb'.
        Renaming magnum-plugins-dbgsym_2020.06_amd64.deb to magnum-plugins-dbgsym_2020.06_amd64.ddeb                                                                                           
 dpkg-genbuildinfo                                                                             
 dpkg-genchanges  >../magnum-plugins_2020.06_amd64.changes                                     
dpkg-genchanges: info: including full source code in upload                                    
 dpkg-source --after-build .                                                                   
dpkg-buildpackage: info: full upload; Debian-native package (full source is included)          
 signfile magnum-plugins_2020.06.dsc                                                           
gpg: keyblock resource '/home/hans/.gnupg/pubring.kbx': Permission denied                      
gpg: skipped "Vladimír Vondruš <[email protected]>": No secret key
gpg: dpkg-sign.ampZCdiJ/magnum-plugins_2020.06.dsc: clear-sign failed: No secret key                                                                                                           
                                                                                               
dpkg-buildpackage: error: failed to sign .dsc file 

I assume this is inconsequential since it still appears to have successfully built the .deb file, but I might as well mention it because the following step also fails:

$ sudo dpkg -i ../magnum-plugins*.deb                                                                                                  
(Reading database ... 524126 files and directories currently installed.)                                                                                                                       
Preparing to unpack .../magnum-plugins_2020.06_amd64.deb ...                                                                                                                                   
Unpacking magnum-plugins (2020.06) over (2020.06) ...                                          
Preparing to unpack .../magnum-plugins-dev_2020.06_amd64.deb ...                                                                                                                               
Unpacking magnum-plugins-dev (2020.06) over (2020.06) ...                                      
dpkg: dependency problems prevent configuration of magnum-plugins:                                                                                                                             
 magnum-plugins depends on libopenexr22; however:                                              
  Package libopenexr22 is not installed.                                                       
                                                                                               
dpkg: error processing package magnum-plugins (--install):                        
 dependency problems - leaving unconfigured                                                                                                                                                    
dpkg: dependency problems prevent configuration of magnum-plugins-dev:                         
 magnum-plugins-dev depends on magnum-plugins (= 2020.06); however:                            
  Package magnum-plugins is not configured yet.                                                
                                                                                               
dpkg: error processing package magnum-plugins-dev (--install):                                 
 dependency problems - leaving unconfigured                                                    
Processing triggers for libc-bin (2.31-0ubuntu9.3) ...                                         
Errors were encountered while processing:                                                      
 magnum-plugins                                                                                
 magnum-plugins-dev                                                                            

I also attempted to disable related features as explained here, editing packages/debian/rules with

-DWITH_MINIEXRIMAGECONVERTER=OFF
-DWITH_OPENEXRIMAGECONVERTER=OFF
-DWITH_OPENEXRIMPORTER=OFF

But the resulting .deb file still requires libopenexr22
The problem is that the version available on this distro is actually libopenexr24

Importers for "photo" file formats

At least basic importer for JPEG files. It should be able to use system libjpeg or use something special with more features / better performance, such as:

  • libjpeg-turbo - better performance, http://libjpeg-turbo.virtualgl.org/ , already in ArchLinux and Fedora, compatible with stock libjpeg
  • Arithmetic encoding in addition to Huffman - libjpeg can be compiled with support for that, but it would be good to have it by default, no matter what the distros support, as these patents will expire soon. On http://filmicgames.com/archives/778 there are more patented algorithms.

Another formats:

  • WebM?

Lossless compression:

Maybe going one step further and decompressing the data directly on the GPU (and leaving them there, as they would be copied there anyway)?

Which framework is used for the plugins system?

Greetings again!

I was wondering if any specific framework is used for the plugin system? I was planning to build Magnum inside of an OSGi framework in my main core application so that I can on the fly load and plugin or unload a plugin without interrupting the main app which is undepdent.

The most powerful programming paradigm I've learned as an Architect.
Dynamic micro-service oriented architecture.

For more information please check http://cppmicroservices.org/

OpenDdl missing include, VS2017 regression

Missing '#include ' in the OpenDdl.cpp found in vs 2017 build.

FAILED: src/MagnumPlugins/OpenGexImporter/CMakeFiles/OpenGexImporterObjects.dir/OpenDdl/OpenDdl.cpp.obj 
C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1410~1.250\bin\Hostx64\x64\cl.exe  /nologo /TP -DCORRADE_IS_DEBUG_BUILD -DNOMINMAX -DOpenGexImporterObjects_EXPORTS -DUNICODE -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -I..\deps\include -I..\deps\include\MagnumExternal\OpenGL -I..\src -Isrc /DWIN32 /D_WINDOWS  /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1   /W4 /wd4251 /wd4244 /wd4267 /wd4351 /wd4373 /wd4510 /wd4610 /wd4512 /wd4661 /wd4702 /wd4706 /wd4800 /wd4910 /showIncludes /Fosrc\MagnumPlugins\OpenGexImporter\CMakeFiles\OpenGexImporterObjects.dir\OpenDdl\OpenDdl.cpp.obj /Fdsrc\MagnumPlugins\OpenGexImporter\CMakeFiles\OpenGexImporterObjects.dir\ /FS -c ..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(65): warning C4312: 'reinterpret_cast': conversion from 'Magnum::UnsignedInt' to 'void *' of greater size
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1174): error C2039: 'uninitialized_copy': is not a member of 'std'
C:\projects\magnum-plugins\deps\include\MagnumExternal/Optional/optional.hpp(930): note: see declaration of 'std'
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1174): error C3861: 'uninitialized_copy': identifier not found
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1175): error C2039: 'uninitialized_copy': is not a member of 'std'
C:\projects\magnum-plugins\deps\include\MagnumExternal/Optional/optional.hpp(930): note: see declaration of 'std'
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1175): error C3861: 'uninitialized_copy': identifier not found
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1176): error C2039: 'uninitialized_copy': is not a member of 'std'
C:\projects\magnum-plugins\deps\include\MagnumExternal/Optional/optional.hpp(930): note: see declaration of 'std'
..\src\MagnumPlugins\OpenGexImporter\OpenDdl\OpenDdl.cpp(1176): error C3861: 'uninitialized_copy': identifier not found
[78/136] Building CXX object src\MagnumPlugins\OpenGexImporter\CMakeFiles\MagnumOpenGexImporterTestLib.dir\OpenGexImporter.cpp.obj
[79/136] Building CXX object src\MagnumPlugins\OpenGexImporter\CMakeFiles\OpenGexImporterObjects.dir\OpenGexImporter.cpp.obj
ninja: build stopped: subcommand failed.
Command exited with code 1

Wrong line ending normalization under Windows due to typo in .gitattributes

Typo in https://github.com/mosra/magnum-plugins/blob/master/package/msys/.gitattributes

magnum-plugins/PKGBUILD text eof=lf
PKGBUILD text eof=lf

There's no eof attribute, only the eol attribute, hence it should be:

magnum-plugins/PKGBUILD text eol=lf
PKGBUILD text eol=lf

Because of this typo, Git on Windows wrongly normalizes the PKGBUILD files to CRLF line endings.

The same bug and typo is present in https://github.com/mosra/magnum/blob/master/package/msys/.gitattributes where I opened an issue as well.

vcpkg does not work properly due to lib files not copied to the installed folder

I am having problem installing magnum plugins via the latest vcpkg command line tool. The library is built correctly but the libraries (for example FreeTypeFont.lib) are not copied to the target directory where all of the other vcpkg installed libraries are located in C:\tools\vcpkg\installed\x64-windows\lib\magnum\fonts. The only file located in the installed directory is lib\magnum\fonts\MagnumFont.lib.

But, I was able to find the missing lib files in the build folder C:\tools\vcpkg\buildtrees\magnum-plugins\x64-windows-rel\Release\lib\magnum\fonts

Due to this problem (for example using a freetype plugin) the command find_package(MagnumPlugins REQUIRED FreeTypeFont) will always fail with an error Could NOT find MagnumPlugins (missing: FreeTypeFont). The actual command that fails is find_library from here: https://github.com/mosra/magnum-plugins/blob/master/modules/FindMagnumPlugins.cmake#L241-L246 because those lib files are missing.

Once I copy the lib files from the buildtrees into the installed folder, the CMake completes without an issue.

Additionally, after the build only few DLL files were copied to the output directory. importers/*.dll and imageconverters/*.dll DLL files were copied over but fonts/*.dll were not at all. Had to manually copy them over.

TL;DR: After installing magnum-plugins via vcpkg the *.lib files are in the buildtrees but not copied to the installed directory.

Attentuation for Directional/Sun Lights when importing Blender files

_importer = _manager.loadAndInstantiate("BlenderImporter");
_importer->openFile("lights.blend")
Containers::Optional<Trade::LightData> l = _importer->light(0);

Blender 3.0.0 allows for 4 types of light by default: Point, Sun, Spot, and Area. Here are the results when I run the importer on each of these lights:

Loading point.blend ...
Found a light of type Trade::LightData::Type::Point !
Loading spot.blend ...
Found a light of type Trade::LightData::Type::Spot !
Loading area.blend ...
Trade::AssimpImporter::light(): light type 5 is not supported
No light Found !
Loading sun.blend ...
Trade::LightData: attenuation has to be (1, 0, 0) for an ambient or directional light but got Vector(0, 0, 0)
Aborted (core dumped)

Area lights are not supported, and gracefully pass with a warning and a NullOpt. Directional (ie. sun) lights however, note a different attenuation notation and crash before light() exits - meaning the user has no opportunity to fix the attenuation to the expected value.

Test code and blender files are attached.

magnum-blender-directional-light.zip

API to know what format the importer/converter is importing/converting to?

So, DevIL Image Importer is capable of figuring out which files to load; no big deal there (though it would obviously be faster to load if it knew what it was loading). But if I want to write DevIL Image Converter, I need to know what format to output as; there is no way to deduce the intent as there is when loading (obviously).

It looks like Stb has this same issue: stb_image_write.h is actually able to output in multiple formats besides PNG, but only does PNG because, well, I assume writing four nearly identical plugins isn't particular fun or rewarding just to get BMP, TGA, and HDR output.

The weird thing is, I know this information is available: it's passed to the constructor via std::string plugin. However, this information, once loaded to the AbstractPlugin, is not accessible. It's ostensibly passed to PluginMetadata, which is then accessible via name(), but is this the preferred way to access this data? It's like three layers down, and two layers of indirection.

If this is the preferred way, how come StbPngImageConverter doesn't select on this information and provide multiple outputs?

Update Basis Universal plugin for UASTC

I used PKG from @mosra archlinux repo basis-universal-src. (link)
After installing suceeds, I proceed with plugins installation which fails on missing files:

magnum-plugins makepkg...

makepkg -fp PKGBUILD
==> Making package: magnum-plugins dev-1 (četvrtak, 28. svibnja 2020. 19:51:40 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Found Corrade: /usr/include  found components: Containers rc Utility 
-- Found Magnum: /usr/include   
-- Found Corrade: /usr/include  found components: Containers rc Utility Main TestSuite 
-- Found Corrade: /usr/include  found components: Containers rc Utility Main PluginManager 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found BasisUniversal: /opt/basis-universal  found components: Encoder Transcoder 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found BasisUniversal: /opt/basis-universal  found components: Transcoder 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Audio 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: TextureTools GL Text 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools Primitives 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: MeshTools Trade GL Primitives 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: TextureTools GL Text 
-- Found Magnum: /usr/include  found components: Audio 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Configuring done
CMake Error at /usr/share/cmake/Corrade/UseCorrade.cmake:565 (add_library):
  Cannot find source file:

    /opt/basis-universal/basisu_astc_decomp.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  src/MagnumPlugins/CMakeLists.txt:29 (corrade_add_plugin)
  src/MagnumPlugins/BasisImageConverter/CMakeLists.txt:38 (add_plugin)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...

It seems PKGBUILD of basis-universal-src is missing basisu_astc_decomp.{cpp,h}. After prepending that to package function everything builds smoothly.

basis-universal-src PKGBUILD

# Contributor: mosra <[email protected]>

_pkgname=basis_universal
pkgname=basis-universal-src
pkgver=2f43afcc97d0a5dafdb73b4e24e123cf9687a418
pkgrel=1
pkgdesc="Basis Universal GPU Texture Codec (sources)"
arch=('any')
url="https://github.com/BinomialLLC/basis_universal"
license=("MIT")
source=("https://github.com/BinomialLLC/${_pkgname}/archive/${pkgver}.tar.gz")
md5sums=('fde3b32e8927409fd3aa0563dbe57099')

build() {
    true
}

package() {
    cd "$srcdir/$_pkgname-$pkgver"

    install -m755 -d $pkgdir/opt/basis-universal/transcoder
    for i in basisu_file_headers.h basisu_global_selector_cb.h basisu_global_selector_palette.h basisu_transcoder_internal.h basisu_transcoder_tables_{astc_0_255,astc,atc_55,atc_56,bc7_m5_alpha,bc7_m5_color,bc7_m6,dxt1_5,dxt1_6,pvrtc2_45,pvrtc2_alpha_33}.inc basisu_transcoder.{cpp,h} basisu.h; do
        install -m644 transcoder/$i $pkgdir/opt/basis-universal/transcoder/$i
    done

    install -m755 -d $pkgdir/opt/basis-universal
    for i in basisu_astc_decomp.{cpp,h} basisu_backend.{cpp,h} basisu_basis_file.{cpp,h} basisu_comp.{cpp,h} basisu_enc.{cpp,h} basisu_etc.{cpp,h} basisu_frontend.{cpp,h} basisu_global_selector_palette_helpers.{cpp,h} basisu_gpu_texture.{cpp,h} basisu_pvrtc1_4.{cpp,h} basisu_resample_filters.cpp basisu_resampler_filters.h  basisu_resampler.{cpp,h} basisu_ssim.{cpp,h} lodepng.{cpp,h}; do
        install -m644 $i $pkgdir/opt/basis-universal/$i
    done
}

I was not sure where to post this issue, here or on your archlinux repo. I posted it here because it might reach more people.

Expose Configuration Value implementation for Trade::BasisImporter::TargetFormat

Hi @mosra !

As TargetFormat is a public enum, it would make sense to also expose the ConfigurationValue conversion for it to allow configuration().value<TargetFormat>() to be used outside of the internal importer code:

namespace Corrade { namespace Utility {
/* Configuration value implementation for BasisImporter::TargetFormat */
template<> struct ConfigurationValue<Magnum::Trade::BasisImporter::TargetFormat> {
static std::string toString(Magnum::Trade::BasisImporter::TargetFormat value, ConfigurationValueFlags) {
if(Magnum::UnsignedInt(value) < Containers::arraySize(Magnum::Trade::FormatNames))
return Magnum::Trade::FormatNames[Magnum::UnsignedInt(value)];
return "<invalid>";
}
static Magnum::Trade::BasisImporter::TargetFormat fromString(const std::string& value, ConfigurationValueFlags) {
Magnum::Int i = 0;
for(const char* name: Magnum::Trade::FormatNames) {
if(name && value == name) return Magnum::Trade::BasisImporter::TargetFormat(i);
++i;
}
return Magnum::Trade::BasisImporter::TargetFormat(~Magnum::UnsignedInt{});
}
};
}}

In case I find some time, I might do this, but until then, here for anyone to pick up.

Best,
Jonathan

Build fails: error: static_assert failed "could not find from_json() method in T's namespace"

See the log here: http://beefy12.nyi.freebsd.org/data/head-amd64-default/p493484_s344398/logs/magnum-plugins-2019.01.log (IPv6 URL)

/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/./json.hpp:1378:9: error: static_assert failed "could not find from_json() method in T's namespace"
        static_assert(sizeof(BasicJsonType) == 0,
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/./json.hpp:1387:16: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::call<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        return call(j, val, priority_tag<1> {});
               ^
/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/./json.hpp:6861:9: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::operator()<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
        ^
/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/./json.hpp:9578:36: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__1::basic_string_view<char, std::__1::char_traits<char> >, void>::from_json<const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer> &, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        JSONSerializer<ValueType>::from_json(*this, ret);
                                   ^
/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/./json.hpp:9841:16: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::get<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
        return get<ValueType>();
               ^
/usr/include/c++/v1/string:875:29: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::operator basic_string_view<std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
        {__self_view __sv = __t; return assign(__sv);}
                            ^
/wrkdirs/usr/ports/graphics/magnum-plugins/work/magnum-plugins-2019.01/src/MagnumExternal/TinyGltf/tiny_gltf.h:1924:12: note: in instantiation of function template specialization 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, void>' requested here
    (*ret) = it.value();

Serious glTF importer bugs

@Squareys @NussknackerXXL

I'm quite disappointed by state of the glTF importer code, so the tone of the following might not be all 💮 and 🌞. Sorry in advance.

As reported by https://twitter.com/steeve/status/997138966754230272, the glTF importer plugin at its current state doesn't seem to work at all for any model in https://github.com/KhronosGroup/glTF-Sample-Models. I wonder what it was tested on?

I managed to fix it to display at least the mesh data correctly for Box and and AnimatedBox (patch below, not commited anywhere as it needs corresponding tests), but it still fails really bad on all other models. For the Cesium Milk Truck only the wheels are displayed and with weird texture coordinates, for example. Here's a patch that fixes at least something:

diff --git a/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp b/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp
index 690ddc0..cf8f7b2 100644
--- a/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp
+++ b/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp
@@ -317,9 +317,9 @@ Containers::Optional<MeshData3D> TinyGltfImporter::doMesh3D(const UnsignedInt id
                 return Containers::NullOpt;
             }
 
-            const size_t numPositions = bufferView.byteLength/sizeof(Vector3);
+            const size_t numPositions = accessor.count;
             positions.reserve(numPositions);
-            std::copy_n(reinterpret_cast<const Vector3*>(buffer.data.data() + bufferView.byteOffset), numPositions, std::back_inserter(positions));
+            std::copy_n(reinterpret_cast<const Vector3*>(buffer.data.data() + bufferView.byteOffset + accessor.byteOffset), numPositions, std::back_inserter(positions));
 
         } else if(attribute.first == "NORMAL") {
             if(accessor.type != TINYGLTF_TYPE_VEC3) {
@@ -327,9 +327,9 @@ Containers::Optional<MeshData3D> TinyGltfImporter::doMesh3D(const UnsignedInt id
                 return Containers::NullOpt;
             }
 
-            const size_t numNormals = bufferView.byteLength/sizeof(Vector3);
+            const size_t numNormals = accessor.count;
             normals.reserve(numNormals);
-            std::copy_n(reinterpret_cast<const Vector3*>(buffer.data.data() + bufferView.byteOffset), numNormals, std::back_inserter(normals));
+            std::copy_n(reinterpret_cast<const Vector3*>(buffer.data.data() + bufferView.byteOffset + accessor.byteOffset), numNormals, std::back_inserter(normals));
 
         /* Texture coordinate attribute ends with _0, _1 ... */
         } else if(Utility::String::beginsWith(attribute.first, "TEXCOORD")) {
@@ -341,9 +341,9 @@ Containers::Optional<MeshData3D> TinyGltfImporter::doMesh3D(const UnsignedInt id
             textureLayers.emplace_back();
             std::vector<Vector2>& textureCoordinates = textureLayers.back();
 
-            const size_t numTextureCoordinates = bufferView.byteLength/sizeof(Vector2);
+            const size_t numTextureCoordinates = accessor.count;
             textureCoordinates.reserve(numTextureCoordinates);
-            std::copy_n(reinterpret_cast<const Vector2*>(buffer.data.data() + bufferView.byteOffset), numTextureCoordinates, std::back_inserter(textureCoordinates));
+            std::copy_n(reinterpret_cast<const Vector2*>(buffer.data.data() + bufferView.byteOffset + accessor.byteOffset), numTextureCoordinates, std::back_inserter(textureCoordinates));
 
         /* Color attribute ends with _0, _1 ... */
         } else if(Utility::String::beginsWith(attribute.first, "COLOR")) {
@@ -383,13 +383,13 @@ Containers::Optional<MeshData3D> TinyGltfImporter::doMesh3D(const UnsignedInt id
     }
 
     std::vector<UnsignedInt> indices;
-    const UnsignedByte* start = idxBuffer.data.data() + idxBufferView.byteOffset;
+    const UnsignedByte* start = idxBuffer.data.data() + idxBufferView.byteOffset + idxAccessor.byteOffset;
     if(idxAccessor.componentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE) {
-        std::copy_n(start, idxBufferView.byteLength, std::back_inserter(indices));
+        std::copy_n(start, idxAccessor.count, std::back_inserter(indices));
     } else if(idxAccessor.componentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT) {
-        std::copy_n(reinterpret_cast<const UnsignedShort*>(start), idxBufferView.byteLength/sizeof(UnsignedShort), std::back_inserter(indices));
+        std::copy_n(reinterpret_cast<const UnsignedShort*>(start), idxAccessor.count, std::back_inserter(indices));
     } else if(idxAccessor.componentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT) {
-        std::copy_n(reinterpret_cast<const UnsignedInt*>(start), idxBufferView.byteLength/sizeof(UnsignedInt), std::back_inserter(indices));
+        std::copy_n(reinterpret_cast<const UnsignedInt*>(start), idxAccessor.count, std::back_inserter(indices));
     } else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
 
     return MeshData3D(meshPrimitive, std::move(indices), {std::move(positions)}, {std::move(normals)}, textureLayers, colorLayers, &mesh);

So, what's needed:

  • look at this tutorial and understand how buffers and views and accessors work. The code had it totally wrong and the test data did not cover any of that at all.
  • As far as I know, the official glTF repositories provide test data for all the corner cases. Use them, please.
  • Only the 8-bit indices are tested, never the 16-bit or 32-bit indices (and they have the same problem re views and accessors). These need to be fixed and tested too, the patch does that a bit, but probably not fully.
  • Assimp is able to import at least some material properties (color and roughness from PBR materials), so maybe a similar thing could be done here (until we have PBR import). Otherwise we get more reports about everything being plain gray.
  • In #41 I asked for testing and fixing proper handling of file opening failure. It was not done. Opening a nonexistent file still blows up somewhere later in the code. (I admit I should have triple checked before merging, sorry.)

This is quite important, as the latest release was marketed as having glTF support. This is far from that. I hope you have time for this, otherwise I need to drop whatever I am doing now and take over this plugin, as a lot of things will rely on it in the near future.

Load DDS files in DevIlImageLoader without decompression

I thought this would be just a few lines changed, but apparently not and the more I'm trying to search anything about this in the incredibly sparse docs the more miserable I get.

What I found out so far:

  • I thought that IL_IMAGE_FORMAT would be set to something DXT-related for *.dds, but it's set to RGBA for a DXT5 file.
  • So I thought that this is in IL_IMAGE_TYPE. That returns 0x1401 for all images and that value is not in the header. What's that?!
  • The IL header has some defines for DXT like IL_DXTC_FORMAT, IL_KEEP_DXTC_DATA or IL_DXT5, but I failed miserably at searching for their use when loading images.

So far it seems that there is no way to load the DDS files without decompression and that would be very bad, because what's the point of doing that? A plain JPEG would match such use case much better.

Cc: @alicemargatroid

Find modules have issues with paths containing spaces

CMake Error at magnum-plugins/modules/FindMagnum.cmake:328 (get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
magnum-plugins/CMakeLists.txt:34 (find_package)

What was must importing from Magnum in CMakeLists? And how to fix it?

OtherImageImporter type and fallback loading

DevIL can load a lot of formats that aren't super common (so I've declined to add an explicit loader type for all possible configurations) as well as ones that pre-exist extensions or have no common extension type. Perhaps we could have an OtherImageImporter type of plugin, that would attempt to load images that there is no current explicit support for?

As well, what happens if more than one plugin supports, for example, JpegImporter? How is one selected? I don't see any sort of system for priority or fail over loading, so if StbImageImporter fails to load a type that DevilImageImporter could have easily loaded (such as a complex PNG or something), that seems like a sign some sort of fail over or fall back logic is warranted.

Updating the basis plugin importer

I've updated the basis_universal repo to latest master (commit 00edf6396c4cffbbf33822a539cabaed52166555) and the code in the plugin failed to compile, so I'm providing a diff to apply the required modification to work with the latest basis repo commit.

diff --git a/src/MagnumPlugins/BasisImporter/BasisImporter.cpp b/src/MagnumPlugins/BasisImporter/BasisImporter.cpp
index 2bb95230..283a7b56 100644
--- a/src/MagnumPlugins/BasisImporter/BasisImporter.cpp
+++ b/src/MagnumPlugins/BasisImporter/BasisImporter.cpp
@@ -264,7 +264,7 @@ Containers::Optional<ImageData2D> BasisImporter::doImage2D(const UnsignedInt id,
         rowStride = 0; /* left up to Basis to calculate */
         outputRowsInPixels = 0; /* not used for compressed data */
         outputSizeInBlocksOrPixels = totalBlocks;
-        dataSize = basis_get_bytes_per_block(format)*totalBlocks;
+        dataSize = basisu::get_bytes_per_block(basisu::texture_format(format))*totalBlocks;
     }
     Containers::Array<char> dest{Containers::DefaultInit, dataSize};
     if(!_state->transcoder->transcode_image_level(_state->in.data(), _state->in.size(), id, level, dest.data(), outputSizeInBlocksOrPixels, basist::transcoder_texture_format(format), flags, rowStride, nullptr, outputRowsInPixels)) {

AssimpImporter: Embedded textures fail to load with FBX

Unfortunately I cannot provide the file in question here, but some investigation resulted in finding the following comment:
assimp/assimp#1830 (comment)

Which seems to indicate that testing * prefix for the filename is no longer sufficient to detect embedded images.
Instead we would try to load every image with scene->GetEmbeddedTexture(texture_file.C_Str()) and if it fails, load it as file.

We might fix this soon, since that is a fairly common case for scene files out in the wild.

Static analyzer warning about variable used before initialization in TinyGltfImporter

/home/jonesmz/osp-magnum/3rdparty/magnum-plugins/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp: In member function ‘virtual void Magnum::Trade::TinyGltfImporter::doOpenData(Corrade::Containers::ArrayView<const char>)’:
/home/jonesmz/osp-magnum/3rdparty/magnum-plugins/src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp:272:27: warning: ‘callbacks.tinygltf::FsCallbacks::WriteWholeFile’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  272 |     tinygltf::FsCallbacks callbacks;
      |                           ^~~~~~~~~

AssimpImporter crashes on gltf/glb in wasm builds

Now, I am not entirely sure whether it's a magnum issue or an assimp issue - I suspect it is the latter.

After some series of shamanistic dances, I managed to get assimp importer compile and link correctly with emscripten-wasm toolchain, and generally speaking it works - tested it on OBJ and COLLADA files, works without a hitch - but crashes right off the bat on openFile() if I provide assimp-generated gltf or glb files.

Now, i've no idea how to debug that. I'll try to play around with building assimp/magnum in debug mode, but I haven't had any experience with wasm-side debugging yet.

FindMagnumPlugins.cmake interaction with Assimp

Documentation on using AssimpImporter recommends building assimp as a subproject:

add_subdirectory(assimp EXCLUDE_FROM_ALL)
add_library(Assimp::Assimp ALIAS assimp)

But I prefer to keep them globally installed, so I was trying to get that to work, and what I have noticed is that FindMagnumPlugins refers to it this way:

find_package(Assimp)
set_property(TARGET MagnumPlugins::${_component} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Assimp::Assimp)

But pulling assimp from the master right now, I have noticed that it perfectly installs and provides assimp package with assimp::assimp as a target, and if I go ahead and change that to

find_package(assimp)
set_property(TARGET MagnumPlugins::${_component} APPEND PROPERTY INTERFACE_LINK_LIBRARIES assimp::assimp)

then it works and finds it correctly.

Build Server Configuration Issue.

I am having issues with Corrade, Magnum, and MagnumPlugins if I am trying to build and install those components to independent folders.
Development platform Ubuntu
Target platform Android.
All are static builds.

Let say I have 3 configs: Corrade-CMakeLists.txt, Magnum-CMakeLists.txt, MagnumPlugins-CMakeLists.txt.

Corrade-CMakeLists.txt

list(APPEND EXTRA_CMAKE_ARGS
                        @UBERBUILD_COMMON_CMAKE_ARGS@
                        "-DCMAKE_INSTALL_PREFIX=@3RDPARTY_INSTALL_PREFIX@/Corrade"
.
.
.
                        -DBUILD_STATIC=ON
                        )

Magnum-CMakeLists.txt

list(APPEND EXTRA_CMAKE_ARGS
                        @UBERBUILD_COMMON_CMAKE_ARGS@
                        "-DCMAKE_INSTALL_PREFIX=@3RDPARTY_INSTALL_PREFIX@/Magnum"
                        "-DCMAKE_PREFIX_PATH=@3RDPARTY_INSTALL_PREFIX@/Corrade"
                        "-DCMAKE_FIND_ROOT_PATH=@3RDPARTY_INSTALL_PREFIX@/Corrade"
.
.
.
                        -DBUILD_STATIC=ON
                        )

MagnumPlugins-CMakeLists.txt

list(APPEND EXTRA_CMAKE_ARGS
                        @UBERBUILD_COMMON_CMAKE_ARGS@
                        "-DCMAKE_INSTALL_PREFIX=@3RDPARTY_INSTALL_PREFIX@/MagnumPlugins"
                        "-DCMAKE_PREFIX_PATH=@3RDPARTY_INSTALL_PREFIX@/Corrade;@3RDPARTY_INSTALL_PREFIX@/Magnum"
                        "-DCMAKE_FIND_ROOT_PATH=@3RDPARTY_INSTALL_PREFIX@/Corrade;@3RDPARTY_INSTALL_PREFIX@/Magnum"
                        -DWITH_TINYGLTFIMPORTER=ON
                        -DWITH_STBIMAGEIMPORTER=ON
                        -DBUILD_STATIC=ON
                        )
  • The development version of Corrade is installed from .deb package to system location.
  • Error is happening when it tries to build MagnumPlugins part for Android.
  • The same configuration builds ok for Dev platform Linux.

It can not find Magnum or Corrade depends on what is first in CMAKE_FIND_ROOT_PATH.
You can see in the log that there is Found Magnum and Found Corrade but in the end, if failed.

Error log is:

jbajana@L1L7CZY2 ~/W/G/thirdpartysources> ./setup-build.sh Android Release
++ git rev-parse --show-toplevel
+ WORKSPACE_DIR=/home/jbajana/Work/Git/thirdpartysources
+ BUILD_SYSTEM=Android
+ BUILD_TYPE=Release
+ SOURCE_LOCATION=/home/jbajana/Work/Git/thirdpartysources
+ BUILD_LOCATION=/home/jbajana/Work/Git/thirdpartysources/build
+ THIRDPARTY_INSTALL_LOCATION=/home/jbajana/Work/Git/thirdpartysources/../3rdpart-Android-Release
+ rm -rf /home/jbajana/Work/Git/thirdpartysources/build/CMakeCache.txt /home/jbajana/Work/Git/thirdpartysources/build/CMakeFiles /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-build /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-src-tmp
+ '[' Android = Android ']'
+ BUILD_ARCH=arm64-v8a
+ [[ -z /home/jbajana/Android/Sdk/ndk/20.1.5948944 ]]
+ cmake -B/home/jbajana/Work/Git/thirdpartysources/build -H/home/jbajana/Work/Git/thirdpartysources -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_TOOLCHAIN_FILE=/home/jbajana/Android/Sdk/ndk/20.1.5948944/build/cmake/android.toolchain.cmake -DCMAKE_ANDROID_NDK=/home/jbajana/Android/Sdk/ndk/20.1.5948944 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=28 -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=28 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_static -D3RDPARTY_INSTALL_PREFIX=/home/jbajana/Work/Git/thirdpartysources/../3rdpart-Android-Release
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Check for working C compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
-- Check for working C compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
/home/jbajana/Work/Git/thirdpartysources
-- Corrade: attempting local config mode
-- Corrade: Found via config mode through file '/home/jbajana/Work/Git/3rdpart-Android-Release/Corrade/share/cmake/Corrade/CorradeConfig.cmake'
-- FOUND Corrade with version 
-- Found Corrade: /home/jbajana/Work/Git/3rdpart-Android-Release/Corrade/include   
-- Corrade: using   /home/jbajana/Work/Git/3rdpart-Android-Release/Corrade/share/cmake/Corrade
-- Magnum: attempting local config mode
-- Found Corrade: /home/jbajana/Work/Git/3rdpart-Android-Release/Corrade/include  found components:  Containers rc Utility 
-- LIB_SUFFIX variable is not defined. It will be autodetected now.
-- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
-- LIB_SUFFIX autodetected as '64', libraries will be installed into /usr/local/lib64
-- Magnum: Found via config mode through file '/home/jbajana/Work/Git/3rdpart-Android-Release/Magnum/share/cmake/Magnum/MagnumConfig.cmake'
-- FOUND Magnum with version 
-- Found Magnum: /home/jbajana/Work/Git/3rdpart-Android-Release/Magnum/include   
-- Magnum: using   /home/jbajana/Work/Git/3rdpart-Android-Release/Magnum/share/cmake/Magnum
-- MagnumPlugins: attempting local config mode
-- building package MagnumPlugins version  OFF
-- Assuming single-configuration generator for Ninja
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external
[1/8] Creating directories for 'MagnumPlugins'
[2/8] Performing download step (DIR copy) for 'MagnumPlugins'
[3/8] No update step for 'MagnumPlugins'
[4/8] No patch step for 'MagnumPlugins'
[5/8] Performing configure step for 'MagnumPlugins'
FAILED: MagnumPlugins-prefix/src/MagnumPlugins-stamp/MagnumPlugins-configure 
cd /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-build && /usr/bin/cmake -DCMAKE_PREFIX_PATH=/home/jbajana/Work/Git/3rdpart-Android-Release -D3RDPARTY_INSTALL_PREFIX=/home/jbajana/Work/Git/3rdpart-Android-Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/home/jbajana/Android/Sdk/ndk/20.1.5948944/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/home/jbajana/Android/Sdk/ndk/20.1.5948944 -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=28 -DANDROID_PLATFORM=android-28 -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DCMAKE_INSTALL_PREFIX=/home/jbajana/Work/Git/3rdpart-Android-Release/MagnumPlugins -DCMAKE_PREFIX_PATH=/home/jbajana/Work/Git/3rdpart-Android-Release/Corrade /home/jbajana/Work/Git/3rdpart-Android-Release/Magnum -DCMAKE_FIND_ROOT_PATH=/home/jbajana/Work/Git/3rdpart-Android-Release/Corrade /home/jbajana/Work/Git/3rdpart-Android-Release/Magnum -DWITH_ASSIMPIMPORTER=OFF -DWITH_TINYGLTFIMPORTER=ON -DWITH_STBIMAGEIMPORTER=ON -DWITH_JPEGIMPORTER=OFF -DWITH_PNGIMPORTER=OFF -DBUILD_STATIC=ON -GNinja -C/home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external/MagnumPlugins-prefix/tmp/MagnumPlugins-cache-.cmake /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-src-tmp && /usr/bin/cmake -E touch /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external/MagnumPlugins-prefix/src/MagnumPlugins-stamp/MagnumPlugins-configure
loading initial cache file /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external/MagnumPlugins-prefix/tmp/MagnumPlugins-cache-.cmake
CMake Warning (dev) at /home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-external/MagnumPlugins-prefix/tmp/MagnumPlugins-cache-.cmake:2 (set):
  implicitly converting 'string' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Check for working CXX compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/jbajana/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Corrade: /home/jbajana/Work/Git/3rdpart-Android-Release/Corrade/include  found components:  Containers rc Utility 
CMake Error at /usr/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Magnum (missing: MAGNUM_INCLUDE_DIR _MAGNUM_CONFIGURE_FILE)
Call Stack (most recent call first):
  /usr/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  modules/FindMagnum.cmake:240 (find_package_handle_standard_args)
  CMakeLists.txt:34 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jbajana/Work/Git/thirdpartysources/build/MagnumPlugins-build/CMakeFiles/CMakeOutput.log".
ninja: build stopped: subcommand failed.
CMake Error at uberbuild/findPackageAndInstall.cmake:163 (message):
  Error building 3rdparty project
Call Stack (most recent call first):
  uberbuild/findPackageAndInstall.cmake:242 (build_package)
  CMakeLists.txt:42 (find_package_and_install)


-- Configuring incomplete, errors occurred!
See also "/home/jbajana/Work/Git/thirdpartysources/build/CMakeFiles/CMakeOutput.log".
jbajana@L1L7CZY2 ~/W/G/thirdpartysources> 

Magnum_DIR and Corrade_DIR do not work either. Unfortunately, I am not super strong in deep CMake configs to do changes in Magnum.

Any ideas? Thank you.

compile fails with mingw due to cludgy defines

Many importers and converters include files which include windows.h. In mingw, windows.h (and other files) contain a line like:
#define interface struct
...
oof

/* Some kludge for Obj-C.
   For Obj-C the 'interface' is a keyword, but interface is used
   in midl-code too.  To resolve this conflict for at least the
   main windows API header, we define it here temporary.  */

It obviously does not work well with Corrade::PluginManager::Implementation::StaticPlugin in AbstractManager.h, which contains a const char* interface, and when referenced produces this error for me:

In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/oleidl.h:7,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/ole2.h:38,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:12,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
                 from C:/git/magnum-plugins/src/external/dr/dr_flac.h:3630,
                 from C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp:37:
C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp: In function 'int pluginImporter_DrFlacAudioImporter()':
C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp:195:1: error: expected unqualified-id before 'struct'
  195 | CORRADE_PLUGIN_REGISTER(DrFlacAudioImporter, Magnum::Audio::DrFlacImporter,
      | ^~~~~~~~~~~~~~~~~~~~~~~

I temporarily solved it by slapping an #undef interface right before the CORRADE_PLUGIN_REGISTER.

CMake error (missing: AnyImageImporter)

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Corrade: /usr/include  found components: Containers rc Utility 
-- Found Magnum: /usr/include   
-- Found Corrade: /usr/include  found components: Containers rc Utility PluginManager 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Magnum (missing: AnyImageImporter)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  modules/FindMagnum.cmake:988 (find_package_handle_standard_args)
  src/MagnumPlugins/AssimpImporter/CMakeLists.txt:27 (find_package)

Somehow AnyImageImporter is missing even when Magnum is built with

    local mycmakeargs=(
        -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
        -DCMAKE_BUILD_TYPE=Release
        -DWITH_AUDIO=ON
        -DWITH_GLXAPPLICATION=ON
        -DWITH_GLFWAPPLICATION=ON
        -DWITH_SDL2APPLICATION=ON
        -DWITH_WINDOWLESSGLXAPPLICATION=ON
        -DWITH_EGLCONTEXT=ON
        -DWITH_GLXCONTEXT=ON
        -DWITH_OPENGLTESTER=ON
        -DWITH_ANYAUDIOIMPORTER=ON
        -DWITH_ANYIMAGECONVERTER=ON
        -DWITH_ANYIMAGEIMPORTER=ON
        -DWITH_ANYSCENECONVERTER=ON
        -DWITH_ANYSCENEIMPORTER=ON
        -DWITH_MAGNUMFONT=ON
        -DWITH_MAGNUMFONTCONVERTER=ON
        -DWITH_OBJIMPORTER=ON
        -DWITH_TGAIMAGECONVERTER=ON
        -DWITH_TGAIMPORTER=ON
        -DWITH_WAVAUDIOIMPORTER=ON
        -DWITH_DISTANCEFIELDCONVERTER=ON
        -DWITH_IMAGECONVERTER=ON
        -DWITH_SCENECONVERTER=ON
        -DWITH_FONTCONVERTER=ON
        -DWITH_GL_INFO=ON
        -DWITH_AL_INFO=ON
    )

and I have

$ tree /usr/include/MagnumPlugins/AnyImageImporter
/usr/include/MagnumPlugins/AnyImageImporter
├── AnyImageImporter.h
└── configure.h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.