36 lines
626 B
C++
36 lines
626 B
C++
|
|
#include <basalt_char.hpp>
|
||
|
|
#include <string_view>
|
||
|
|
|
||
|
|
#if defined(BASALT_OS_WINDOWS)
|
||
|
|
#include <Windows.h>
|
||
|
|
#else
|
||
|
|
#include <dlfcn.h>
|
||
|
|
#endif
|
||
|
|
|
||
|
|
namespace Basalt::Presenter {
|
||
|
|
|
||
|
|
enum class DllKind {
|
||
|
|
RenderEngine,
|
||
|
|
DataDeliver,
|
||
|
|
ObjectLoader,
|
||
|
|
AnimationLoader,
|
||
|
|
};
|
||
|
|
|
||
|
|
class DllLoader {
|
||
|
|
public:
|
||
|
|
#if defined(BASALT_OS_WINDOWS)
|
||
|
|
using Handle = HMODULE;
|
||
|
|
#else
|
||
|
|
using Handle = void *;
|
||
|
|
#endif
|
||
|
|
|
||
|
|
public:
|
||
|
|
DllLoader(DllKind kind, const std::basic_string_view<BSCHAR> filename);
|
||
|
|
~DllLoader();
|
||
|
|
|
||
|
|
private:
|
||
|
|
Handle m_Handle;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace Basalt::Presenter
|