#include #include #include #ifdef LIGHT_PLATFORM_WINDOWS #include #include #endif #include #include namespace Light { auto Texture::create( unsigned int width, unsigned int height, unsigned int components, unsigned char *pixels, const Ref & /*sharedContext*/, const std::string &filePath ) -> Ref { switch (GraphicsContext::get_graphics_api()) { case GraphicsAPI::OpenGL: return create_ref(width, height, components, pixels, filePath); case GraphicsAPI::DirectX: lt_win(return create_ref( width, height, components, pixels, std::static_pointer_cast(sharedContext), filePath );) default : lt_assert( false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::get_graphics_api()) ); return nullptr; } } Texture::Texture(std::string filePath): m_file_path(std::move(filePath)) { } } // namespace Light