#include #include #include #ifdef LIGHT_PLATFORM_WINDOWS #include #include #endif #include namespace lt { /* static */ auto Shader::create( const Ref &vertex_asset, const 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: ensure( false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::get_graphics_api()) ); return nullptr; } } } // namespace lt