#include #include #include #ifdef LIGHT_PLATFORM_WINDOWS #include #include #endif #include namespace Light { /* static */ auto Shader::create( Ref vertex_asset, Ref pixel_asset, const Ref &shared_context ) -> Ref { std::ignore = shared_context; // load shader source switch (GraphicsContext::get_graphics_api()) { case GraphicsAPI::OpenGL: return create_ref(std::move(vertex_asset), std::move(pixel_asset)); case GraphicsAPI::DirectX: lt_win(return create_ref( vertex_asset, pixel_asset, std::static_pointer_cast(sharedContext) );); default: lt_assert( false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::get_graphics_api()) ); return nullptr; } } } // namespace Light